public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf probe: Fix kprobe blacklist checking condition
@ 2017-08-29 12:57 Li Bin
  2017-08-29 14:51 ` Arnaldo Carvalho de Melo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Li Bin @ 2017-08-29 12:57 UTC (permalink / raw)
  To: Peter Zijlstra, Namhyung Kim, Arnaldo Carvalho de Melo,
	Masami Hiramatsu
  Cc: linux-kernel, Wang Nan, huawei.libin, zhangmengting

The commit 9aaf5a5("perf probe: Check kprobes blacklist
when adding new events"), perf probe supports checking
the blacklist of the fuctions which can not be probed.
But the checking condition is wrong, that the end_addr
of the symbol which is the start_addr of the next symbol
can't be included.

Signed-off-by: Li Bin <huawei.libin@huawei.com>
---
 tools/perf/util/probe-event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index a2670e9..bf7c928 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -2373,7 +2373,7 @@ static int kprobe_blacklist__load(struct list_head *blacklist)
 	struct kprobe_blacklist_node *node;
 
 	list_for_each_entry(node, blacklist, list) {
-		if (node->start <= address && address <= node->end)
+		if (node->start <= address && address < node->end)
 			return node;
 	}
 
-- 
1.7.12.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-30 12:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-29 12:57 [PATCH] perf probe: Fix kprobe blacklist checking condition Li Bin
2017-08-29 14:51 ` Arnaldo Carvalho de Melo
2017-08-29 21:25 ` [tip:perf/core] " tip-bot for Li Bin
2017-08-30 12:28 ` [PATCH] " Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox