summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/cpufeatures.h
diff options
context:
space:
mode:
authorBorislav Petkov (AMD) <bp@alien8.de>2023-08-05 00:06:43 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2023-08-09 07:55:00 -0700
commit77245f1c3c6495521f6a3af082696ee2f8ce3921 (patch)
treefca77ee5bfe3c557f190f201e39a82688f9ac9b4 /arch/x86/include/asm/cpufeatures.h
parent13b9372068660fe4f7023f43081067376582ef3c (diff)
downloadlinux-stable-77245f1c3c6495521f6a3af082696ee2f8ce3921.tar.gz
linux-stable-77245f1c3c6495521f6a3af082696ee2f8ce3921.tar.bz2
linux-stable-77245f1c3c6495521f6a3af082696ee2f8ce3921.zip
x86/CPU/AMD: Do not leak quotient data after a division by 0
Under certain circumstances, an integer division by 0 which faults, can leave stale quotient data from a previous division operation on Zen1 microarchitectures. Do a dummy division 0/1 before returning from the #DE exception handler in order to avoid any leaks of potentially sensitive data. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Cc: <stable@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/include/asm/cpufeatures.h')
-rw-r--r--arch/x86/include/asm/cpufeatures.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index 094f88fee536..b69b0d7756aa 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -495,4 +495,5 @@
/* BUG word 2 */
#define X86_BUG_SRSO X86_BUG(1*32 + 0) /* AMD SRSO bug */
+#define X86_BUG_DIV0 X86_BUG(1*32 + 1) /* AMD DIV0 speculation bug */
#endif /* _ASM_X86_CPUFEATURES_H */