* [PATCH v2] objtool/x86: add missing embedded_insn check
@ 2023-10-28 18:41 John Sperbeck
2023-10-28 18:43 ` kernel test robot
0 siblings, 1 reply; 2+ messages in thread
From: John Sperbeck @ 2023-10-28 18:41 UTC (permalink / raw)
To: gregkh; +Cc: bp, jpoimboe, patches, peterz, stable, jsperbeck
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>
---
I think 6.1.y, 5.15.y, and 5.10.y are the LTS branches missing the
bit of code that this patch re-adds.
Changes from v1 to v2:
* include more context in the commit message.
tools/objtool/check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index f8008ab31eef..cb363b507a32 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2478,7 +2478,7 @@ static bool is_special_call(struct instruction *insn)
if (!dest)
return false;
- if (dest->fentry)
+ if (dest->fentry || dest->embedded_insn)
return true;
}
--
2.42.0.820.g83a721a137-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-28 18:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-28 18:41 [PATCH v2] objtool/x86: add missing embedded_insn check John Sperbeck
2023-10-28 18:43 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox