From: Masami Hiramatsu <mhiramat@kernel.org>
To: Li Bin <huawei.libin@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
<linux-kernel@vger.kernel.org>, Wang Nan <wangnan0@huawei.com>,
<zhangmengting@huawei.com>
Subject: Re: [PATCH] perf probe: Fix kprobe blacklist checking condition
Date: Wed, 30 Aug 2017 21:28:52 +0900 [thread overview]
Message-ID: <20170830212852.75757c6ecdb600245555c75e@kernel.org> (raw)
In-Reply-To: <1504011443-7269-1-git-send-email-huawei.libin@huawei.com>
On Tue, 29 Aug 2017 20:57:23 +0800
Li Bin <huawei.libin@huawei.com> 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 <mhiramat@kernel.org>
Thanks!
BTW, should we use memory_contains() macro for this check too...
>
> 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
>
--
Masami Hiramatsu <mhiramat@kernel.org>
prev parent reply other threads:[~2017-08-30 12:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Masami Hiramatsu [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=20170830212852.75757c6ecdb600245555c75e@kernel.org \
--to=mhiramat@kernel.org \
--cc=acme@kernel.org \
--cc=huawei.libin@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=wangnan0@huawei.com \
--cc=zhangmengting@huawei.com \
/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