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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170314133056.GE3089@kernel.org>
Date:   Tue, 14 Mar 2017 10:30:56 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Kefeng Wang <wangkefeng.wang@...wei.com>,
        linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Wang Nan <wangnan0@...wei.com>, guohanjun@...wei.com
Subject: Re: [PATCH] perf probe: Return errno when does not hit any event

Em Tue, Mar 14, 2017 at 09:19:47PM +0800, Kefeng Wang escreveu:
> Hi all, any comments, thanks.

For 'perf probe' make sure Masami is in the CC list, adding him, Masami?

- Arnaldo
 
> On 2017/3/7 15:33, Kefeng Wang wrote:
> > + Arnaldo Carvalho de Melo <acme@...nel.org>
> > 
> > On 2017/3/6 17:34, Kefeng Wang wrote:
> >> On old perf, when using perf probe -d to delete an inexistent event,
> >> it return errno, eg,
> >>
> >> -bash-4.3# perf probe -d xxx  || echo $?
> >> Info: Event "*:xxx" does not exist.
> >>   Error: Failed to delete events.
> >> 255
> >>
> >> But now perf_del_probe_events() will always set ret = 0, different
> >> from previous del_perf_probe_events(). After this, it return errno
> >> again, eg,
> >>
> >> -bash-4.3# ./perf probe -d xxx  || echo $?
> >>   Error: Failed to delete events.
> >> 254
> >>
> >> And it is more appropriate to return -ENOENT instead of -EPERM.
> >>
> >> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> >> ---
> >>  tools/perf/builtin-probe.c | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
> >> index 1fcebc3..c46b41c 100644
> >> --- a/tools/perf/builtin-probe.c
> >> +++ b/tools/perf/builtin-probe.c
> >> @@ -444,7 +444,8 @@ static int perf_del_probe_events(struct strfilter *filter)
> >>  	if (ret == -ENOENT && ret2 == -ENOENT)
> >>  		pr_debug("\"%s\" does not hit any event.\n", str);
> >>  		/* Note that this is silently ignored */
> >> -	ret = 0;
> >> +	else
> >> +		ret = 0;
> >>  
> >>  error:
> >>  	if (kfd >= 0)
> >>
> > 
> > 
> > .
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ