From: Keshavamurthy Anil S <anil.s.keshavamurthy@intel.com>
To: Linux IA64 <linux-ia64@vger.kernel.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Systemtap <systemtap@sources.redhat.com>
Subject: [PATCH] Kprobes - fixup the pagefault exception caused by probehandlers
Date: Thu, 14 Sep 2006 21:34:34 +0000 [thread overview]
Message-ID: <20060914143433.B30207@unix-os.sc.intel.com> (raw)
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
reply other threads:[~2006-09-14 21:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060914143433.B30207@unix-os.sc.intel.com \
--to=anil.s.keshavamurthy@intel.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=systemtap@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox