alistair23-linux/arch/i386
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] arch/i386/crypto/aes.c: fix sparse warnings 2005-06-25 16:24:59 -07:00
kernel [PATCH] kprobes: fix handling of simultaneous probe hit/unregister 2005-09-07 16:58:01 -07:00
lib [PATCH] Remove i386_ksyms.c, almost. 2005-06-23 09:45:11 -07:00
mach-default [PATCH] x86_64: create sysfs entries for cpu only for present cpus 2005-09-07 16:57:16 -07:00
mach-es7000 [PATCH] ES7000 platform update (i386) 2005-09-05 00:06:10 -07:00
mach-generic [PATCH] x86: sutomatically enable bigsmp when we have more than 8 CPUs 2005-09-05 00:06:10 -07:00
mach-visws [PATCH] visws: linkage fix 2005-08-07 10:00:38 -07:00
mach-voyager [PATCH] i386 boottime for_each_cpu broken 2005-09-05 00:06:13 -07:00
math-emu [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management 2005-09-05 00:06:11 -07:00
mm [PATCH] kprobes: prevent possible race conditions i386 changes 2005-09-07 16:57:59 -07:00
oprofile [PATCH] Fix function/macro name collision on i386 oprofile 2005-09-07 16:57:29 -07:00
pci [PATCH] x86: pci_assign_unassigned_resources() update 2005-08-30 11:14:48 -07:00
power [PATCH] x86: remove redundant TSS clearing 2005-09-05 00:06:13 -07:00
defconfig [PATCH] swsusp: kill config_pm_disk 2005-06-25 16:24:32 -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 [PATCH] i386: add missing Kconfig help text 2005-07-27 16:25:58 -07:00
Makefile [PATCH] biarch compiler support for i386 2005-06-23 09:45:07 -07:00