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: <87frcrz7ci.wl-maz@kernel.org>
Date: Fri, 12 Sep 2025 22:30:53 +0100
From: Marc Zyngier <maz@...nel.org>
To: Mark Brown <broonie@...nel.org>
Cc: Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will@...nel.org>,
	Oliver Upton <oliver.upton@...ux.dev>,
	Joey Gouly <joey.gouly@....com>,
	Suzuki K Poulose <suzuki.poulose@....com>,
	Shuah Khan <shuah@...nel.org>,
	linux-arm-kernel@...ts.infradead.org,
	linux-doc@...r.kernel.org,
	kvmarm@...ts.linux.dev,
	linux-kselftest@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v16 2/6] KVM: arm64: Manage GCS access and registers for guests

On Fri, 12 Sep 2025 17:33:36 +0100,
Mark Brown <broonie@...nel.org> wrote:
> 
> On Fri, Sep 12, 2025 at 12:59:23PM +0100, Marc Zyngier wrote:
> > On Fri, 12 Sep 2025 10:25:28 +0100,
> > Mark Brown <broonie@...nel.org> wrote:
> 
> > >  		MAPPED_EL2_SYSREG(PIR_EL2,     PIR_EL1,     NULL	     );
> > >  		MAPPED_EL2_SYSREG(PIRE0_EL2,   PIRE0_EL1,   NULL	     );
> > >  		MAPPED_EL2_SYSREG(POR_EL2,     POR_EL1,     NULL	     );
> > > +		MAPPED_EL2_SYSREG(GCSCR_EL2,   GCSCR_EL1,   NULL             );
> > > +		MAPPED_EL2_SYSREG(GCSPR_EL2,   GCSPR_EL1,   NULL             );
> > >  		MAPPED_EL2_SYSREG(AMAIR_EL2,   AMAIR_EL1,   NULL	     );
> > >  		MAPPED_EL2_SYSREG(ELR_EL2,     ELR_EL1,	    NULL	     );
> > >  		MAPPED_EL2_SYSREG(SPSR_EL2,    SPSR_EL1,    NULL	     );
> 
> > Just like the previous version, you're missing the accessors that
> > would be this table useful. Meaning that the vcpu_read_sys_reg() and
> > vcpu_write_sys_reg() accessors will fail for all 4 GSC registers.
> 
> Just to confirm, this is __vcpu_{read,write}_sysreg()?

No.

vcpu_{read,write}_sys_reg() and co are the broken high-level
accessors. __vcpu_{read,write}_sysreg() call into those depending on
the context, and __vcpu_{read,write}_sys_reg_{to,from}_cpu() have now
been removed and replaced by similar (but private) accessors.

See -rc4 for the details.

In any case, a bunch of register accesses in this series are broken,
as they don't respect the register life cycle of the guest.

	M.

-- 
Jazz isn't dead. It just smells funny.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ