All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Ingo Molnar <mingo@redhat.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	peterz@infradead.org,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Andrea Righi <righi.andrea@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH v2 8/9] kprobes: Prohibit probing on RCU debug routine
Date: Sat, 12 Jan 2019 11:29:27 +0900	[thread overview]
Message-ID: <154726016731.18060.5873805314873726998.stgit@devbox> (raw)
In-Reply-To: <154725993986.18060.2759150647140353514.stgit@devbox>

Since kprobe itself depends on RCU, probing on RCU debug
routine can cause recursive breakpoint problem.
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>
---
 kernel/rcu/update.c |    2 ++
 1 file changed, 2 insertions(+)

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 @@
 #include <linux/tick.h>
 #include <linux/rcupdate_wait.h>
 #include <linux/sched/isolation.h>
+#include <linux/kprobes.h>
 
 #define CREATE_TRACE_POINTS
 
@@ -249,6 +250,7 @@ int notrace debug_lockdep_rcu_enabled(void)
 	       current->lockdep_recursion == 0;
 }
 EXPORT_SYMBOL_GPL(debug_lockdep_rcu_enabled);
+NOKPROBE_SYMBOL(debug_lockdep_rcu_enabled);
 
 /**
  * rcu_read_lock_held() - might we be in RCU read-side critical section?


  parent reply	other threads:[~2019-01-12  2:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-12  2:25 [PATCH v2 0/9] kprobes: Fix and improve blacklist symbols Masami Hiramatsu
2019-01-12  2:26 ` [PATCH v2 1/9] x86/kprobes: Prohibit probing on optprobe template code Masami Hiramatsu
     [not found]   ` <20190116133559.8FBCB2082F@mail.kernel.org>
2019-01-22  9:41     ` Masami Hiramatsu
2019-01-12  2:26 ` [PATCH v2 2/9] x86/kprobes: Move trampoline code into RODATA Masami Hiramatsu
2019-01-12  2:27 ` [PATCH v2 3/9] x86/kprobes: Prohibit probing on functions before kprobe_int3_handler() Masami Hiramatsu
2019-01-12  2:27 ` [PATCH v2 4/9] x86/kprobes: Prohibit probing on IRQ handlers directly Masami Hiramatsu
2019-01-12  2:28 ` [PATCH v2 5/9] kprobes: Search non-suffixed symbol in blacklist Masami Hiramatsu
2019-01-14 16:16   ` Steven Rostedt
2019-01-12  2:28 ` [PATCH v2 6/9] kprobes: Prohibit probing on hardirq tracers Masami Hiramatsu
2019-01-12  2:28 ` [PATCH v2 7/9] kprobes: Prohibit probing on preempt_check debug functions Masami Hiramatsu
2019-01-12  2:29 ` Masami Hiramatsu [this message]
2019-01-12  2:29 ` [PATCH v2 9/9] kprobes: Prohibit probing on lockdep functions Masami Hiramatsu
2019-01-12 13:33 ` [PATCH v2 0/9] kprobes: Fix and improve blacklist symbols Andrea Righi
2019-01-13 14:23   ` Masami Hiramatsu
2019-01-14 16:18 ` Steven Rostedt
2019-02-01 13:31   ` Masami Hiramatsu
2019-02-11 13:50     ` Ingo Molnar
2019-02-12 16:48       ` Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=154726016731.18060.5873805314873726998.stgit@devbox \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=righi.andrea@gmail.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.