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:   Wed, 13 Feb 2019 14:26:25 -0700
From:   Mathieu Poirier <mathieu.poirier@...aro.org>
To:     Mark Rutland <mark.rutland@....com>,
        Peter Zijlstra <peterz@...radead.org>, julien.thierry@....com
Cc:     Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Leo Yan <leo.yan@...aro.org>, Ingo Molnar <mingo@...nel.org>,
        Coresight ML <coresight@...ts.linaro.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [v5.0-rc6 regression] "perf/core: Don't WARN() for impossible
 ring-buffer sizes"

Hi Mark,

CoreSight trace collection is broken on v5.0-rc6 due to this commit:

9dff0aa95a32 perf/core: Don't WARN() for impossible ring-buffer sizes

Before:
root@...o:/home/linaro# perf record -e cs_etm/@...70000.etr/u
--per-thread  uname
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.036 MB perf.data ]
root@...o:/home/linaro#

After:
root@...o:/home/linaro# perf record -e cs_etm/@...70000.etr/u
--per-thread  uname
failed to mmap with 12 (Cannot allocate memory)
root@...o:/home/linaro#

The problem is related to the order_base_2() [1] test with a size of
1264, stemming from nr_pages equal to 128.  The combination yields an
order of 11, something leading directly to the error path.

The results are the same with linux-next 20190213.  This was tested on
a Juno R0 and R1 with a 4K page configuration.  I haven't tried but
I'm pretty sure it breaks IntelPT as well.

Please have a look when you have a minute.  Leo Yan and I will be
happy to test patches.

Thanks,
Mathieu

[1].  https://elixir.bootlin.com/linux/v5.0-rc6/source/kernel/events/ring_buffer.c#L737

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ