8bf1101bd5
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> |
||
---|---|---|
.. | ||
vdso32 | ||
vdso64 | ||
align.c | ||
asm-offsets.c | ||
binfmt_elf32.c | ||
btext.c | ||
cpu_setup_power4.S | ||
cputable.c | ||
dma_64.c | ||
entry_32.S | ||
entry_64.S | ||
firmware.c | ||
fpu.S | ||
head_4xx.S | ||
head_8xx.S | ||
head_32.S | ||
head_44x.S | ||
head_64.S | ||
head_fsl_booke.S | ||
idle_6xx.S | ||
idle_64.c | ||
idle_power4.S | ||
init_task.c | ||
ioctl32.c | ||
iomap.c | ||
iommu.c | ||
irq.c | ||
kprobes.c | ||
lparcfg.c | ||
lparmap.c | ||
machine_kexec_64.c | ||
Makefile | ||
misc_32.S | ||
misc_64.S | ||
module_64.c | ||
nvram_64.c | ||
of_device.c | ||
paca.c | ||
pci_64.c | ||
pci_direct_iommu.c | ||
pci_dn.c | ||
pci_iommu.c | ||
pmc.c | ||
ppc32.h | ||
ppc_ksyms.c | ||
proc_ppc64.c | ||
process.c | ||
prom_init.c | ||
prom.c | ||
ptrace32.c | ||
ptrace-common.h | ||
ptrace.c | ||
rtas_flash.c | ||
rtas_pci.c | ||
rtas-proc.c | ||
rtas-rtc.c | ||
rtas.c | ||
semaphore.c | ||
setup_32.c | ||
setup_64.c | ||
setup-common.c | ||
setup.h | ||
signal_32.c | ||
signal_64.c | ||
smp-tbsync.c | ||
smp.c | ||
sys_ppc32.c | ||
syscalls.c | ||
sysfs.c | ||
systbl.S | ||
time.c | ||
traps.c | ||
udbg_16550.c | ||
udbg_scc.c | ||
udbg.c | ||
vdso.c | ||
vecemu.c | ||
vector.S | ||
vio.c | ||
vmlinux.lds.S |