From: Badari Pulavarty <pbadari@us.ibm.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrew Morton <akpm@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 2.6.10 patch to export kallsyms_lookup_name()
Date: 18 Feb 2005 11:10:02 -0800 [thread overview]
Message-ID: <1108753801.20053.1764.camel@dyn318077bld.beaverton.ibm.com> (raw)
In-Reply-To: <20050218184203.GA23792@infradead.org>
On Fri, 2005-02-18 at 10:42, Christoph Hellwig wrote:
> On Fri, Feb 18, 2005 at 10:29:08AM -0800, Badari Pulavarty wrote:
> > Hi,
> >
> > Trivial patch to export kallsyms_lookup_name() for
> > kprobe/jprobe module use.
> >
> > Please apply.
> >
> > (BTW, I personally don't care if it should be
> > EXPORT_SYMBOL_GPL or EXPORT_SYMBOL).
>
> Certainly should be _GPL. And where's the example user?
>
GPL it is then :)
There are bunch of kprobes/jprobe modules
Packet tracer module:
http://lkml.org/lkml/2004/8/16/179
I have few modules for adding dump_stack()
and collect few stats in various places (mostly
for debugging things). If you really want to see them
I can post.
The routine is used for resolving symbol to address,
so that we can insert probe point, like ..
+ for (i = 0, nt = nettrace_objs; i < MAX_NETTRACE_ROUTINE; i++, nt++) {
+ nt = &nettrace_objs[i];
+ nt->jp.kp.addr = (kprobe_opcode_t *)
+ kallsyms_lookup_name(nt->funcname);
+ if (nt->jp.kp.addr) {
+ printk("plant jprobe at %s (%p), handler addr %p\n",
+ nt->funcname, nt->jp.kp.addr, nt->jp.entry);
+ register_jprobe(&nt->jp);
+ } else {
+ printk("couldn't find %s to plant jprobe\n",
+ nt->funcname);
+ }
+ }
Thanks,
Badari
prev parent reply other threads:[~2005-02-18 19:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-18 18:29 Badari Pulavarty
2005-02-18 18:42 ` Christoph Hellwig
2005-02-18 19:10 ` Badari Pulavarty [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=1108753801.20053.1764.camel@dyn318077bld.beaverton.ibm.com \
--to=pbadari@us.ibm.com \
--cc=akpm@osdl.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®