Skip to content

Commit

Permalink
objtool/x86: add missing embedded_insn check
Browse files Browse the repository at this point in the history
When dbf4600 ("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>
  • Loading branch information
John Sperbeck authored and gregkh committed Nov 2, 2023
1 parent 2afa9f7 commit 5926b08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/objtool/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 5926b08

Please sign in to comment.