RE: Kernel module version support.

From: Wang, Stanley (stanley.wang@intel.com)
Date: Fri Jan 03 2003 - 00:36:19 EST


Hi Rusty
Thanks for your rapid responding.

And as you are the maintainer of kernel module support, I would like to know
how
you think about export some APIs for geting a specified module structure's
pointer.
Just like:
struct module *get_module(const char *name)
{
        struct module *mod;
        down(&module_mutex);
        mod = find_module(name);
        up(&module_mutex);
        return mod;
}
EXPORT_SYMBOL_GPL(get_module);

This function will be useful when we use Kprobes to place probes into a
kernel module.
We could get the base address of the module's .text section througn this
module structure's
pointer, hence we could place the kernel probe on any instruction we wanted.
  
Thanks a lot.

Your Sincerely,
Stanley Wang

SW Engineer, Intel Corporation.
Intel China Software Lab.
Tel: 021-52574545 ext. 1171
iNet: 8-752-1171
 
Opinions expressed are those of the author and do not represent Intel
Corporation
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:20 EST