Module load not add all unwind sections
Zhongjin Chen
chenzhongjin at huawei.com
Tue Mar 22 02:40:19 PDT 2022
Hello,
For code loading unwind tables for modules:
arch/arm/kernel/module.c:365 at module_finalize
It check each section of elf and if there is a unwind section, it will
add it to the unwind table.
However it does not load all of unwind sections, such as
.ARM.exidx.kprobes.text (generated by functions with __kprobes). So when
trace stack address in these sections, the unwinder can't find unwind
table information and we'll failed with:
unwind: Index not found bf34804c
Now, it will only load these unwind sections:
.init.text / .exidx / .exit.text / .text.unlikely / .text.hot
I'm confusing that was it designed like this because we don't want to
unwind the stack for functions in .kprobes.text, .noinstr.text, and ect,
because these supported sections are defined in an enum. Or it is
something need to be fixed and all kinds of .xxx.text
I'll send a patch later if it needs to be fixed.
Regards
More information about the linux-arm-kernel
mailing list