Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751737AbdH3M3A (ORCPT ); Wed, 30 Aug 2017 08:29:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:47270 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751581AbdH3M27 (ORCPT ); Wed, 30 Aug 2017 08:28:59 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1ECB62199C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org Date: Wed, 30 Aug 2017 21:28:52 +0900 From: Masami Hiramatsu To: Li Bin Cc: Peter Zijlstra , Namhyung Kim , Arnaldo Carvalho de Melo , , Wang Nan , Subject: Re: [PATCH] perf probe: Fix kprobe blacklist checking condition Message-Id: <20170830212852.75757c6ecdb600245555c75e@kernel.org> In-Reply-To: <1504011443-7269-1-git-send-email-huawei.libin@huawei.com> References: <1504011443-7269-1-git-send-email-huawei.libin@huawei.com> X-Mailer: Sylpheed 3.5.0 (GTK+ 2.24.30; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1248 Lines: 44 On Tue, 29 Aug 2017 20:57:23 +0800 Li Bin wrote: > 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. Oops, right. Acked-by: Masami Hiramatsu Thanks! BTW, should we use memory_contains() macro for this check too... > > 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 > -- Masami Hiramatsu