]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 May 2026 17:38:23 +0000 (19:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 May 2026 17:38:23 +0000 (19:38 +0200)
added patches:
x86-cpu-amd-prevent-improper-isolation-of-shared-resources-in-zen2-s-op-cache.patch

queue-6.12/series
queue-6.12/x86-cpu-amd-prevent-improper-isolation-of-shared-resources-in-zen2-s-op-cache.patch [new file with mode: 0644]

index 4b79bc728e6b4261655a41896041fa8cb3dff33d..c430c7df1e0a0f92750dadc8caa971dca93acc32 100644 (file)
@@ -203,3 +203,4 @@ wifi-mt76-mt7925-fix-incorrect-tlv-length-in-clc-command.patch
 tracepoint-balance-regfunc-on-func_add-failure-in-tracepoint_add_func.patch
 rust-pin-init-fix-incorrect-accessor-reference-lifetime.patch
 kvm-arm64-wake-up-from-wfi-when-iqrchip-is-in-userspace.patch
+x86-cpu-amd-prevent-improper-isolation-of-shared-resources-in-zen2-s-op-cache.patch
diff --git a/queue-6.12/x86-cpu-amd-prevent-improper-isolation-of-shared-resources-in-zen2-s-op-cache.patch b/queue-6.12/x86-cpu-amd-prevent-improper-isolation-of-shared-resources-in-zen2-s-op-cache.patch
new file mode 100644 (file)
index 0000000..8cb2fe6
--- /dev/null
@@ -0,0 +1,62 @@
+From 8f6d2f1b304df0f8c1c6039f830d7ea34d3418f3 Mon Sep 17 00:00:00 2001
+From: Prathyushi Nangia <prathyushi.nangia@amd.com>
+Date: Tue, 9 Dec 2025 10:01:33 -0600
+Subject: x86/CPU/AMD: Prevent improper isolation of shared resources in Zen2's op cache
+
+From: Prathyushi Nangia <prathyushi.nangia@amd.com>
+
+commit c21b90f77687075115d989e53a8ec5e2bb427ab1 upstream.
+
+Make sure resources are not improperly shared in the op cache and
+cause instruction corruption this way.
+
+Signed-off-by: Prathyushi Nangia <prathyushi.nangia@amd.com>
+Co-developed-by: Borislav Petkov (AMD) <bp@alien8.de>
+Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
+Cc: stable@vger.kernel.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 +++
+ tools/arch/x86/include/asm/msr-index.h |    3 ++-
+ 3 files changed, 7 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/include/asm/msr-index.h
++++ b/arch/x86/include/asm/msr-index.h
+@@ -734,9 +734,10 @@
+ #define MSR_AMD64_LBR_SELECT                  0xc000010e
+ /* Zen4 */
+-#define MSR_ZEN4_BP_CFG                 0xc001102e
++#define MSR_ZEN4_BP_CFG                       0xc001102e
+ #define MSR_ZEN4_BP_CFG_BP_SPEC_REDUCE_BIT 4
+ #define MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT 5
++#define MSR_ZEN2_BP_CFG_BUG_FIX_BIT   33
+ /* Fam 19h MSRs */
+ #define MSR_F19H_UMC_PERF_CTL           0xc0010800
+--- a/arch/x86/kernel/cpu/amd.c
++++ b/arch/x86/kernel/cpu/amd.c
+@@ -989,6 +989,9 @@ static void init_amd_zen2(struct cpuinfo
+               msr_clear_bit(MSR_AMD64_CPUID_FN_7, 18);
+               pr_emerg("RDSEED is not reliable on this platform; disabling.\n");
+       }
++
++      if (!cpu_has(c, X86_FEATURE_HYPERVISOR))
++              msr_set_bit(MSR_ZEN4_BP_CFG, MSR_ZEN2_BP_CFG_BUG_FIX_BIT);
+ }
+ static void init_amd_zen3(struct cpuinfo_x86 *c)
+--- a/tools/arch/x86/include/asm/msr-index.h
++++ b/tools/arch/x86/include/asm/msr-index.h
+@@ -717,8 +717,9 @@
+ #define MSR_AMD64_LBR_SELECT                  0xc000010e
+ /* Zen4 */
+-#define MSR_ZEN4_BP_CFG                 0xc001102e
++#define MSR_ZEN4_BP_CFG                       0xc001102e
+ #define MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT 5
++#define MSR_ZEN2_BP_CFG_BUG_FIX_BIT   33
+ /* Fam 19h MSRs */
+ #define MSR_F19H_UMC_PERF_CTL           0xc0010800