Re: [RFC PATCH v3 01/15] objtool: Make validate_call() recognize indirect calls to pv_ops[]
From: Josh Poimboeuf
Date: Tue Nov 19 2024 - 15:38:44 EST
On Tue, Nov 19, 2024 at 04:34:48PM +0100, Valentin Schneider wrote:
> call_dest_name() does not get passed the file pointer of validate_call(),
> which means its invocation of insn_reloc() will always return NULL. Make it
> take a file pointer.
>
> While at it, make sure call_dest_name() uses arch_dest_reloc_offset(),
> otherwise it gets the pv_ops[] offset wrong.
>
> Fabricating an intentional warning shows the change; previously:
>
> vmlinux.o: warning: objtool: __flush_tlb_all_noinstr+0x4: call to {dynamic}() leaves .noinstr.text section
>
> now:
>
> vmlinux.o: warning: objtool: __flush_tlb_all_noinstr+0x4: call to pv_ops[1]() leaves .noinstr.text section
>
> Signed-off-by: Valentin Schneider <vschneid@xxxxxxxxxx>
Acked-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
--
Josh