android_kernel_motorola_sm6225/arch/i386/kernel
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
..
acpi [PATCH] x86: sutomatically enable bigsmp when we have more than 8 CPUs 2005-09-05 00:06:10 -07:00
cpu [PATCH] swsusp: fix remaining u32 vs. pm_message_t confusion 2005-09-05 00:06:15 -07:00
timers [PATCH] Additions to .data.read_mostly section 2005-09-07 16:57:33 -07:00
apic.c [PATCH] x86: Remove obsolete get_cpu_vendor call 2005-08-18 12:53:59 -07:00
apm.c [PATCH] APM: Remove redundant call to set_cpus_allowed 2005-07-26 14:35:45 -07:00
asm-offsets.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
bootflag.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cpuid.c [PATCH] class: convert arch/* to use the new class api instead of class_simple 2005-06-20 15:15:09 -07:00
crash.c [PATCH] x86: more asm cleanups 2005-09-05 00:06:12 -07:00
dmi_scan.c [PATCH] fix: dmi_check_system 2005-09-07 16:57:44 -07:00
doublefault.c [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management 2005-09-05 00:06:11 -07:00
early_printk.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
efi.c [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management 2005-09-05 00:06:11 -07:00
efi_stub.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
entry.S [PATCH] kprobes: prevent possible race conditions i386 changes 2005-09-07 16:57:59 -07:00
head.S [PATCH] kdump: Save parameter segment in protected mode (x86) 2005-09-05 00:06:09 -07:00
i386_ksyms.c [PATCH] Remove i386_ksyms.c, almost. 2005-06-23 09:45:11 -07:00
i387.c x86: make restore_fpu() use alternative assembler instructions 2005-07-22 16:06:16 -04:00
i8237.c [PATCH] ISA DMA suspend for i386 2005-09-05 00:06:14 -07:00
i8259.c [PATCH] kexec: x86: i8259 shutdown: disable interrupts 2005-06-25 16:24:46 -07:00
init_task.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
io_apic.c [PATCH] Additions to .data.read_mostly section 2005-09-07 16:57:33 -07:00
ioport.c [PATCH] x86: make IOPL explicit 2005-09-05 00:06:12 -07:00
irq.c [PATCH] cpu state clean after hot remove 2005-06-25 16:24:30 -07:00
kprobes.c [PATCH] kprobes: fix handling of simultaneous probe hit/unregister 2005-09-07 16:58:01 -07:00
ldt.c [PATCH] x86: introduce a write acessor for updating the current LDT 2005-09-05 00:06:13 -07:00
machine_kexec.c [PATCH] x86: more asm cleanups 2005-09-05 00:06:12 -07:00
Makefile [PATCH] ISA DMA suspend for i386 2005-09-05 00:06:14 -07:00
mca.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
microcode.c [PATCH] i386: cleanup serialize msr 2005-09-05 00:06:11 -07:00
module.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mpparse.c [PATCH] i386 boottime for_each_cpu broken 2005-09-05 00:06:13 -07:00
msr.c [PATCH] x86: more asm cleanups 2005-09-05 00:06:12 -07:00
nmi.c [PATCH] detect soft lockups 2005-09-07 16:57:17 -07:00
numaq.c [PATCH] re-disable TSC on NUMAQ 2005-07-28 21:46:05 -07:00
pci-dma.c [PATCH] Remove i386_ksyms.c, almost. 2005-06-23 09:45:11 -07:00
process.c [PATCH] x86: make IOPL explicit 2005-09-05 00:06:12 -07:00
ptrace.c [PATCH] SYSEMU: fix sysaudit / singlestep interaction 2005-09-05 00:06:20 -07:00
quirks.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
reboot.c [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management 2005-09-05 00:06:11 -07:00
reboot_fixups.c [PATCH] x86 reboot: Add reboot fixup for gx1/cs5530a 2005-05-01 08:58:49 -07:00
relocate_kernel.S [PATCH] kexec: x86 kexec core 2005-06-25 16:24:49 -07:00
scx200.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
semaphore.c [PATCH] unify x86/x86-64 semaphore code 2005-09-05 00:06:14 -07:00
setup.c [PATCH] More __read_mostly variables 2005-09-07 16:57:18 -07:00
sigframe.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
signal.c [PATCH] x86: privilege cleanup 2005-09-05 00:06:12 -07:00
smp.c [PATCH] i386: inline asm cleanup 2005-09-05 00:06:11 -07:00
smpboot.c [PATCH] i386 boottime for_each_cpu broken 2005-09-05 00:06:13 -07:00
srat.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
summit.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sys_i386.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
syscall_table.S [PATCH] remove sys_set_zone_reclaim() 2005-08-01 10:03:56 -07:00
sysenter.c [PATCH] sep initializing rework 2005-06-25 16:24:29 -07:00
time.c [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
time_hpet.c [PATCH] CPU hotplug: fix hpet sectioning 2005-06-25 16:24:28 -07:00
trampoline.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
traps.c [PATCH] kprobes: prevent possible race conditions i386 changes 2005-09-07 16:57:59 -07:00
vm86.c [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management 2005-09-05 00:06:11 -07:00
vmlinux.lds.S [PATCH] kprobes: prevent possible race conditions i386 changes 2005-09-07 16:57:59 -07:00
vsyscall-int80.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vsyscall-note.S [PATCH] i386 vDSO: add PT_NOTE segment 2005-04-16 15:24:48 -07:00
vsyscall-sigreturn.S [PATCH] i386: clean up vDSO alignment padding 2005-09-05 00:06:10 -07:00
vsyscall-sysenter.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vsyscall.lds.S [PATCH] i386 vDSO: add PT_NOTE segment 2005-04-16 15:24:48 -07:00
vsyscall.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00