]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/ibt: Make cfi_bhi a constant for FINEIBT_BHI=n
authorPeter Zijlstra <peterz@infradead.org>
Mon, 3 Mar 2025 09:21:47 +0000 (10:21 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 3 Mar 2025 09:54:11 +0000 (10:54 +0100)
commit73e8079be9e7ae5ed197d074e0ba6c43674c52f7
tree0cc3f337f5b8affbe4ccd0bc53eab19b6d0899f0
parentdfebe7362f6f461d771cdb9ac2c5172a4721f064
x86/ibt: Make cfi_bhi a constant for FINEIBT_BHI=n

Robot yielded a .config that tripped:

  vmlinux.o: warning: objtool: do_jit+0x276: relocation to !ENDBR: .noinstr.text+0x6a60

This is the result of using __bhi_args[1] in unreachable code; make
sure the compiler is able to determine this is unreachable and trigger
DCE.

Closes: https://lore.kernel.org/oe-kbuild-all/202503030704.H9KFysNS-lkp@intel.com/
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250303094911.GL5880@noisy.programming.kicks-ass.net
arch/x86/include/asm/cfi.h
arch/x86/kernel/alternative.c