objtool/x86: add missing embedded_insn check

When dbf4600877 ("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>
This commit is contained in:
John Sperbeck 2023-10-28 18:41:31 +00:00 committed by Greg Kroah-Hartman
parent 6b977a7323
commit 4a20f5ea62
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}