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: Mon, 3 Jun 2024 10:38:46 +0100
From: Mark Rutland <mark.rutland@....com>
To: Anshuman Khandual <anshuman.khandual@....com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	will@...nel.org, catalin.marinas@....com,
	Mark Brown <broonie@...nel.org>, James Clark <james.clark@....com>,
	Rob Herring <robh@...nel.org>, Marc Zyngier <maz@...nel.org>,
	Suzuki Poulose <suzuki.poulose@....com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	linux-perf-users@...r.kernel.org, Jonathan Corbet <corbet@....net>,
	Oliver Upton <oliver.upton@...ux.dev>, linux-doc@...r.kernel.org
Subject: Re: [PATCH V17 4/9] arm64/boot: Enable EL2 requirements for BRBE

On Mon, Jun 03, 2024 at 02:41:32PM +0530, Anshuman Khandual wrote:
> On 5/29/24 16:21, Mark Rutland wrote:
> > On Fri, Apr 05, 2024 at 08:16:34AM +0530, Anshuman Khandual wrote:

> >> +  For CPUs with feature Branch Record Buffer Extension (FEAT_BRBE):
> >> +
> >> +  - If the kernel is entered at EL2 and EL1 is present:
> >> +
> >> +    - BRBCR_EL1.CC (bit 3) must be initialised to 0b1.
> >> +    - BRBCR_EL1.MPRED (bit 4) must be initialised to 0b1.
> > 
> > IIUC this isn't necessary; if the kernel is entered at EL2, it's capable
> > of initializing the EL1 regs, and it doesn't look like this silently
> > affects something we'd need in the absence of a BRBE driver.
> 
> No, this does not affect anything other than the BRBE driver.

Ok.

> > AFAICT the __init_el2_brbe() code you add below handles this, so I think
> > this is redundant and can be deleted.
> 
> Did not understand the above. __init_el2_brbe() handles setting both BRBCR_EL2
> and BRBCR_EL1 for CC and MPRED config irrespective of whether the kernel enters
> EL2 directly or enters EL1 via EL2. But should not that be documented here for
> both those scenarios ? OR because once the kernel is in EL2, it can configure
> EL1 as required, so it is not a booting requirement anymore ?

The latter -- since the kernel can set this up, and only needs to do
that for the BRBE driver to work, this doesn't need to be a requiremnt
on FW/bootloader. So we can drop this when the kernel is booted at EL2.

Mark.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ