* [PATCH] Kprobes - fixup the pagefault exception caused by probehandlers
@ 2006-09-14 21:34 Keshavamurthy Anil S
0 siblings, 0 replies; only message in thread
From: Keshavamurthy Anil S @ 2006-09-14 21:34 UTC (permalink / raw)
To: Linux IA64; +Cc: Linux Kernel, Systemtap
If the user-specified kprobe handler causes the page fault
when accessing user space address, fixup this fault since
do_page_fault() should not continue as the kprobe handler are
run with preemption disabled.
Please apply.
Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
---
arch/ia64/kernel/kprobes.c | 6 ++++++
1 file changed, 6 insertions(+)
Index: 2.6.18-rc6-git2/arch/ia64/kernel/kprobes.c
=================================--- 2.6.18-rc6-git2.orig/arch/ia64/kernel/kprobes.c
+++ 2.6.18-rc6-git2/arch/ia64/kernel/kprobes.c
@@ -768,6 +768,12 @@ static int __kprobes kprobes_fault_handl
*/
if (cur->fault_handler && cur->fault_handler(cur, regs, trapnr))
return 1;
+ /*
+ * In case the user-specified fault handler returned
+ * zero, try to fix up.
+ */
+ if (ia64_done_with_exception(regs))
+ return 1;
/*
* In case the user-specified fault handler returned
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-09-14 21:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-14 21:34 [PATCH] Kprobes - fixup the pagefault exception caused by probehandlers Keshavamurthy Anil S
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox