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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 11 Sep 2012 17:11:52 +0200
From:	Robert Richter <robert.richter@....com>
To:	David Ahern <dsahern@...il.com>
CC:	<acme@...stprotocols.net>, <linux-kernel@...r.kernel.org>,
	<peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH 3/3] perf tool: give user better message if precise is
 not supported

On 11.09.12 08:32:55, David Ahern wrote:
> My guess would be /usr/include/bits/errno.h:
> 
> /* Linux has no ENOTSUP error code.  */
> # define ENOTSUP EOPNOTSUPP

Ok, so ENOTSUP is actually the same as EOPNOTSUPP. Since the syscall
returns a EOPNOTSUPP, I prefer this when checking perf_event_open()
return codes. ENOTSUP is not used in the kernel. Was there a reason
for choosing ENOTSUP?

> > If you run this bare-metal on older machines which do not support pebs
> > or ibs, the syscall returns EOPNOTSUPP. You can trigger the same
> > behaviour on newer systems with:
> >
> >   # perf record -e cycles:ppp -c 2097120 -R -a sleep 1
> >
> >     Error: sys_perf_event_open() syscall returned with 95 (Operation not supported).  /bin/dmesg may provide additional information.
> >   ...
> >
> > It should work in this case too.
> 
> The commit message was a copy and paste from the failure of both :p in a 
> VM (PEBS is not supported in a VM). I also ran the bare metal case with 
> :pG which per the second patch in this series generates the not 
> supported message.

Since the error codes are the same, your code should work also on
bare-metal. Can you test on a host using :ppp? This should trigger the
same error message as in a vm.

Thanks,

-Robert


-- 
Advanced Micro Devices, Inc.
Operating System Research Center

--
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