All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Amit S. Kale" <akale@veritas.com>
To: Rajeev Bector <rajeev_bector@yahoo.com>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: Re: finding out module name from an address  ?
Date: Fri, 03 Aug 2001 15:43:54 +0530	[thread overview]
Message-ID: <3B6A7962.B5B586C5@veritas.com> (raw)
In-Reply-To: <GIEMIEJKPLDGHDJKJELAGECPCCAA.rajeev_bector@yahoo.com>

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 )

      reply	other threads:[~2001-08-03 10:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-02 20:39 finding out module name from an address ? Rajeev Bector
2001-08-03 10:13 ` Amit S. Kale [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B6A7962.B5B586C5@veritas.com \
    --to=akale@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rajeev_bector@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.