lkml.org 
[lkml]   [2005]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] 2.6.10 patch to export kallsyms_lookup_name()
From
Date
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

-
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/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.410 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site