From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755536Ab3LDBfO (ORCPT ); Tue, 3 Dec 2013 20:35:14 -0500 Received: from mail9.hitachi.co.jp ([133.145.228.44]:41253 "EHLO mail9.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755079Ab3LDBee (ORCPT ); Tue, 3 Dec 2013 20:34:34 -0500 Subject: [PATCH -tip v4 4/6] [BUGFIX] x86: Prohibit probing on native_set_debugreg To: Ingo Molnar From: Masami Hiramatsu Cc: Jeremy Fitzhardinge , Rusty Russell , Ananth N Mavinakayanahalli , Sandeepa Prabhu , x86@kernel.org, lkml , "Steven Rostedt (Red Hat)" , Chris Wright , Ingo Molnar , Thomas Gleixner , systemtap@sourceware.org, "H. Peter Anvin" , Alok Kataria , "David S. Miller" Date: Wed, 04 Dec 2013 01:28:51 +0000 Message-ID: <20131204012851.22118.90551.stgit@kbuild-fedora.novalocal> In-Reply-To: <20131204012841.22118.82992.stgit@kbuild-fedora.novalocal> References: <20131204012841.22118.82992.stgit@kbuild-fedora.novalocal> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Jeremy Fitzhardinge Cc: Chris Wright Cc: Alok Kataria Cc: Rusty Russell Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" --- 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