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

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

index 009f2110f7e8fadc8b75239a67cbf50e230834f5..336ad3b16890cbb2816b3c340e38c294d1d72da0 100644 (file)
@@ -269,3 +269,4 @@ rdma-mlx4-fix-resource-leak-on-error-in-mlx4_ib_create_srq.patch
 rdma-ocrdma-don-t-null-deref-uctx-on-errors-in-ocrdma_copy_pd_uresp.patch
 rdma-rxe-reject-unknown-opcodes-before-icrc-processing.patch
 rdma-vmw_pvrdma-fix-double-free-on-pvrdma_alloc_ucontext-error-path.patch
+x86-cpu-amd-prevent-improper-isolation-of-shared-resources-in-zen2-s-op-cache.patch
diff --git a/queue-5.10/x86-cpu-amd-prevent-improper-isolation-of-shared-resources-in-zen2-s-op-cache.patch b/queue-5.10/x86-cpu-amd-prevent-improper-isolation-of-shared-resources-in-zen2-s-op-cache.patch
new file mode 100644 (file)
index 0000000..e3778e4
--- /dev/null
@@ -0,0 +1,66 @@
+From d14f0f391370ca45abc208a13c5863a9d05f422c 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       | 1 +
+ arch/x86/kernel/cpu/amd.c              | 3 +++
+ tools/arch/x86/include/asm/msr-index.h | 3 +++
+ 3 files changed, 7 insertions(+)
+
+diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
+index 390db709b432..59bee2206d97 100644
+--- a/arch/x86/include/asm/msr-index.h
++++ b/arch/x86/include/asm/msr-index.h
+@@ -570,6 +570,7 @@
+ /* Zen4 */
+ #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
+ /* Zen 2 */
+ #define MSR_ZEN2_SPECTRAL_CHICKEN     0xc00110e3
+diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
+index 3a446f2b6d30..519e388083b2 100644
+--- a/arch/x86/kernel/cpu/amd.c
++++ b/arch/x86/kernel/cpu/amd.c
+@@ -1197,6 +1197,9 @@ static void init_amd_zen2(struct cpuinfo_x86 *c)
+ {
+       init_amd_zen_common();
+       init_spectral_chicken(c);
++
++      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)
+diff --git a/tools/arch/x86/include/asm/msr-index.h b/tools/arch/x86/include/asm/msr-index.h
+index 8fb925676813..c28d75fe4dee 100644
+--- a/tools/arch/x86/include/asm/msr-index.h
++++ b/tools/arch/x86/include/asm/msr-index.h
+@@ -523,6 +523,9 @@
+ #define MSR_AMD64_VIRT_SPEC_CTRL      0xc001011f
++#define MSR_ZEN4_BP_CFG                       0xc001102e
++#define MSR_ZEN2_BP_CFG_BUG_FIX_BIT   33
++
+ /* Fam 17h MSRs */
+ #define MSR_F17H_IRPERF                       0xc00000e9
+-- 
+2.51.0
+