Message ID | 20220513142230.205917847@linuxfoundation.org |
---|---|
State | New |
Headers | show |
Series | None | expand |
--- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -871,6 +871,16 @@ static void add_call_dest(struct objtool : arch_nop_insn(insn->len)); insn->type = sibling ? INSN_RETURN : INSN_NOP; + + if (sibling) { + /* + * We've replaced the tail-call JMP insn by two new + * insn: RET; INT3, except we only have a single struct + * insn here. Mark it retpoline_safe to avoid the SLS + * warning, instead of adding another insn. + */ + insn->retpoline_safe = true; + } } if (mcount && !strcmp(insn->call_dest->name, "__fentry__")) {