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, 08 May 2012 08:10:23 -0600
From:	David Ahern <dsahern@...il.com>
To:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
CC:	linux-kernel@...r.kernel.org, peterz@...radead.org
Subject: Re: [PATCH] perf record: fix fallback to cpu-clock on ppc

On 5/8/12 7:12 AM, Arnaldo Carvalho de Melo wrote:
> Em Mon, May 07, 2012 at 10:40:04PM -0600, David Ahern escreveu:
>> perf-record on PPC is not falling back to cpu-clock:
>>
>> Old kernel, cannot exclude guest or host samples.
>>
>>    Error: sys_perf_event_open() syscall returned with 6 (No such device or address).  /bin/dmesg may provide additional information.
>>
>>    Fatal: No CONFIG_PERF_EVENTS=y kernel support configured?
>>
>> The problem is that until 2.6.37 (behavior changed with commit b0a873e)
>> perf on PPC returns ENXIO when hw_perf_event_init() fails. With this
>> patch we get the expected behavior:
>>
>> Old kernel, cannot exclude guest or host samples.
>> The cycles event is not supported, trying to fall back to cpu-clock-ticks
>> [ perf record: Woken up 1 times to write data ]
>> [ perf record: Captured and wrote 0.150 MB /tmp/perf.data (~6569 samples) ]
>
> Would be good to have this documented on the spot, i.e. just before that
> if.
>
> Also, have you checked that 'perf stat' and 'perf top' works as well? We
> really need to move all this logic to a central place, namely
> perf_evlist__open().
>
> For now checking if stat and top ara ok should be enough.

perf-top works because it drops back to cpu-clock for any 
perf_event_open failure; perf-stat does not. Will fix it and add a 
comment about PPC and ENXIO errno to both.

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