summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/proton-pack.c
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2020-09-28 13:45:24 +0300
committerWill Deacon <will@kernel.org>2020-09-29 18:08:17 +0300
commit9ef2b48be9bba70ded9372fc81e678e707306060 (patch)
tree78ee8e1e33c1baf46d920331edfa1a7980316b78 /arch/arm64/kernel/proton-pack.c
parent31c84d6c9cde673b3866972552ec52e4c522b4fa (diff)
downloadlinux-9ef2b48be9bba70ded9372fc81e678e707306060.tar.xz
KVM: arm64: Allow patching EL2 vectors even with KASLR is not enabled
Patching the EL2 exception vectors is integral to the Spectre-v2 workaround, where it can be necessary to execute CPU-specific sequences to nobble the branch predictor before running the hypervisor text proper. Remove the dependency on CONFIG_RANDOMIZE_BASE and allow the EL2 vectors to be patched even when KASLR is not enabled. Fixes: 7a132017e7a5 ("KVM: arm64: Replace CONFIG_KVM_INDIRECT_VECTORS with CONFIG_RANDOMIZE_BASE") Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/202009221053.Jv1XsQUZ%lkp@intel.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/proton-pack.c')
-rw-r--r--arch/arm64/kernel/proton-pack.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c
index b1ea935fd948..1fbaa0240d4c 100644
--- a/arch/arm64/kernel/proton-pack.c
+++ b/arch/arm64/kernel/proton-pack.c
@@ -177,7 +177,6 @@ enum mitigation_state arm64_get_spectre_v2_state(void)
}
#ifdef CONFIG_KVM
-#ifdef CONFIG_RANDOMIZE_BASE
#include <asm/cacheflush.h>
#include <asm/kvm_asm.h>
@@ -235,7 +234,6 @@ static void install_bp_hardening_cb(bp_hardening_cb_t fn)
{
__this_cpu_write(bp_hardening_data.fn, fn);
}
-#endif /* CONFIG_RANDOMIZE_BASE */
#endif /* CONFIG_KVM */
static void call_smc_arch_workaround_1(void)