summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/entry-common.h
diff options
context:
space:
mode:
authorPawan Gupta <pawan.kumar.gupta@linux.intel.com>2024-02-13 18:22:24 -0800
committerDave Hansen <dave.hansen@linux.intel.com>2024-02-19 16:31:49 -0800
commit6613d82e617dd7eb8b0c40b2fe3acea655b1d611 (patch)
tree12b811a5b6d4013fea0cc31bc2f79036bd0d138d /arch/x86/include/asm/entry-common.h
parenta0e2dab44d22b913b4c228c8b52b2a104434b0b3 (diff)
downloadlinux-6613d82e617dd7eb8b0c40b2fe3acea655b1d611.tar.gz
linux-6613d82e617dd7eb8b0c40b2fe3acea655b1d611.tar.bz2
linux-6613d82e617dd7eb8b0c40b2fe3acea655b1d611.zip
x86/bugs: Use ALTERNATIVE() instead of mds_user_clear static key
The VERW mitigation at exit-to-user is enabled via a static branch mds_user_clear. This static branch is never toggled after boot, and can be safely replaced with an ALTERNATIVE() which is convenient to use in asm. Switch to ALTERNATIVE() to use the VERW mitigation late in exit-to-user path. Also remove the now redundant VERW in exc_nmi() and arch_exit_to_user_mode(). Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/all/20240213-delay-verw-v8-4-a6216d83edb7%40linux.intel.com
Diffstat (limited to 'arch/x86/include/asm/entry-common.h')
-rw-r--r--arch/x86/include/asm/entry-common.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/x86/include/asm/entry-common.h b/arch/x86/include/asm/entry-common.h
index ce8f50192ae3..7e523bb3d2d3 100644
--- a/arch/x86/include/asm/entry-common.h
+++ b/arch/x86/include/asm/entry-common.h
@@ -91,7 +91,6 @@ static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs,
static __always_inline void arch_exit_to_user_mode(void)
{
- mds_user_clear_cpu_buffers();
amd_clear_divider();
}
#define arch_exit_to_user_mode arch_exit_to_user_mode