]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/cfi: Fix CFI rewrite for odd alignments
authorPeter Zijlstra <peterz@infradead.org>
Wed, 11 Feb 2026 12:59:43 +0000 (13:59 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 23 Feb 2026 10:19:11 +0000 (11:19 +0100)
commit24c8147abb39618d74fcc36e325765e8fe7bdd7a
treeb8faeb69f6921d3e84d953965ab514ad990292ee
parenta0cb371b521dde44f32cfe954b6ef6f82b407393
x86/cfi: Fix CFI rewrite for odd alignments

Rustam reported his clang builds did not boot properly; turns out his
.config has: CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B=y set.

Fix up the FineIBT code to deal with this unusual alignment.

Fixes: 931ab63664f0 ("x86/ibt: Implement FineIBT")
Reported-by: Rustam Kovhaev <rkovhaev@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Rustam Kovhaev <rkovhaev@gmail.com>
arch/x86/include/asm/cfi.h
arch/x86/include/asm/linkage.h
arch/x86/kernel/alternative.c
arch/x86/net/bpf_jit_comp.c