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]
Message-ID: <20251008165058.lcwiapdnar6hvw3b@hu-mojha-hyd.qualcomm.com>
Date: Wed, 8 Oct 2025 22:20:58 +0530
From: Mukesh Ojha <mukesh.ojha@....qualcomm.com>
To: Leo Yan <leo.yan@....com>
Cc: Marc Zyngier <maz@...nel.org>, Oliver Upton <oliver.upton@...ux.dev>,
        joey.gouly@....com, suzuki.poulose@....com, yuzenghui@...wei.com,
        catalin.marinas@....com, will@...nel.org, alexandru.elisei@....com,
        linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: arm64: Check cpu_has_spe() before initializing
 PMSCR_EL1 in VHE

On Wed, Oct 08, 2025 at 01:40:40PM +0100, Leo Yan wrote:
> On Wed, Oct 08, 2025 at 11:46:55AM +0100, Marc Zyngier wrote:
> 
> [...]
> 
> > > > Lets guard the change with cpu_has_spe() check so that it only affects
> > > > the cpu which has SPE feature supported.
> > > 
> > > This could benefit from being spelled out a bit more. In both cases we
> > > check for the presence of FEAT_SPE, however I believe the issue you
> > > observe is EL3 hasn't delegated ownership of the Profiling Buffer to
> > > Non-secure nor does it reinject an UNDEF in response to the sysreg trap.
> > > 
> > > I agree that the change is correct but the rationale needs to be clear.
> > 
> > To me, this smells a lot more like some sort of papering over a
> > firmware bug. Why isn't SPE available the first place?
> 
> TF-a grants permission to non-secure world [1], only access from secure
> world or realm will trap to EL3.
> 
> So yes, it would be good to check if any issue in firmware.

We have our own implementation of EL3 and not using TF-A.

I believe, we should check in a similar way as we are doing for nVHE
case.

if (host_data_test_flag(HAS_SPE))
	write_sysreg_el1(0, SYS_PMSCR);

> 
> Thanks,
> Leo
> 
> [1] https://git.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a.git/+/refs/heads/master/lib/extensions/spe/spe.c#52

-- 
-Mukesh Ojha

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ