d0aaff9796
There are possible race conditions if probes are placed on routines within the kprobes files and routines used by the kprobes. For example if you put probe on get_kprobe() routines, the system can hang while inserting probes on any routine such as do_fork(). Because while inserting probes on do_fork(), register_kprobes() routine grabs the kprobes spin lock and executes get_kprobe() routine and to handle probe of get_kprobe(), kprobes_handler() gets executed and tries to grab kprobes spin lock, and spins forever. This patch avoids such possible race conditions by preventing probes on routines within the kprobes file and routines used by kprobes. I have modified the patches as per Andi Kleen's suggestion to move kprobes routines and other routines used by kprobes to a seperate section .kprobes.text. Also moved page fault and exception handlers, general protection fault to .kprobes.text section. These patches have been tested on i386, x86_64 and ppc64 architectures, also compiled on ia64 and sparc64 architectures. Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org> |
||
---|---|---|
.. | ||
4level-fixup.h | ||
bitops.h | ||
bug.h | ||
cputime.h | ||
div64.h | ||
dma-mapping-broken.h | ||
dma-mapping.h | ||
emergency-restart.h | ||
errno-base.h | ||
errno.h | ||
fcntl.h | ||
ide_iops.h | ||
iomap.h | ||
ipc.h | ||
local.h | ||
page.h | ||
pci-dma-compat.h | ||
pci.h | ||
percpu.h | ||
pgtable-nopmd.h | ||
pgtable-nopud.h | ||
pgtable.h | ||
resource.h | ||
rtc.h | ||
sections.h | ||
siginfo.h | ||
signal.h | ||
statfs.h | ||
termios.h | ||
tlb.h | ||
topology.h | ||
uaccess.h | ||
unaligned.h | ||
vmlinux.lds.h | ||
xor.h |