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:Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment