linux-IllusionX/kernel
Prasanna S Panchamukhi d0aaff9796 [PATCH] Kprobes: prevent possible race conditions generic
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>
2005-09-07 16:57:59 -07:00
..
irq
power [PATCH] introduce and use kzalloc 2005-09-07 16:57:45 -07:00
acct.c [PATCH] largefile support for accounting 2005-09-07 16:57:31 -07:00
audit.c
auditsc.c
capability.c
compat.c
configs.c
cpu.c
cpuset.c [PATCH] cpusets: re-enable "dynamic sched domains" 2005-09-07 16:57:41 -07:00
crash_dump.c
dma.c
exec_domain.c
exit.c
extable.c
fork.c
futex.c [PATCH] futex: remove duplicate code 2005-09-07 16:57:33 -07:00
intermodule.c [PATCH] introduce and use kzalloc 2005-09-07 16:57:45 -07:00
itimer.c
kallsyms.c
Kconfig.hz
Kconfig.preempt
kexec.c
kfifo.c
kmod.c
kprobes.c [PATCH] Kprobes: prevent possible race conditions generic 2005-09-07 16:57:59 -07:00
ksysfs.c
kthread.c
Makefile
module.c
panic.c
params.c [PATCH] introduce and use kzalloc 2005-09-07 16:57:45 -07:00
pid.c
posix-cpu-timers.c
posix-timers.c [PATCH] fix send_sigqueue() vs thread exit race 2005-09-07 16:57:33 -07:00
printk.c
profile.c
ptrace.c [PATCH] remove duplicated code from proc and ptrace 2005-09-07 16:57:43 -07:00
rcupdate.c
resource.c [PATCH] introduce and use kzalloc 2005-09-07 16:57:45 -07:00
sched.c [PATCH] cpusets: fix the "dynamic sched domains" bug 2005-09-07 16:57:41 -07:00
seccomp.c
signal.c [PATCH] fix send_sigqueue() vs thread exit race 2005-09-07 16:57:33 -07:00
softirq.c
softlockup.c
spinlock.c
stop_machine.c
sys.c [PATCH] remove a redundant variable in sys_prctl() 2005-09-07 16:57:32 -07:00
sys_ni.c
sysctl.c
time.c
timer.c
uid16.c
user.c
wait.c
workqueue.c [PATCH] introduce and use kzalloc 2005-09-07 16:57:45 -07:00