Re: [PATCH v2 13/13] objtool: Validate kCFI calls

Peter Zijlstra
2025-05-01T15:56:19Z

On Wed, Apr 30, 2025 at 09:03:29PM +0200, Peter Zijlstra wrote:

> > > + list_for_each_entry(insn, &file->retpoline_call_list, call_node) {
> > > + struct symbol *sym = insn->sym;
> > > +
> > > + if (sym && sym->type == STT_FUNC && !sym->nocfi) {
> > > + struct instruction *prev =
> > > + prev_insn_same_sym(file, insn);
> > > +
> > > + if (!prev || prev->type != INSN_BUG) {
> > > + WARN_INSN(insn, "no-cfi indirect call!");
> > > + warnings++;
> >
> > Do we not care about indirect calls from !STT_FUNC?

I extended to also cover STT_NOTYPE, no additional warns.