-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove left-over debug code #11
base: master
Are you sure you want to change the base?
Conversation
Without this change the code will always assume has_base_relative=True which will break kernels that are not built with CONFIG_KALLSYMS_BASE_RELATIVE.
Hello, Thanks for noticing. Actually the if number_of_null_items / len(tentative_addresses_or_offsets) >= 0.2: # If there are too much null symbols we have likely tried to parse the wrong integer size
if can_skip:
continue When I remove the If you have encountered a BASE_RELATIVE-compiled kernel that is not correctly handled by Thank you, |
Hmm, I'm afraid I cannot share the kernel at the moment. Currently the code says that there are 99.9% negative offsets and 0.001% null addresses. Then it proceeds to generate symbols that have 9 hex digits in them (like 101377757). The comment on the line you mention talks about integer size. Is it really intended to detect CONFIG_KALLSYMS_ABSOLUTE_PERCPU? |
I don't know if it helps but the addresses are all 32-bit and between 0xc0100000 and 0xc1480000. |
The trickiness here is that in 64-bit kernels, offsets (used when BASE_RELATIVE is set) are encoded as 32-bits integers, while addresses (used when BASE_RELATIVE is unset) are encoded as 64-bits integers. Hence the issue of having ranges of null bytes instead of actual integer values when, because BASE_RELATIVE is guessed wrong, the integer size of values is guessed wrong.
This may look like compressed symbols name from the "kallsyms_names" array (see https://github.com/marin-m/vmlinux-to-elf#how-does-it-work-really), comprising ASCII characters as part of their bytes, and can be an idea of something to detect for extending the heuristic.
If still you wish to share the kernel privately, you can send it at viveleyaourt AT laposte DOT net (temporary address). Regards, |
Without this change the code will always assume has_base_relative=True
which will break kernels that are not built with
CONFIG_KALLSYMS_BASE_RELATIVE.