lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 19 Jul 2016 19:15:07 +0800 From: Songshan Gong <gongss@...ux.vnet.ibm.com> To: acme@...nel.org, jolsa@...nel.org Cc: dsahern@...il.com, linux-kernel@...r.kernel.org Subject: [Question] for duplicate symbols, kallsyms and vmlinux may retain different symbol I try to fix the failure of testcase 'test__vmlinux_matches_kallsyms', and meet a kind of failure because of duplicate symbols. For example,two functions: kretprobe_trampoline_holder and kretprobe_trampoline (1)They all start from the same addr,0x011b180; (2)kretprobe_trampoline_holder is STB_LOCAL, kretprobe_trampoline is STB_GLOBAL; (3) for kallsyms, because we cann't get the correct size of each symbol from /proc/kallsyms, before symbols__fixup_duplicate(), perf assumes each symbol's size is zero, so when choose_best_symbol(), we get kretprobe_trampoline because perf prefers 'a global symbol over a non-global one'; (4) for vmlinux, by readelf, I found that: size of kretprobe_trampoline_holder is 4, not zero; size of kretprobe_trampoline is zero; So when choose_best_symbol(), we get pretprobe_trampoline_holder instead because perf prefers 'A symbol with non-zero length' and this condition is judged before 'prefer a global symbol'; I have a idea to fix this problem, but may be inappropriate: Could we move the judge of symbol size to the bottom of the judge whether a symbol is global? Anyone else have good idea? Song Shan Gong
Powered by blists - more mailing lists