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] [day] [month] [year] [list]
Message-ID: <YisKrFY6yBDmUu6b@kroah.com>
Date:   Fri, 11 Mar 2022 09:39:08 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Pavel Machek <pavel@...x.de>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Catalin Marinas <catalin.marinas@....com>,
        James Morse <james.morse@....com>
Subject: Re: [PATCH 5.16 29/37] arm64: entry: Add vectors that have the bhb
 mitigation sequences

On Fri, Mar 11, 2022 at 09:15:32AM +0100, Greg Kroah-Hartman wrote:
> On Fri, Mar 11, 2022 at 12:27:29AM +0100, Pavel Machek wrote:
> > Hi!
> > 
> > > From: James Morse <james.morse@....com>
> > > 
> > > commit ba2689234be92024e5635d30fe744f4853ad97db upstream.
> > > 
> > > Some CPUs affected by Spectre-BHB need a sequence of branches, or a
> > > firmware call to be run before any indirect branch. This needs to go
> > > in the vectors. No CPU needs both.
> > > 
> > > While this can be patched in, it would run on all CPUs as there is a
> > > single set of vectors. If only one part of a big/little combination is
> > > affected, the unaffected CPUs have to run the mitigation too.
> > 
> > This adds build error. Same problem is in 5.10.
> > 
> > > --- /dev/null
> > > +++ b/arch/arm64/include/asm/vectors.h
> > > @@ -0,0 +1,34 @@
> > ...
> > > +/*
> > > + * Note: the order of this enum corresponds to two arrays in entry.S:
> > > + * tramp_vecs and __bp_harden_el1_vectors. By default the canonical
> > > + * 'full fat' vectors are used directly.
> > > + */
> > > +enum arm64_bp_harden_el1_vectors {
> > > +#ifdef CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY
> > > +	/*
> > > +	 * Perform the BHB loop mitigation, before branching to the canonical
> > > +	 * vectors.
> > > +	 */
> > > +	EL1_VECTOR_BHB_LOOP,
> > > +
> > > +	/*
> > > +	 * Make the SMC call for firmware mitigation, before branching to the
> > > +	 * canonical vectors.
> > > +	 */
> > > +	EL1_VECTOR_BHB_FW,
> > > +#endif /* CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY */
> > > +
> > > +	/*
> > > +	 * Remap the kernel before branching to the canonical vectors.
> > > +	 */
> > > +	EL1_VECTOR_KPTI,
> > > ++};
> > > +
> > 
> > 
> > Note "++". Following patch fixes this up, but it is still a trap for
> > people trying to bisect.
> 
> Ick, ok, will try to fix up, thanks for finding this.

Now fixed up for 5.16.y, 5.15.y, and 5.10.y, thanks.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ