From: tip-bot for Andrea Righi <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: alexander.shishkin@linux.intel.com, peterz@infradead.org,
righi.andrea@gmail.com, linux-kernel@vger.kernel.org,
mingo@kernel.org, mhiramat@kernel.org,
torvalds@linux-foundation.org, jolsa@redhat.com,
rostedt@goodmis.org, mathieu.desnoyers@efficios.com,
tglx@linutronix.de, acme@redhat.com, hpa@zytor.com
Subject: [tip:perf/core] kprobes: Prohibit probing on bsearch()
Date: Wed, 13 Feb 2019 01:04:30 -0800 [thread overview]
Message-ID: <tip-02106f883cd745523f7766d90a739f983f19e650@git.kernel.org> (raw)
In-Reply-To: <154998813406.31052.8791425358974650922.stgit@devbox>
Commit-ID: 02106f883cd745523f7766d90a739f983f19e650
Gitweb: https://git.kernel.org/tip/02106f883cd745523f7766d90a739f983f19e650
Author: Andrea Righi <righi.andrea@gmail.com>
AuthorDate: Wed, 13 Feb 2019 01:15:34 +0900
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 13 Feb 2019 08:16:41 +0100
kprobes: Prohibit probing on bsearch()
Since kprobe breakpoing handler is using bsearch(), probing on this
routine can cause recursive breakpoint problem.
int3
->do_int3()
->ftrace_int3_handler()
->ftrace_location()
->ftrace_location_range()
->bsearch() -> int3
Prohibit probing on bsearch().
Signed-off-by: Andrea Righi <righi.andrea@gmail.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.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/154998813406.31052.8791425358974650922.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
lib/bsearch.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/bsearch.c b/lib/bsearch.c
index 18b445b010c3..82512fe7b33c 100644
--- a/lib/bsearch.c
+++ b/lib/bsearch.c
@@ -11,6 +11,7 @@
#include <linux/export.h>
#include <linux/bsearch.h>
+#include <linux/kprobes.h>
/*
* bsearch - binary search an array of elements
@@ -53,3 +54,4 @@ void *bsearch(const void *key, const void *base, size_t num, size_t size,
return NULL;
}
EXPORT_SYMBOL(bsearch);
+NOKPROBE_SYMBOL(bsearch);
prev parent reply other threads:[~2019-02-13 9:05 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-12 16:10 [PATCH -tip v3 00/10] kprobes: Fix and improve blacklist symbols Masami Hiramatsu
2019-02-12 16:11 ` [PATCH -tip v3 01/10] x86/kprobes: Prohibit probing on optprobe template code Masami Hiramatsu
2019-02-13 8:58 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2019-02-12 16:11 ` [PATCH -tip v3 02/10] x86/kprobes: Move trampoline code into RODATA Masami Hiramatsu
2019-02-13 8:59 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2019-02-12 16:12 ` [PATCH -tip v3 03/10] x86/kprobes: Prohibit probing on functions before kprobe_int3_handler() Masami Hiramatsu
2019-02-13 9:00 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2019-02-12 16:12 ` [PATCH -tip v3 04/10] x86/kprobes: Prohibit probing on IRQ handlers directly Masami Hiramatsu
2019-02-13 9:00 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2019-03-25 21:23 ` [PATCH -tip v3 04/10] " Steven Rostedt
2019-03-26 14:50 ` Masami Hiramatsu
2019-03-26 15:17 ` Andrea Righi
2019-02-12 16:13 ` [PATCH -tip v3 05/10] kprobes: Search non-suffixed symbol in blacklist Masami Hiramatsu
2019-02-13 7:13 ` Ingo Molnar
2019-02-13 7:17 ` Ingo Molnar
2019-02-13 13:43 ` Steven Rostedt
2019-02-13 23:44 ` Masami Hiramatsu
2019-02-13 9:01 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2019-02-12 16:13 ` [PATCH -tip v3 06/10] kprobes: Prohibit probing on hardirq tracers Masami Hiramatsu
2019-02-13 9:02 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2019-02-12 16:14 ` [PATCH -tip v3 07/10] kprobes: Prohibit probing on preempt_check debug functions Masami Hiramatsu
2019-02-13 9:02 ` [tip:perf/core] kprobes: Prohibit probing on preemption checking " tip-bot for Masami Hiramatsu
2019-02-12 16:14 ` [PATCH -tip v3 08/10] kprobes: Prohibit probing on RCU debug routine Masami Hiramatsu
2019-02-13 9:03 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2019-02-12 16:15 ` [PATCH -tip v3 09/10] kprobes: Prohibit probing on lockdep functions Masami Hiramatsu
2019-02-13 9:03 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2019-02-12 16:15 ` [PATCH -tip v3 10/10] kprobes: Prohibit probing on bsearch() Masami Hiramatsu
2019-02-13 9:04 ` tip-bot for Andrea Righi [this message]
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=tip-02106f883cd745523f7766d90a739f983f19e650@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=righi.andrea@gmail.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).