This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH -tip v5 04/18] [BUGFIX] x86: Prohibit probing on native_set_debugreg
- From: Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>
- To: Ingo Molnar <mingo at kernel dot org>
- Cc: linux-arch at vger dot kernel dot org, Jeremy Fitzhardinge <jeremy at goop dot org>, Rusty Russell <rusty at rustcorp dot com dot au>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Sandeepa Prabhu <sandeepa dot prabhu at linaro dot org>, x86 at kernel dot org, lkml <linux-kernel at vger dot kernel dot org>, "Steven Rostedt (Red Hat)" <rostedt at goodmis dot org>, Chris Wright <chrisw at sous-sol dot org>, Ingo Molnar <mingo at redhat dot com>, Thomas Gleixner <tglx at linutronix dot de>, systemtap at sourceware dot org, "H. Peter Anvin" <hpa at zytor dot com>, Alok Kataria <akataria at vmware dot com>, "David S. Miller" <davem at davemloft dot net>
- Date: Mon, 09 Dec 2013 10:47:27 +0000
- Subject: [PATCH -tip v5 04/18] [BUGFIX] x86: Prohibit probing on native_set_debugreg
- Authentication-results: sourceware.org; auth=none
- References: <20131209104717 dot 13397 dot 8864 dot stgit at kbuild-fedora dot novalocal>
Since the kprobes uses do_debug for single stepping,
functions called from do_debug before notify_die must
not be probed. This prohibits probing on
native_set_debugreg which is used in do_debug.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Alok Kataria <akataria@vmware.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
arch/x86/kernel/paravirt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index 4c785fd..108e685 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -390,8 +390,9 @@ __visible struct pv_cpu_ops pv_cpu_ops = {
.end_context_switch = paravirt_nop,
};
-/* At this point, native_get_debugreg has real function entry */
+/* At this point, native_get/set_debugreg has real function entry */
NOKPROBE_SYMBOL(native_get_debugreg);
+NOKPROBE_SYMBOL(native_set_debugreg);
struct pv_apic_ops pv_apic_ops = {
#ifdef CONFIG_X86_LOCAL_APIC