lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170830212852.75757c6ecdb600245555c75e@kernel.org>
Date:   Wed, 30 Aug 2017 21:28:52 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Li Bin <huawei.libin@...wei.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        <linux-kernel@...r.kernel.org>, Wang Nan <wangnan0@...wei.com>,
        <zhangmengting@...wei.com>
Subject: Re: [PATCH] perf probe: Fix kprobe blacklist checking condition

On Tue, 29 Aug 2017 20:57:23 +0800
Li Bin <huawei.libin@...wei.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@...nel.org>

Thanks!

BTW, should we use memory_contains() macro for this check too...

> 
> Signed-off-by: Li Bin <huawei.libin@...wei.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@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ