]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Apr 2026 08:01:25 +0000 (10:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Apr 2026 08:01:25 +0000 (10:01 +0200)
added patches:
x86-cpu-fix-fpdss-on-zen1.patch

queue-5.15/series
queue-5.15/x86-cpu-fix-fpdss-on-zen1.patch [new file with mode: 0644]

index e75891e07c70de75752b93e1a6b4aa8a8745c20f..1a964a6b3d482453cfe52f23572ebdc44485b2da 100644 (file)
@@ -89,6 +89,7 @@ unshare-fix-unshare_fs-handling.patch
 acpi-osi-add-dmi-quirk-for-acer-aspire-one-d255.patch
 scsi-ses-fix-devices-attaching-to-different-hosts.patch
 alsa-usb-audio-avoid-implicit-feedback-mode-on-diyin.patch
+x86-cpu-fix-fpdss-on-zen1.patch
 alsa-usb-audio-check-max-frame-size-for-implicit-fee.patch
 powerpc-uaccess-fix-inline-assembly-for-clang-build-.patch
 remoteproc-sysmon-correct-subsys_name_len-type-in-qm.patch
diff --git a/queue-5.15/x86-cpu-fix-fpdss-on-zen1.patch b/queue-5.15/x86-cpu-fix-fpdss-on-zen1.patch
new file mode 100644 (file)
index 0000000..70dbf6b
--- /dev/null
@@ -0,0 +1,47 @@
+From e55d98e7756135f32150b9b8f75d580d0d4b2dd3 Mon Sep 17 00:00:00 2001
+From: "Borislav Petkov (AMD)" <bp@alien8.de>
+Date: Tue, 7 Apr 2026 11:40:03 +0200
+Subject: x86/CPU: Fix FPDSS on Zen1
+
+From: Borislav Petkov (AMD) <bp@alien8.de>
+
+commit e55d98e7756135f32150b9b8f75d580d0d4b2dd3 upstream.
+
+Zen1's hardware divider can leave, under certain circumstances, partial
+results from previous operations.  Those results can be leaked by
+another, attacker thread.
+
+Fix that with a chicken bit.
+
+Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/include/asm/msr-index.h |    3 +++
+ arch/x86/kernel/cpu/amd.c        |    3 +++
+ 2 files changed, 6 insertions(+)
+
+--- a/arch/x86/include/asm/msr-index.h
++++ b/arch/x86/include/asm/msr-index.h
+@@ -539,6 +539,9 @@
+ #define MSR_AMD64_DC_CFG              0xc0011022
+ #define MSR_AMD64_TW_CFG              0xc0011023
++#define MSR_AMD64_FP_CFG              0xc0011028
++#define MSR_AMD64_FP_CFG_ZEN1_DENORM_FIX_BIT  9
++
+ #define MSR_AMD64_DE_CFG              0xc0011029
+ #define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT  1
+ #define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE     BIT_ULL(MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT)
+--- a/arch/x86/kernel/cpu/amd.c
++++ b/arch/x86/kernel/cpu/amd.c
+@@ -1075,6 +1075,9 @@ static void init_amd_zn(struct cpuinfo_x
+               if (c->x86 == 0x19 && !cpu_has(c, X86_FEATURE_BTC_NO))
+                       set_cpu_cap(c, X86_FEATURE_BTC_NO);
+       }
++
++      pr_notice_once("AMD Zen1 FPDSS bug detected, enabling mitigation.\n");
++      msr_set_bit(MSR_AMD64_FP_CFG, MSR_AMD64_FP_CFG_ZEN1_DENORM_FIX_BIT);
+ }
+ static bool cpu_has_zenbleed_microcode(void)