Re: [PATCH 3/3] objtool: Skip jump table jumps in the kCFI indirect call check

From: Peter Zijlstra

Date: Mon Oct 12 2026 - 05:24:35 EST


On Mon, Oct 12, 2026 at 02:04:26AM -0700, Kees Cook wrote:
> With MITIGATION_RETPOLINE=y, GCC lowers the computed goto in
> ___bpf_prog_run() to a jump through __x86_indirect_thunk_rdx. objtool
> puts that jump on the retpoline call list along with the indirect calls,
> so with CONFIG_CFI=y the kCFI check wants a UD2 before it:
>
> vmlinux.o: warning: objtool: ___bpf_prog_run+0x1e: no-cfi indirect call!
>
> The jump goes through the "jumptable" array, which objtool already reads
> from .data.rel.ro.c_jump_table, so its targets stay inside the function
> and need no kCFI check. Skip jump table jumps in the check. Clang does
> not emit this jump: with retpolines, it lowers the computed goto without
> an indirect jump.

I am confused.. I don't see a computed goto in __bpf_prog_run(), and we
build with -fno-jump-tables.