arm64: Implement branch predictor hardening for Falkor
authorShanker Donthineni <shankerd@codeaurora.org>
Fri, 5 Jan 2018 20:28:59 +0000 (14:28 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 19:22:54 +0000 (20:22 +0100)
commit9b26a45c34e40575e53287365be7571b9cda21ab
tree63085b5843ca9881b6cb627498da706a7f72a2e2
parent48993dfa1af8c719576a18c0e2ca1d611297e34e
arm64: Implement branch predictor hardening for Falkor

Commit ec82b567a74f upstream.

Falkor is susceptible to branch predictor aliasing and can
theoretically be attacked by malicious code. This patch
implements a mitigation for these attacks, preventing any
malicious entries from affecting other victim contexts.

Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org>
[will: fix label name when !CONFIG_KVM and remove references to MIDR_FALKOR]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/cpucaps.h
arch/arm64/include/asm/kvm_asm.h
arch/arm64/kernel/bpi.S
arch/arm64/kernel/cpu_errata.c
arch/arm64/kvm/hyp/entry.S
arch/arm64/kvm/hyp/switch.c