From: venki kaps <venkiece2005@gmail.com>
To: sagar.abhishek@gmail.com, nico@marvell.com, jkenisto@us.ibm.com,
rmk+kernel@arm.linux.org.uk, linux@arm.linux.org.uk,
linux-arm@vger.kernel.org, linux-kernel@vger.kernel.org,
prasanna@in.ibm.com
Subject: ARM + jprobes/kretprobes SEGV/hangs/OOPS in 2.6.29 kernel
Date: Tue, 25 Aug 2009 16:12:07 +0530 [thread overview]
Message-ID: <6d53329e0908250342g2cfb73f6v90f73c283c0d391c@mail.gmail.com> (raw)
Hi,
I have been tracing kernel system call information using
the Kprobes/jprobes/kretprobes implementation in the 2.6.29 kernel on
ARM architecture.
Although the mainline kprobe/jprobe/kretprobe examples are working
fine (do_fork),
I have been facing some issues while running my own jprobe/kretprobe tests.
For instance, when I am planting jprobe at
do_execve/sys_open/sys_close/sys_read/sys_write/,
after registration of probe, segmentation fault is getting generated.
The following is my code snapshot-
static int
jdo_execve(char * filename,
char __user *__user *argv,
char __user *__user *envp,
struct pt_regs * regs)
{
jprobe_return();
return 0;
}
static struct jprobe my_jprobe = {
.entry = jdo_execve,
.kp = {
.symbol_name = "do_execve",
},
};
static int __init jprobe_init(void) {
if ((register_jprobe(&my_jprobe)) < 0) {
printk("%s %d,register_jprobe failed, returned\n", __FILE__, __LINE__);
return -1;
}
printk("%s %d,Planted jprobe at %p, handler addr %p\n", __FILE__, __LINE__,
my_jprobe.kp.addr, my_jprobe.entry);
return 0;
}
static void __exit jprobe_exit(void) {
unregister_jprobe(&my_jprobe);
printk("%s %d,jprobe unregistered\n", __FILE__, __LINE__);
}
And also system hangs for sys_open/sys_close/sys_read/sys_write with
jprobes/kretprobes
but there are no issues with kprobes.
Query:
=====
- Are there any limitations for jptobes/kretporbes in mainline kernel for ARM?
- Why it works for only do_fork and why not for others
(do_execve/sys_open/sys_close/sys_read/sys_write)?
- Is it required any additional setup to achieve this?
Please give your valuable comments.
Thanks in advance.
Best regards,
Venkappa
next reply other threads:[~2009-08-25 10:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-25 10:42 venki kaps [this message]
2009-08-25 17:37 ` Nicolas Pitre
2009-08-31 5:27 ` venki kaps
2009-08-31 10:11 ` venki kaps
2009-09-01 6:55 ` venki kaps
2009-09-01 13:54 ` Catalin Marinas
2009-09-01 14:25 ` Russell King
2009-09-01 14:43 ` Catalin Marinas
2009-09-01 17:56 ` Nicolas Pitre
2009-09-16 9:40 ` venki kaps
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=6d53329e0908250342g2cfb73f6v90f73c283c0d391c@mail.gmail.com \
--to=venkiece2005@gmail.com \
--cc=jkenisto@us.ibm.com \
--cc=linux-arm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=nico@marvell.com \
--cc=prasanna@in.ibm.com \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=sagar.abhishek@gmail.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
all inboxes | Powered by JetHome®