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:   Thu, 3 Nov 2022 13:33:28 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Ravi Bangoria <ravi.bangoria@....com>
Cc:     Naresh Kamboju <naresh.kamboju@...aro.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...hat.com>,
        linux-perf-users@...r.kernel.org,
        open list <linux-kernel@...r.kernel.org>,
        regressions@...ts.linux.dev, lkft-triage@...ts.linaro.org,
        Stephane Eranian <eranian@...gle.com>,
        Sandipan Das <sandipan.das@....com>
Subject: Re: Perf: BUG: kernel NULL pointer dereference, address:
 0000000000000198

On Thu, Nov 03, 2022 at 05:15:30PM +0530, Ravi Bangoria wrote:

> Sorry was distracted a bit. So, this seems to be happening because of
> race between amd_pmu_enable_all() and perf event NMI. Something like:
> 
>   amd_pmu_enable_all()
>   {
>       if (!test_bit(idx, cpuc->active_mask))
> 
>   --->/* perf NMI entry */
>       ...
>       x86_pmu_stop() {
>           __clear_bit(hwc->idx, cpuc->active_mask);
>           cpuc->events[hwc->idx] = NULL;
>       }
>       ...
>   <---/* perf NMI exit */
> 
>       amd_pmu_enable_event(cpuc->events[idx]);
>   }

Hmm, do you have more information? Something like that would require
calling amd_pmu_enable_all() while it is already active -- and that
seems suspect at first glance.

That is, you shouldn't be getting an NMI for @idx before
amd_pmu_enable_event().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ