]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: entry: Add vectors that have the bhb mitigation sequences
authorJames Morse <james.morse@arm.com>
Fri, 18 Mar 2022 17:48:34 +0000 (17:48 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Mar 2022 08:10:43 +0000 (09:10 +0100)
commit91429ed04ebe9dbec88f97c6fd136b722bc3f3c5
treeedb9b99a200cb9e398087a53bcfc8353ff858776
parent901c0a20aa94d09a9328899e2dd69a8d43a3a920
arm64: entry: Add vectors that have the bhb mitigation sequences

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.

Create extra vectors that include the sequence. Subsequent patches will
allow affected CPUs to select this set of vectors. Later patches will
modify the loop count to match what the CPU requires.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/assembler.h
arch/arm64/include/asm/vectors.h [new file with mode: 0644]
arch/arm64/kernel/entry.S
include/linux/arm-smccc.h