Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e98c8815 authored by Jack Pham's avatar Jack Pham
Browse files

ANDROID: kallsyms: ignore ThinLTO+CFI hash suffix in kallsyms_lookup_name()



Similar to commit f683c8dc ("ANDROID: kallsyms: strip hashes from
static functions with ThinLTO and CFI"), since LLVM adds a hash to
static function names when CONFIG_THINLTO and CFI are enabled, callers
of kallsyms_lookup_name() which aren't aware of the additional suffix
will fail to find the symbol. One example is kprobes (both compiled
and the dynamic events) which rely on this to resolve the function
name to attach a kprobe/kretprobe to.

Address this by also calling the cleanup_symbol_name() helper from
kallsyms_lookup_name() when failing to match a symbol by name.
This will strip off the hash suffix, if any, and attempt the
strcmp() again.

Change-Id: I4c79c818c29b4b82a94a5a7e86ae9783a41e853d
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 550a843c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment