]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Oct 2023 14:15:08 +0000 (15:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Oct 2023 14:15:08 +0000 (15:15 +0100)
added patches:
objtool-x86-add-missing-embedded_insn-check.patch

queue-5.15/objtool-x86-add-missing-embedded_insn-check.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/objtool-x86-add-missing-embedded_insn-check.patch b/queue-5.15/objtool-x86-add-missing-embedded_insn-check.patch
new file mode 100644 (file)
index 0000000..2d686cb
--- /dev/null
@@ -0,0 +1,40 @@
+From jsperbeck@google.com  Tue Oct 31 15:13:57 2023
+From: John Sperbeck <jsperbeck@google.com>
+Date: Sat, 28 Oct 2023 18:41:31 +0000
+Subject: objtool/x86: add missing embedded_insn check
+To: gregkh@linuxfoundation.org
+Cc: bp@alien8.de, jpoimboe@kernel.org, patches@lists.linux.dev, peterz@infradead.org, stable@vger.kernel.org, jsperbeck@google.com
+Message-ID: <20231028184131.2103810-1-jsperbeck@google.com>
+
+From: John Sperbeck <jsperbeck@google.com>
+
+When dbf460087755 ("objtool/x86: Fixup frame-pointer vs rethunk")
+was backported to some stable branches, the check for dest->embedded_insn
+in is_special_call() was missed.  The result is that the warning it
+was intended to suppress still appears.  For example on 6.1 (on kernels
+before 6.1, the '-s' argument would instead be 'check'):
+
+$ tools/objtool/objtool -s arch/x86/lib/retpoline.o
+arch/x86/lib/retpoline.o: warning: objtool: srso_untrain_ret+0xd:
+    call without frame pointer save/setup
+
+With this patch, the warning is correctly suppressed, and the
+kernel still passes the normal Google kernel developer tests.
+
+Signed-off-by: John Sperbeck <jsperbeck@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/objtool/check.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/objtool/check.c
++++ b/tools/objtool/check.c
+@@ -2202,7 +2202,7 @@ static bool is_special_call(struct instr
+               if (!dest)
+                       return false;
+-              if (dest->fentry)
++              if (dest->fentry || dest->embedded_insn)
+                       return true;
+       }
index 29221e76c3b2152cca6b0e87df1702a2a4ba507f..9169bc7933667b683308bd36629b9de380f86219 100644 (file)
@@ -81,3 +81,4 @@ tracing-kprobes-return-eaddrnotavail-when-func-matches-several-symbols.patch
 ext4-add-two-helper-functions-extent_logical_end-and-pa_logical_end.patch
 ext4-fix-bug-in-ext4_mb_new_inode_pa-due-to-overflow.patch
 ext4-avoid-overlapping-preallocations-due-to-overflow.patch
+objtool-x86-add-missing-embedded_insn-check.patch