linux/arch/ia64
Jim Keniston 8bf1101bd5 [PATCH] kprobes: Fix return probes on sys_execve
Fix a bug in kprobes that can cause an Oops or even a crash when a return
probe is installed on one of the following functions: sys_execve,
do_execve, load_*_binary, flush_old_exec, or flush_thread.  The fix is to
remove the call to kprobe_flush_task() in flush_thread().  This fix has
been tested on all architectures for which the return-probes feature has
been implemented (i386, x86_64, ppc64, ia64).  Please apply.

BACKGROUND

Up to now, we have called kprobe_flush_task() under two situations: when a
task exits, and when it execs.  Flushing kretprobe_instances on exit is
correct because (a) do_exit() doesn't return, and (b) one or more
return-probed functions may be active when a task calls do_exit().  Neither
is the case for sys_execve() and its callees.

Initially, the mistaken call to kprobe_flush_task() on exec was harmless
because we put the "real" return address of each active probed function
back in the stack, just to be safe, when we recycled its
kretprobe_instance.  When support for ppc64 and ia64 was added, this safety
measure couldn't be employed, and was eventually dropped even for i386 and
x86_64.  sys_execve() and its callees were informally blacklisted for
return probes until this fix was developed.

Acked-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Jim Keniston <jkenisto@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 16:08:39 -08:00
..
configs [IA64] 4-level page tables 2005-11-11 09:37:29 -08:00
dig Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hp [PATCH] ia64: fix-up schedule_timeout() usage 2005-11-07 07:53:56 -08:00
ia32 [PATCH] remove ioctl32_handler_t 2005-11-09 07:56:00 -08:00
kernel [PATCH] kprobes: Fix return probes on sys_execve 2005-11-23 16:08:39 -08:00
lib Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2005-10-28 21:09:26 -07:00
mm Pull context-bitmap into release branch 2005-11-10 10:39:49 -08:00
oprofile [PATCH] Move Kprobes and Oprofile to "Instrumentation Support" menu 2005-11-07 07:53:35 -08:00
pci [IA64] add the MMIO regions that are translated to I/O port space to /proc/iomem 2005-11-08 10:09:40 -08:00
scripts Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sn [IA64-SGI] bte_copy nasid_index fix 2005-11-21 14:19:36 -08:00
defconfig [IA64] 4-level page tables 2005-11-11 09:37:29 -08:00
install.sh Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Kconfig Merge x86-64 update from Andi 2005-11-14 19:56:02 -08:00
Kconfig.debug [PATCH] Move Kprobes and Oprofile to "Instrumentation Support" menu 2005-11-07 07:53:35 -08:00
Makefile [IA64] fix circular dependency on generation of asm-offsets.h 2005-09-13 08:50:39 -07:00
module.lds Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00