]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gendwarfksyms: Fix structure type overrides
authorSami Tolvanen <samitolvanen@google.com>
Sat, 14 Jun 2025 00:55:33 +0000 (00:55 +0000)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 15 Jun 2025 15:49:48 +0000 (00:49 +0900)
commit2f6b47b295518c3ba16fabb1dddbe6a319899acb
tree4cb55609ba629badde8c189603f7fbfa5e034aad
parenta6a7946bd691940cfe7289ae6dfb1f077516df72
gendwarfksyms: Fix structure type overrides

As we always iterate through the entire die_map when expanding
type strings, recursively processing referenced types in
type_expand_child() is not actually necessary. Furthermore,
the type_string kABI rule added in commit c9083467f7b9
("gendwarfksyms: Add a kABI rule to override type strings") can
fail to override type strings for structures due to a missing
kabi_get_type_string() check in this function.

Fix the issue by dropping the unnecessary recursion and moving
the override check to type_expand(). Note that symbol versions
are otherwise unchanged with this patch.

Fixes: c9083467f7b9 ("gendwarfksyms: Add a kABI rule to override type strings")
Reported-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/gendwarfksyms/gendwarfksyms.h
scripts/gendwarfksyms/types.c