[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220310232729.GA16308@amd>
Date: Fri, 11 Mar 2022 00:27:29 +0100
From: Pavel Machek <pavel@...x.de>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
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
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.
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists