lkml.org 
[lkml]   [2006]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Kprobes - fixup the pagefault exception caused by probehandlers
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-09-14 23:53    [W:0.023 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site