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, 9 Jun 2022 12:36:50 +0100
From:   Robin Murphy <robin.murphy@....com>
To:     Srinivasarao Pathipati <quic_c_spathi@...cinc.com>,
        Will Deacon <will@...nel.org>
Cc:     mark.rutland@....com, peterz@...radead.org, mingo@...hat.com,
        acme@...nel.org, alexander.shishkin@...ux.intel.com,
        jolsa@...nel.org, namhyung@...nel.org, catalin.marinas@....com,
        linux-arm-kernel@...ts.infradead.org,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V5] arm64: perf: Make exporting of pmu events configurable

On 2022-06-09 11:35, Srinivasarao Pathipati wrote:
> On our Qualcomm platforms, The X bit is getting set by firmware at early 
> bootup for Qualcomm use cases
> and non-secure world is resetting it, that causing issue.

I think you're going to have to clarify what exactly this "issue" is if 
we're ever going to make sense of it...

I can't imagine that export from a disabled PMU would matter much, so my 
best guess is that EL2 firmware has reserved some counters via 
MDCR_EL2.HPMN which it's using to monitor the Non-Secure boot; if that 
also depends on PMCR.X remaining set, then as far as I can see it's 
really the firmware's own stupid fault for not using MDCR_EL2.TPMCR to 
prevent Linux from messing with its configuration. Or maybe something in 
the Secure world is trying to use the PMU independently and it's an EL3 
bug where PMCR_EL0 isn't being context-switched properly?

Robin.

> On 6/9/2022 3:32 PM, Will Deacon wrote:
>> On Mon, May 23, 2022 at 05:19:34PM +0530, Srinivasarao Pathipati wrote:
>>> The PMU export bit (PMCR_EL0.X) is getting reset during pmu reset,
>>> Make is configurable using sysctls to enable/disable at runtime.
>>> It can also be enabled at early bootup with kernel arguments.
>>>
>>> Signed-off-by: Srinivasarao Pathipati <quic_c_spathi@...cinc.com>
>>> ---
>>> Changes since V4:
>>>     - Registering sysctls dynamically for only arm64 as suggested by 
>>> Will
>>>     - Not removed the code to configure with kernel parameters
>>>       as the sysctl's kernel parameter(sysctl.kernel.export_pmu_events)
>>>       is not working at early bootup. pmu_reset() getting called before
>>>       sysctl's kernel parameter is set.
>> Why do you need this during early bootup? Perf won't program any events
>> until much later and if somebody else is configuring the PMU before
>> entering Linux then they can also set that X bit in the PMCR.
>>
>> Will
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ