public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Maneesh Soni <maneesh@in.ibm.com>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: prasanna@in.ibm.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	suparna@in.ibm.com
Subject: Re: 2.6.10 kprobes/jprobes panic
Date: Thu, 10 Feb 2005 16:58:54 +0530	[thread overview]
Message-ID: <20050210112854.GA4197@in.ibm.com> (raw)
In-Reply-To: <1107993815.20053.93.camel@dyn318077bld.beaverton.ibm.com>

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: maneesh@in.ibm.com
Phone: 91-80-25044990

      reply	other threads:[~2005-02-10 11:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-08 23:59 2.6.10 kprobes/jprobes panic Badari Pulavarty
2005-02-09  5:07 ` Prasanna S Panchamukhi
2005-02-10  0:03   ` Badari Pulavarty
2005-02-10 11:28     ` Maneesh Soni [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=20050210112854.GA4197@in.ibm.com \
    --to=maneesh@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbadari@us.ibm.com \
    --cc=prasanna@in.ibm.com \
    --cc=suparna@in.ibm.com \
    /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