struct module of an executing LKM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can anyone suggest me a way of getting the "module object" (struct module)
for a given module.    The following constraints apply -

1.  module_list is not exported and therefore is not present in the
/proc/ksyms
2.  As I want to do this from within a module, I cannot use sys_call_table.
The problem is the user space copying that takes place in the XYZ_module()
routines.
3.  No other function is to be exported for this purpose.   I want my LKM
to run from any kernel; not just the one from which has exported some
functions / data structures.

I want to get the struct module for a module ; something similar to the
"this" pointer of a C++ object.  Ugly hacks for the x86 platform are
welcome.    Thanks in advance.



-mohit

Regards,
Mohit Kalra

"It is a capital mistake to theorize before one has data.
Insensibly one begins to twist facts to suit theories, instead of theories
to suit facts."
-SH

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux