* [PATCH] 2.6.10 patch to export kallsyms_lookup_name()
@ 2005-02-18 18:29 Badari Pulavarty
2005-02-18 18:42 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Badari Pulavarty @ 2005-02-18 18:29 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 200 bytes --]
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).
Thanks,
Badari
[-- Attachment #2: kallsym.patch --]
[-- Type: text/plain, Size: 297 bytes --]
--- linux-2.6.10.org/kernel/kallsyms.c 2005-02-18 11:18:54.004259856 -0800
+++ linux-2.6.10/kernel/kallsyms.c 2005-02-18 11:20:01.619980704 -0800
@@ -382,3 +382,4 @@ int __init kallsyms_init(void)
__initcall(kallsyms_init);
EXPORT_SYMBOL(__print_symbol);
+EXPORT_SYMBOL(kallsyms_lookup_name);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] 2.6.10 patch to export kallsyms_lookup_name()
2005-02-18 18:29 [PATCH] 2.6.10 patch to export kallsyms_lookup_name() Badari Pulavarty
@ 2005-02-18 18:42 ` Christoph Hellwig
2005-02-18 19:10 ` Badari Pulavarty
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2005-02-18 18:42 UTC (permalink / raw)
To: Badari Pulavarty; +Cc: Andrew Morton, Linux Kernel Mailing List
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] 2.6.10 patch to export kallsyms_lookup_name()
2005-02-18 18:42 ` Christoph Hellwig
@ 2005-02-18 19:10 ` Badari Pulavarty
0 siblings, 0 replies; 3+ messages in thread
From: Badari Pulavarty @ 2005-02-18 19:10 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Andrew Morton, Linux Kernel Mailing List
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-02-18 19:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-18 18:29 [PATCH] 2.6.10 patch to export kallsyms_lookup_name() Badari Pulavarty
2005-02-18 18:42 ` Christoph Hellwig
2005-02-18 19:10 ` Badari Pulavarty
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®