Re: [tip:x86/core 1/1] vmlinux.o: warning: objtool: rcar_pcie_probe+0x13e: no-cfi indirect call!

From: Nathan Chancellor
Date: Thu Oct 09 2025 - 23:20:11 EST


Hi Peter,

On Thu, Oct 09, 2025 at 09:07:02PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core
> head: 6c6e6a5416471498d8aafc050110bec9467e4da7
> commit: 6c6e6a5416471498d8aafc050110bec9467e4da7 [1/1] Merge branch 'linus' into x86/core, to resolve conflicts

It appears that this got bisected to the merge because the configuration
has CONFIG_CFI=y, which needs the rename that is in Linus's tree. This
is reproducible with just commit 894af4a1cde6 ("objtool: Validate kCFI
calls") cherry-picked onto 6.17 and CONFIG_CFI_CLANG=y in the config
provided at the link below.

> config: x86_64-buildonly-randconfig-001-20251009 (https://download.01.org/0day-ci/archive/20251009/202510092124.O2IX0Jek-lkp@xxxxxxxxx/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251009/202510092124.O2IX0Jek-lkp@xxxxxxxxx/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202510092124.O2IX0Jek-lkp@xxxxxxxxx/
>
> All warnings (new ones prefixed by >>):
>
> >> vmlinux.o: warning: objtool: rcar_pcie_probe+0x13e: no-cfi indirect call!

I do see an indirect call in rcar_pcie_probe() with ->host_init_fn() but
rcar_pcie_probe() is not __nocfi... +0x13e is 0x8d9d7e in this build.

8d9d6f: 31 c0 xorl %eax, %eax
8d9d71: 49 89 86 58 06 00 00 movq %rax, 0x658(%r14)
8d9d78: 4c 89 ff movq %r15, %rdi
8d9d7b: 45 31 db xorl %r11d, %r11d
8d9d7e: 2e e8 00 00 00 00 callq 0x8d9d84 <rcar_pcie_probe+0x144>
00000000008d9d80: R_X86_64_PLT32 __x86_indirect_thunk_r11-0x4

Is this an issue with the objtool check or is clang not generating the
right code?

Cheers,
Nathan