From: Greg Kroah-Hartman Date: Tue, 12 May 2026 17:37:44 +0000 (+0200) Subject: 5.15-stable patches X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2425be08ce64d6faf94adb1641b7af04cf9a77ba;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: x86-cpu-amd-prevent-improper-isolation-of-shared-resources-in-zen2-s-op-cache.patch --- diff --git a/queue-5.15/series b/queue-5.15/series index e590f14267..aee5c94a96 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -356,3 +356,4 @@ mptcp-use-mpjoinsynackhmacfailure-for-synack-hmac-failure.patch mptcp-use-mptcp_rst_emptcp-for-ack-hmac-validation-failure.patch mptcp-sockopt-set-timestamp-flags-on-subflow-socket-not-msk.patch mptcp-fix-scheduling-with-atomic-in-timestamp-sockopt.patch +x86-cpu-amd-prevent-improper-isolation-of-shared-resources-in-zen2-s-op-cache.patch diff --git a/queue-5.15/x86-cpu-amd-prevent-improper-isolation-of-shared-resources-in-zen2-s-op-cache.patch b/queue-5.15/x86-cpu-amd-prevent-improper-isolation-of-shared-resources-in-zen2-s-op-cache.patch new file mode 100644 index 0000000000..3416220dd9 --- /dev/null +++ b/queue-5.15/x86-cpu-amd-prevent-improper-isolation-of-shared-resources-in-zen2-s-op-cache.patch @@ -0,0 +1,57 @@ +From a88e215025e5fa9cb1f4759aa09f5ff1fcb21b21 Mon Sep 17 00:00:00 2001 +From: Prathyushi Nangia +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 + +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 +Co-developed-by: Borislav Petkov (AMD) +Signed-off-by: Borislav Petkov (AMD) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + 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(+) + +--- a/arch/x86/include/asm/msr-index.h ++++ b/arch/x86/include/asm/msr-index.h +@@ -580,6 +580,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 +--- a/arch/x86/kernel/cpu/amd.c ++++ b/arch/x86/kernel/cpu/amd.c +@@ -1170,6 +1170,9 @@ static void init_amd_zen2(struct cpuinfo + { + 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) +--- a/tools/arch/x86/include/asm/msr-index.h ++++ b/tools/arch/x86/include/asm/msr-index.h +@@ -530,6 +530,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 +