From mboxrd@z Thu Jan 1 00:00:00 1970 From: Masami Hiramatsu Subject: [PATCH -tip v3 20/23] [BUGFIX] kprobes: Prohibit probing on func_ptr_is_kernel_text Date: Wed, 20 Nov 2013 04:22:38 +0000 Message-ID: <20131120042238.15296.41605.stgit@kbuild-fedora.novalocal> References: <20131120042148.15296.88360.stgit@kbuild-fedora.novalocal> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail9.hitachi.co.jp ([133.145.228.44]:60106 "EHLO mail9.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753198Ab3KTEWn (ORCPT ); Tue, 19 Nov 2013 23:22:43 -0500 In-Reply-To: <20131120042148.15296.88360.stgit@kbuild-fedora.novalocal> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Ingo Molnar Cc: linux-arch@vger.kernel.org, Ananth N Mavinakayanahalli , Sandeepa Prabhu , x86@kernel.org, lkml , "Steven Rostedt (Red Hat)" , virtualization@lists.linux-foundation.org, systemtap@sourceware.org, Uwe =?utf-8?q?Kleine-K=C3=B6nig?= , Andrew Morton , Borislav Petkov , "David S. Miller" Prohibit probing on func_ptr_is_kernel_text() by adding it to the kprobe_blacklist. Since the func_ptr_is_kernel_text() is called from notifier_call_chain() which is called from int3 handler, probing it may cause double int3 fault and kernel will reboot. This happenes when the kernel built with CONFIG_DEBUG_NOTIFIERS=3Dy. Signed-off-by: Masami Hiramatsu Cc: Andrew Morton Cc: "Uwe Kleine-K=C3=B6nig" Cc: Borislav Petkov Cc: Ingo Molnar --- kernel/extable.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/extable.c b/kernel/extable.c index 832cb28..885c877 100644 --- a/kernel/extable.c +++ b/kernel/extable.c @@ -20,6 +20,7 @@ #include #include #include +#include =20 #include #include @@ -137,3 +138,4 @@ int func_ptr_is_kernel_text(void *ptr) return 1; return is_module_text_address(addr); } +NOKPROBE_SYMBOL(func_ptr_is_kernel_text);