]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jul 2024 11:47:05 +0000 (13:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jul 2024 11:47:05 +0000 (13:47 +0200)
added patches:
x86-retpoline-move-a-noendbr-annotation-to-the-srso-dummy-return-thunk.patch

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

index 2ea1aaf354b1c0399ae7015e15af7d02da253d67..ce0a8be0f417f1f08b56ef82509141f69c4a90f3 100644 (file)
@@ -77,3 +77,4 @@ wireguard-send-annotate-intentional-data-race-in-checking-empty-queue.patch
 misc-fastrpc-fix-dsp-capabilities-request.patch
 misc-fastrpc-avoid-updating-pd-type-for-capability-request.patch
 misc-fastrpc-copy-the-complete-capability-structure-to-user.patch
+x86-retpoline-move-a-noendbr-annotation-to-the-srso-dummy-return-thunk.patch
diff --git a/queue-6.1/x86-retpoline-move-a-noendbr-annotation-to-the-srso-dummy-return-thunk.patch b/queue-6.1/x86-retpoline-move-a-noendbr-annotation-to-the-srso-dummy-return-thunk.patch
new file mode 100644 (file)
index 0000000..bb13181
--- /dev/null
@@ -0,0 +1,48 @@
+From bp@alien8.de  Mon Jul 15 13:40:08 2024
+From: Borislav Petkov <bp@alien8.de>
+Date: Tue, 9 Jul 2024 16:12:38 +0200
+Subject: x86/retpoline: Move a NOENDBR annotation to the SRSO dummy return thunk
+To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: Jim Mattson <jmattson@google.com>, Ingo Molnar <mingo@kernel.org>, x86@kernel.org, linux-kernel@vger.kernel.org, Greg Thelen <gthelen@google.com>, stable@vger.kernel.org
+Message-ID: <20240709141238.GJZo1FVpZU0jRganFu@fat_crate.local>
+Content-Disposition: inline
+
+From: Jim Mattson <jmattson@google.com>
+
+The linux-6.1-y backport of commit b377c66ae350 ("x86/retpoline: Add
+NOENDBR annotation to the SRSO dummy return thunk") misplaced the new
+NOENDBR annotation, repeating the annotation on __x86_return_thunk,
+rather than adding the annotation to the !CONFIG_CPU_SRSO version of
+srso_alias_untrain_ret, as intended.
+
+Move the annotation to the right place.
+
+Fixes: b377c66ae350 ("x86/retpoline: Add NOENDBR annotation to the SRSO dummy return thunk")
+Reported-by: Greg Thelen <gthelen@google.com>
+Signed-off-by: Jim Mattson <jmattson@google.com>
+Acked-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/lib/retpoline.S |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/lib/retpoline.S
++++ b/arch/x86/lib/retpoline.S
+@@ -107,6 +107,7 @@ __EXPORT_THUNK(srso_alias_untrain_ret)
+ /* dummy definition for alternatives */
+ SYM_START(srso_alias_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE)
+       ANNOTATE_UNRET_SAFE
++      ANNOTATE_NOENDBR
+       ret
+       int3
+ SYM_FUNC_END(srso_alias_untrain_ret)
+@@ -261,7 +262,6 @@ SYM_CODE_START(__x86_return_thunk)
+       UNWIND_HINT_FUNC
+       ANNOTATE_NOENDBR
+       ANNOTATE_UNRET_SAFE
+-      ANNOTATE_NOENDBR
+       ret
+       int3
+ SYM_CODE_END(__x86_return_thunk)