Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

objtool: Ignore __pi___cfi_ prefixed symbols

When building with CONFIG_CFI_CLANG=y after the recent series to
separate the x86 startup code, there are objtool warnings along the
lines of:

vmlinux.o: warning: objtool: __pi___cfi_startup_64_load_idt() falls through to next function __pi_startup_64_load_idt()
vmlinux.o: warning: objtool: __pi___cfi_startup_64_setup_gdt_idt() falls through to next function __pi_startup_64_setup_gdt_idt()
vmlinux.o: warning: objtool: __pi___cfi___startup_64() falls through to next function __pi___startup_64()

As the comment in validate_branch() states, this is expected, so ignore
these symbols in the same way that __cfi_ and __pfx_ symbols are already
ignored for the rest of the kernel.

Fixes: 7b38dec3c5af ("x86/boot: Create a confined code area for startup code")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Ard Biesheuvel <ardb@kernel.org>

authored by

Nathan Chancellor and committed by
Borislav Petkov (AMD)
26a9f90b 0ca77f8d

+1
+1
tools/objtool/check.c
··· 3565 3565 /* Ignore KCFI type preambles, which always fall through */ 3566 3566 if (!strncmp(func->name, "__cfi_", 6) || 3567 3567 !strncmp(func->name, "__pfx_", 6) || 3568 + !strncmp(func->name, "__pi___cfi_", 11) || 3568 3569 !strncmp(func->name, "__pi___pfx_", 11)) 3569 3570 return 0; 3570 3571