On Wed, Feb 09, 2005 at 04:03:36PM -0800, Badari Pulavarty wrote:
> On Tue, 2005-02-08 at 21:07, Prasanna S Panchamukhi wrote:
[..]
> > > 
> > 
> > Error check and graceful exit can be done in the jprobe handler
> > module. In the jprobe network packet logging patch, error check
> > was taken care by using kallsyms_lookup_name() as shown below.
> > 
> >     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);
> >             }. 
> > 
> 
> I tried to do this earlier in my module, but I get
> 
> # insmod myprobe.ko
> insmod: error inserting 'myprobe.ko': -1 Unknown symbol in module
> myprobe: Unknown symbol kallsyms_lookup_name
> 
> How did you use it ? it looks like kallsyms_lookup_name()
> is not exported. Thats the reason why I was hardcoding addresses.
> 

I checked the network packet logging patch, it also adds the 
EXPORT_SYMBOL(kallsyms_lookup_name).  :)

http://prdownloads.sourceforge.net/dprobes/plog.tar.gz?download

Maneesh

-- 
Maneesh Soni
Linux Technology Center, 
IBM India Software Labs,
Bangalore, India
email: [EMAIL PROTECTED]
Phone: 91-80-25044990
-
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/

Reply via email to