Re: [PATCH] 2.6.10 patch to export kallsyms_lookup_name()

2005-02-18 Thread Badari Pulavarty
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 = _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(>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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] 2.6.10 patch to export kallsyms_lookup_name()

2005-02-18 Thread Christoph Hellwig
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?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] 2.6.10 patch to export kallsyms_lookup_name()

2005-02-18 Thread Badari Pulavarty
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


--- 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);


[PATCH] 2.6.10 patch to export kallsyms_lookup_name()

2005-02-18 Thread Badari Pulavarty
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


--- 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);


Re: [PATCH] 2.6.10 patch to export kallsyms_lookup_name()

2005-02-18 Thread Christoph Hellwig
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?
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] 2.6.10 patch to export kallsyms_lookup_name()

2005-02-18 Thread Badari Pulavarty
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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/