diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2019-02-12 11:14:37 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-02-13 02:16:40 -0500 |
commit | a39f15b9644fac3f950f522c39e667c3af25c588 (patch) | |
tree | cf7d2f958d62cae723b92904dfd2a6605cac6ef7 | |
parent | 984640ce427fa67c7c1f8550ab53495733bd11fc (diff) |
kprobes: Prohibit probing on RCU debug routine
Since kprobe itself depends on RCU, probing on RCU debug
routine can cause recursive breakpoint bugs.
Prohibit probing on RCU debug routines.
int3
->do_int3()
->ist_enter()
->RCU_LOCKDEP_WARN()
->debug_lockdep_rcu_enabled() -> int3
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andrea Righi <righi.andrea@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/154998807741.31052.11229157537816341591.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | kernel/rcu/update.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c index 1971869c4072..f4ca36d92138 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <linux/tick.h> | 52 | #include <linux/tick.h> |
53 | #include <linux/rcupdate_wait.h> | 53 | #include <linux/rcupdate_wait.h> |
54 | #include <linux/sched/isolation.h> | 54 | #include <linux/sched/isolation.h> |
55 | #include <linux/kprobes.h> | ||
55 | 56 | ||
56 | #define CREATE_TRACE_POINTS | 57 | #define CREATE_TRACE_POINTS |
57 | 58 | ||
@@ -249,6 +250,7 @@ int notrace debug_lockdep_rcu_enabled(void) | |||
249 | current->lockdep_recursion == 0; | 250 | current->lockdep_recursion == 0; |
250 | } | 251 | } |
251 | EXPORT_SYMBOL_GPL(debug_lockdep_rcu_enabled); | 252 | EXPORT_SYMBOL_GPL(debug_lockdep_rcu_enabled); |
253 | NOKPROBE_SYMBOL(debug_lockdep_rcu_enabled); | ||
252 | 254 | ||
253 | /** | 255 | /** |
254 | * rcu_read_lock_held() - might we be in RCU read-side critical section? | 256 | * rcu_read_lock_held() - might we be in RCU read-side critical section? |