All of lore.kernel.org
 help / color / mirror / Atom feed
* ARM + jprobes/kretprobes SEGV/hangs/OOPS in 2.6.29 kernel
@ 2009-08-25 10:42 venki kaps
  2009-08-25 17:37 ` Nicolas Pitre
  0 siblings, 1 reply; 10+ messages in thread
From: venki kaps @ 2009-08-25 10:42 UTC (permalink / raw)
  To: sagar.abhishek, nico, jkenisto, rmk+kernel, linux, linux-arm,
	linux-kernel, prasanna

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-09-16  9:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-25 10:42 ARM + jprobes/kretprobes SEGV/hangs/OOPS in 2.6.29 kernel venki kaps
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.