]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Apr 2024 08:29:10 +0000 (10:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Apr 2024 08:29:10 +0000 (10:29 +0200)
added patches:
x86-retpoline-add-noendbr-annotation-to-the-srso-dummy-return-thunk.patch

queue-6.1/series
queue-6.1/x86-retpoline-add-noendbr-annotation-to-the-srso-dummy-return-thunk.patch [new file with mode: 0644]

index b0d92900a68f88d7ddddcc4c5b0389e6f7a31b93..62e253635a0fabebea650686e811d41b28e513b0 100644 (file)
@@ -108,3 +108,4 @@ s390-pai-rework-paixxx_start-and-paixxx_stop-functio.patch
 s390-pai-fix-sampling-event-removal-for-pmu-device-d.patch
 ata-sata_mv-fix-pci-device-id-table-declaration-comp.patch
 nfsd-hold-a-lighter-weight-client-reference-over-cb_.patch
+x86-retpoline-add-noendbr-annotation-to-the-srso-dummy-return-thunk.patch
diff --git a/queue-6.1/x86-retpoline-add-noendbr-annotation-to-the-srso-dummy-return-thunk.patch b/queue-6.1/x86-retpoline-add-noendbr-annotation-to-the-srso-dummy-return-thunk.patch
new file mode 100644 (file)
index 0000000..2b9e421
--- /dev/null
@@ -0,0 +1,35 @@
+From b377c66ae3509ccea596512d6afb4777711c4870 Mon Sep 17 00:00:00 2001
+From: "Borislav Petkov (AMD)" <bp@alien8.de>
+Date: Fri, 5 Apr 2024 16:46:37 +0200
+Subject: x86/retpoline: Add NOENDBR annotation to the SRSO dummy return thunk
+
+From: Borislav Petkov (AMD) <bp@alien8.de>
+
+commit b377c66ae3509ccea596512d6afb4777711c4870 upstream.
+
+srso_alias_untrain_ret() is special code, even if it is a dummy
+which is called in the !SRSO case, so annotate it like its real
+counterpart, to address the following objtool splat:
+
+  vmlinux.o: warning: objtool: .export_symbol+0x2b290: data relocation to !ENDBR: srso_alias_untrain_ret+0x0
+
+Fixes: 4535e1a4174c ("x86/bugs: Fix the SRSO mitigation on Zen3/4")
+Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Link: https://lore.kernel.org/r/20240405144637.17908-1-bp@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/lib/retpoline.S |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/x86/lib/retpoline.S
++++ b/arch/x86/lib/retpoline.S
+@@ -261,6 +261,7 @@ SYM_CODE_START(__x86_return_thunk)
+       UNWIND_HINT_FUNC
+       ANNOTATE_NOENDBR
+       ANNOTATE_UNRET_SAFE
++      ANNOTATE_NOENDBR
+       ret
+       int3
+ SYM_CODE_END(__x86_return_thunk)