From: "srinivasa at in dot ibm dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sources.redhat.com
Subject: [Bug kprobes/2152] jprobe variant to run handler instead of probed function
Date: Sat, 17 Feb 2007 11:40:00 -0000 [thread overview]
Message-ID: <20070217113951.14587.qmail@sourceware.org> (raw)
In-Reply-To: <20060113232600.2152.jkenisto@us.ibm.com>
------- Additional Comments From srinivasa at in dot ibm dot com 2007-02-17 11:39 -------
Jprobe module should have jprobe_nop_retun in its function and "return" is
also required.
An example is here
int jversion_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
jprobe_nop_return();
return 0;
}
static struct jprobe my_jprobe = {
.entry = JPROBE_ENTRY(jversion_read_proc)
};
static int __init jprobe_init(void)
{
int ret;
my_jprobe.kp.symbol_name = "version_read_proc";
if ((ret = register_jprobe(&my_jprobe)) <0) {
printk("register_jprobe failed, returned %d\n", ret);
return -1;
}
printk("Planted jprobe at %p, handler addr %p\n",
my_jprobe.kp.addr, my_jprobe.entry);
return 0;
}
static void __exit jprobe_exit(void)
{
unregister_jprobe(&my_jprobe);
printk("jprobe unregistered\n");
}
module_init(jprobe_init)
module_exit(jprobe_exit)
MODULE_LICENSE("GPL");
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2152
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
next prev parent reply other threads:[~2007-02-17 11:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-13 23:26 [Bug kprobes/2152] New: " jkenisto at us dot ibm dot com
2006-01-16 10:56 ` [Bug kprobes/2152] " suparna at in dot ibm dot com
2006-01-16 10:56 ` [Bug kprobes/2152] New: " Suparna Bhattacharya
2006-01-16 17:26 ` [Bug kprobes/2152] " anil dot s dot keshavamurthy at intel dot com
2006-01-17 6:04 ` Suparna Bhattacharya
2006-01-17 6:04 ` suparna at in dot ibm dot com
2007-02-17 11:35 ` srinivasa at in dot ibm dot com
2007-02-17 11:40 ` srinivasa at in dot ibm dot com [this message]
2007-08-19 5:18 ` jkenisto at us dot ibm dot com
2009-01-06 18:43 ` jkenisto at us dot ibm dot com
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=20070217113951.14587.qmail@sourceware.org \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).