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-next>] [day] [month] [year] [list]
Date:	Fri, 22 Apr 2016 13:25:23 +0000
From:	Lada Trimasova <Lada.Trimasova@...opsys.com>
To:	"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"peterz@...radead.org" <peterz@...radead.org>,
	Alexey Brodkin <Alexey.Brodkin@...opsys.com>,
	"linux-snps-arc@...ts.infradead.org" 
	<linux-snps-arc@...ts.infradead.org>
Subject: Misleading hint to select CONFIG_PERF_EVENTS if driver sets
 PERF_PMU_CAP_NO_INTERRUPT

I have a question about user-space perf handling error numbers.
The problem is that PMU interrupts are not supported in arc700
architecture and it is impossible to evaluate `perf record` command.
In our perf implementation we set PERF_PMU_CAP_NO_INTERRUPT flag so
core perf infrastructure knows we don't have interrupts.

Kernel `sys_perf_event_open` handler checks if PMU interrupts are
supported and returns ENOTSUPP (524) error code.
I'd expect that perf implementation checks the return value of syscalls
and gives the user understandable error message.
But now I see:
--------------------------------->8-----------------------------------
# perf record ls
The sys_perf_event_open() syscall returned with 524 (Unknown error 524)
for event (cycles:ppp).
/bin/dmesg may provide additional information.
No CONFIG_PERF_EVENTS=y kernel support configured?
--------------------------------->8-----------------------------------

As you can see the root cause of this error message is not obvious.
CONFIG_PERF_EVENTS is selected but still there's a problem while
existing suggestion barely makes any sense.
So probably there could be a way to determine if CONFIG_PERF_EVENTS was
selected or not.

I am not sure about the correct way of solving this problem. Maybe I
should add some checks of syscalls return values and give user
a warning when not PMU interrupts are available. 
Any suggestions are appreciated.

Regards,
Lada Trimasova.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ