linux/arch/x86_64
Jim Keniston bce0649417 [PATCH] kprobes: fix handling of simultaneous probe hit/unregister
This patch fixes a bug in kprobes's handling of a corner case on i386 and
x86_64.  On an SMP system, if one CPU unregisters a kprobe just after
another CPU hits that probepoint, kprobe_handler() on the latter CPU sees
that the kprobe has been unregistered, and attempts to let the CPU continue
as if the probepoint hadn't been hit.  The bug is that on i386 and x86_64,
we were neglecting to set the IP back to the beginning of the probed
instruction.  This could cause an oops or crash.

This bug doesn't exist on ppc64 and ia64, where a breakpoint instruction
leaves the IP pointing to the beginning of the instruction.  I don't know
about sparc64.  (Dave, could you please advise?)

This fix has been tested on i386 and x86_64 SMP systems.  To reproduce the
problem, set one CPU to work registering and unregistering a kprobe
repeatedly, and another CPU pounding the probepoint in a tight loop.

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-09-07 16:58:01 -07:00
..
boot [PATCH] Make the bzImage format self-terminating 2005-09-07 16:57:29 -07:00
crypto [PATCH] x86_64: add MODULE_ALIAS for aes 2005-08-08 15:29:13 -07:00
ia32 [PATCH] remove duplicated sys_open32() code from 64bit archs 2005-09-07 16:57:43 -07:00
kernel [PATCH] kprobes: fix handling of simultaneous probe hit/unregister 2005-09-07 16:58:01 -07:00
lib [PATCH] x86_64: fix bug in csum_partial_copy_generic() 2005-07-30 10:14:47 -07:00
mm [PATCH] kprobes: prevent possible race conditions x86_64 changes 2005-09-07 16:57:59 -07:00
oprofile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci [PATCH] x86_64: Don't oops at boot when empty Opteron node has IO 2005-08-23 19:59:39 -07:00
defconfig [PATCH] x86_64: update defconfig - reenable fusion 2005-08-24 10:22:44 -07:00
Kconfig [PATCH] x86/x86_64: deferred handling of writes to /proc/irqxx/smp_affinity 2005-09-07 16:57:15 -07:00
Kconfig.debug Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile [PATCH] x86_64: Remove IA32_* build tools in Makefile 2005-07-28 21:46:00 -07:00