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]
Date:	Thu, 13 Sep 2012 17:25:58 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Robert Richter <robert.richter@....com>
Cc:	Arnaldo Carvalho de Melo <acme@...hat.com>,
	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH] perf record: Change error message on failure


* Robert Richter <robert.richter@....com> wrote:

> On 13.09.12 17:07:20, Ingo Molnar wrote:
> > 
> > * Robert Richter <robert.richter@....com> wrote:
> > 
> > > Only report
> > > 
> > >  No CONFIG_PERF_EVENTS=y kernel support configured?
> > > 
> > > if the syscall fails with ENOSYS. In other cases CONFIG_PERF_EVENTS is
> > > set and might confuse users. The default message is now:
> > > 
> > >  Not all events could be opened.
> > 
> > Indeed, and it would be nice to be even less passive-aggressive 
> > and figure out and display the exact error condition?
> 
> The complete error message shows the error condition and is like the
> following:
> 
>  # perf record -e cycles:ppk sleep 1
>  
>    Error: sys_perf_event_open() syscall returned with 22 (Invalid argument).  /bin/dmesg may provide additional information.
>  
>  Not all events could be opened.
>  sleep: Terminated

So in this case a better message would be something like:

    Error: sys_perf_event_open() syscall failed because the 'cycles:ppk' event could not be opened
    sleep: Terminated

The user is not interested in the dmesg details, nor in that the 
error code is 22 -EINVAL.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ