From: Greg Kroah-Hartman Date: Mon, 1 Apr 2024 13:15:50 +0000 (+0200) Subject: 6.7-stable patches X-Git-Tag: v6.7.12~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ce224de0af3739e4c89f7211708dfba3e98c41a;p=thirdparty%2Fkernel%2Fstable-queue.git 6.7-stable patches added patches: x86-bugs-use-fixed-addressing-for-verw-operand.patch --- diff --git a/queue-6.7/series b/queue-6.7/series index 3bed3fd4c13..5939f472610 100644 --- a/queue-6.7/series +++ b/queue-6.7/series @@ -421,3 +421,4 @@ scsi-qla2xxx-change-debug-message-during-driver-unload.patch scsi-qla2xxx-delay-i-o-abort-on-pci-error.patch x86-bugs-fix-the-srso-mitigation-on-zen3-4.patch crash-use-macro-to-add-crashk_res-into-iomem-early-for-specific-arch.patch +x86-bugs-use-fixed-addressing-for-verw-operand.patch diff --git a/queue-6.7/x86-bugs-use-fixed-addressing-for-verw-operand.patch b/queue-6.7/x86-bugs-use-fixed-addressing-for-verw-operand.patch new file mode 100644 index 00000000000..60c6a5674d9 --- /dev/null +++ b/queue-6.7/x86-bugs-use-fixed-addressing-for-verw-operand.patch @@ -0,0 +1,43 @@ +From 8009479ee919b9a91674f48050ccbff64eafedaa Mon Sep 17 00:00:00 2001 +From: Pawan Gupta +Date: Mon, 26 Feb 2024 15:52:33 -0800 +Subject: x86/bugs: Use fixed addressing for VERW operand + +From: Pawan Gupta + +commit 8009479ee919b9a91674f48050ccbff64eafedaa upstream. + +The macro used for MDS mitigation executes VERW with relative +addressing for the operand. This was necessary in earlier versions of +the series. Now it is unnecessary and creates a problem for backports +on older kernels that don't support relocations in alternatives. +Relocation support was added by commit 270a69c4485d ("x86/alternative: +Support relocations in alternatives"). Also asm for fixed addressing +is much cleaner than relative RIP addressing. + +Simplify the asm by using fixed addressing for VERW operand. + +[ dhansen: tweak changelog ] + +Closes: https://lore.kernel.org/lkml/20558f89-299b-472e-9a96-171403a83bd6@suse.com/ +Fixes: baf8361e5455 ("x86/bugs: Add asm helpers for executing VERW") +Reported-by: Nikolay Borisov +Signed-off-by: Pawan Gupta +Signed-off-by: Dave Hansen +Link: https://lore.kernel.org/all/20240226-verw-arg-fix-v1-1-7b37ee6fd57d%40linux.intel.com +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/include/asm/nospec-branch.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/include/asm/nospec-branch.h ++++ b/arch/x86/include/asm/nospec-branch.h +@@ -332,7 +332,7 @@ + * Note: Only the memory operand variant of VERW clears the CPU buffers. + */ + .macro CLEAR_CPU_BUFFERS +- ALTERNATIVE "", __stringify(verw _ASM_RIP(mds_verw_sel)), X86_FEATURE_CLEAR_CPU_BUF ++ ALTERNATIVE "", __stringify(verw mds_verw_sel), X86_FEATURE_CLEAR_CPU_BUF + .endm + + #else /* __ASSEMBLY__ */