* finding out module name from an address ?
@ 2001-08-02 20:39 Rajeev Bector
2001-08-03 10:13 ` Amit S. Kale
0 siblings, 1 reply; 2+ messages in thread
From: Rajeev Bector @ 2001-08-02 20:39 UTC (permalink / raw)
To: Linux-Kernel
Hi,
I am trying to write a patched kmalloc() which
will track the caller function using
__builtin_return_address(0). From that address,
is there a clean way to figure out if the address
belongs to a loadable module and if yes, get
to the module structure of that module so
that I can log on the basis of module->name
Thanks
Rajeev
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: finding out module name from an address ?
2001-08-02 20:39 finding out module name from an address ? Rajeev Bector
@ 2001-08-03 10:13 ` Amit S. Kale
0 siblings, 0 replies; 2+ messages in thread
From: Amit S. Kale @ 2001-08-03 10:13 UTC (permalink / raw)
To: Rajeev Bector; +Cc: Linux-Kernel
Rajeev Bector wrote:
>
> Hi,
> I am trying to write a patched kmalloc() which
> will track the caller function using
> __builtin_return_address(0). From that address,
> is there a clean way to figure out if the address
> belongs to a loadable module and if yes, get
> to the module structure of that module so
> that I can log on the basis of module->name
You can traverse module_list. An element of the
list (struct module) also describes size of the module.
So if an address is between struct module pointer and
struct module pointer + mdoule size, you know that the module
contains the code.
>
> Thanks
> Rajeev
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> -
> 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/
--
Amit Kale
Veritas Software ( http://www.veritas.com )
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-08-03 10:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-02 20:39 finding out module name from an address ? Rajeev Bector
2001-08-03 10:13 ` Amit S. Kale
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).