]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
objtool/klp: Fix kCFI trap handling
authorJosh Poimboeuf <jpoimboe@kernel.org>
Tue, 21 Apr 2026 03:37:39 +0000 (20:37 -0700)
committerJosh Poimboeuf <jpoimboe@kernel.org>
Tue, 5 May 2026 04:16:01 +0000 (21:16 -0700)
.kcfi_traps contains references to kCFI trap instruction locations.
When a KCFI type check fails at an indirect call, the trap handler looks
up the faulting address in this section.

Add it to the special sections list so the entries get extracted for the
changed functions they reference.

Acked-by: Song Liu <song@kernel.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
tools/objtool/klp-diff.c

index 42970b38728f4bd4af660d74d2876ca3711291da..dd0e51dfc621d7c2edf9d24a9e32c3d4eb85d33e 100644 (file)
@@ -291,6 +291,7 @@ static bool is_special_section(struct section *sec)
 {
        static const char * const specials[] = {
                ".altinstructions",
+               ".kcfi_traps",
                ".smp_locks",
                "__bug_table",
                "__ex_table",