Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752748AbdH2NEg (ORCPT ); Tue, 29 Aug 2017 09:04:36 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:5037 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751932AbdH2NEe (ORCPT ); Tue, 29 Aug 2017 09:04:34 -0400 From: Li Bin To: Peter Zijlstra , Namhyung Kim , Arnaldo Carvalho de Melo , Masami Hiramatsu CC: , Wang Nan , , Subject: [PATCH] perf probe: Fix kprobe blacklist checking condition Date: Tue, 29 Aug 2017 20:57:23 +0800 Message-ID: <1504011443-7269-1-git-send-email-huawei.libin@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0206.59A56660.00A1,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 672949a6494f308ce3a4acd759ad0adf Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 930 Lines: 27 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 --- 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