aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/hibernate.c
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2020-09-18 11:54:33 +0100
committerWill Deacon <will@kernel.org>2020-09-29 16:08:16 +0100
commitc28762070ca651fe7a981b8f31d972c9b7d2c386 (patch)
tree907e7cdfc0461b55880ac1ecccc54e460797f219 /arch/arm64/kernel/hibernate.c
parentarm64: Move SSBD prctl() handler alongside other spectre mitigation code (diff)
downloadlinux-dev-c28762070ca651fe7a981b8f31d972c9b7d2c386.tar.xz
linux-dev-c28762070ca651fe7a981b8f31d972c9b7d2c386.zip
arm64: Rewrite Spectre-v4 mitigation code
Rewrite the Spectre-v4 mitigation handling code to follow the same approach as that taken by Spectre-v2. For now, report to KVM that the system is vulnerable (by forcing 'ssbd_state' to ARM64_SSBD_UNKNOWN), as this will be cleared up in subsequent steps. Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/hibernate.c')
-rw-r--r--arch/arm64/kernel/hibernate.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/arm64/kernel/hibernate.c b/arch/arm64/kernel/hibernate.c
index 68e14152d6e9..c7b00120dc3e 100644
--- a/arch/arm64/kernel/hibernate.c
+++ b/arch/arm64/kernel/hibernate.c
@@ -332,11 +332,7 @@ int swsusp_arch_suspend(void)
* mitigation off behind our back, let's set the state
* to what we expect it to be.
*/
- switch (arm64_get_ssbd_state()) {
- case ARM64_SSBD_FORCE_ENABLE:
- case ARM64_SSBD_KERNEL:
- arm64_set_ssbd_mitigation(true);
- }
+ spectre_v4_enable_mitigation(NULL);
}
local_daif_restore(flags);