lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 25 Aug 2009 16:12:07 +0530
From:	venki kaps <venkiece2005@...il.com>
To:	sagar.abhishek@...il.com, nico@...vell.com, jkenisto@...ibm.com,
	rmk+kernel@....linux.org.uk, linux@....linux.org.uk,
	linux-arm@...r.kernel.org, linux-kernel@...r.kernel.org,
	prasanna@...ibm.com
Subject: ARM + jprobes/kretprobes SEGV/hangs/OOPS in 2.6.29 kernel

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ