lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 13 Feb 2019 01:02:39 -0800
From:   tip-bot for Masami Hiramatsu <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mingo@...nel.org, righi.andrea@...il.com,
        torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
        mhiramat@...nel.org, tglx@...utronix.de,
        alexander.shishkin@...ux.intel.com, mathieu.desnoyers@...icios.com,
        acme@...hat.com, peterz@...radead.org, rostedt@...dmis.org,
        hpa@...or.com, jolsa@...hat.com
Subject: [tip:perf/core] kprobes: Prohibit probing on preemption checking
 debug functions

Commit-ID:  984640ce427fa67c7c1f8550ab53495733bd11fc
Gitweb:     https://git.kernel.org/tip/984640ce427fa67c7c1f8550ab53495733bd11fc
Author:     Masami Hiramatsu <mhiramat@...nel.org>
AuthorDate: Wed, 13 Feb 2019 01:14:09 +0900
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 13 Feb 2019 08:16:40 +0100

kprobes: Prohibit probing on preemption checking debug functions

Since kprobes depends on preempt disable/enable, probing
on the preempt debug routines can cause recursive breakpoint
bugs.

Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Andrea Righi <righi.andrea@...il.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/154998804911.31052.3541963527929117920.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 lib/smp_processor_id.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
index 85925aaa4fff..157d9e31f6c2 100644
--- a/lib/smp_processor_id.c
+++ b/lib/smp_processor_id.c
@@ -5,10 +5,11 @@
  * DEBUG_PREEMPT variant of smp_processor_id().
  */
 #include <linux/export.h>
+#include <linux/kprobes.h>
 #include <linux/sched.h>
 
-notrace static unsigned int check_preemption_disabled(const char *what1,
-							const char *what2)
+notrace static nokprobe_inline
+unsigned int check_preemption_disabled(const char *what1, const char *what2)
 {
 	int this_cpu = raw_smp_processor_id();
 
@@ -56,9 +57,11 @@ notrace unsigned int debug_smp_processor_id(void)
 	return check_preemption_disabled("smp_processor_id", "");
 }
 EXPORT_SYMBOL(debug_smp_processor_id);
+NOKPROBE_SYMBOL(debug_smp_processor_id);
 
 notrace void __this_cpu_preempt_check(const char *op)
 {
 	check_preemption_disabled("__this_cpu_", op);
 }
 EXPORT_SYMBOL(__this_cpu_preempt_check);
+NOKPROBE_SYMBOL(__this_cpu_preempt_check);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ