summaryrefslogtreecommitdiff
path: root/tools/objtool/klp-diff.c
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2026-04-20 20:37:39 -0700
committerJosh Poimboeuf <jpoimboe@kernel.org>2026-05-04 21:16:01 -0700
commitda4326573ae8d00a00a6015c8c3886812cd0adb4 (patch)
tree6764be625c1a588d85828540350637b8466bd82b /tools/objtool/klp-diff.c
parent62a7a01fde87c99926cd7e9670b4226c4c79ebaf (diff)
objtool/klp: Fix kCFI trap handling
.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>
Diffstat (limited to 'tools/objtool/klp-diff.c')
-rw-r--r--tools/objtool/klp-diff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/objtool/klp-diff.c b/tools/objtool/klp-diff.c
index 42970b38728f..dd0e51dfc621 100644
--- a/tools/objtool/klp-diff.c
+++ b/tools/objtool/klp-diff.c
@@ -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",