Skip to content
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

Give preference to ELF symbolization for kernel addresses #970

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

danielocfb
Copy link
Collaborator

As a side effect of commit 7ee10af ("Merge
SymResolver::find_code_info() into SymResolver::find_sym()") we changed the behavior of the kernel resolver in that where previously it would consult the ELF resolver for source code information, it no longer did so. That was mostly a result of the kernel resolver giving preference to the internally used KSymResolver, as opposed to the ElfResolver. This change adjusts the logic to make sure that if an ElfResolver is present, we end up using it for symbolization.

As a side effect of commit 7ee10af ("Merge
SymResolver::find_code_info() into SymResolver::find_sym()") we changed
the behavior of the kernel resolver in that where previously it would
consult the ELF resolver for source code information, it no longer did
so. That was mostly a result of the kernel resolver giving preference to
the internally used KSymResolver, as opposed to the ElfResolver.
This change adjusts the logic to make sure that if an ElfResolver is
present, we end up using it for symbolization.

Signed-off-by: Daniel Müller <[email protected]>
@danielocfb danielocfb force-pushed the topic/kernel-elf-pref branch from 21b7aed to 9af1396 Compare January 29, 2025 22:25
@danielocfb danielocfb enabled auto-merge (rebase) January 29, 2025 22:25
@danielocfb danielocfb merged commit 6a09078 into libbpf:main Jan 29, 2025
38 checks passed
@danielocfb danielocfb deleted the topic/kernel-elf-pref branch January 29, 2025 22:31
Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.81%. Comparing base (0eabad1) to head (9af1396).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #970      +/-   ##
==========================================
- Coverage   94.89%   94.81%   -0.08%     
==========================================
  Files          58       58              
  Lines       10725    10725              
==========================================
- Hits        10177    10169       -8     
- Misses        548      556       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants