summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJohn Sperbeck <jsperbeck@google.com>2023-10-28 21:41:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-08 19:30:47 +0300
commit4a20f5ea62db9dc5dc1ff5b8e44f32baf36d701e (patch)
treeda1920b967fe3d99a480a4173df30ed36ac6ba8b /tools
parent6b977a7323f7d932b5aa72952758056cf3a4b80f (diff)
downloadlinux-4a20f5ea62db9dc5dc1ff5b8e44f32baf36d701e.tar.xz
objtool/x86: add missing embedded_insn check
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/objtool/check.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index bd24951faa09..059b78d08f7a 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2107,7 +2107,7 @@ static bool is_special_call(struct instruction *insn)
if (!dest)
return false;
- if (dest->fentry)
+ if (dest->fentry || dest->embedded_insn)
return true;
}