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

Lazy kernel symbols #282

Merged
merged 3 commits into from
Dec 26, 2022
Merged

Conversation

NDStrahilevitz
Copy link
Contributor

Lazy kernel symbols is a slower but more memory efficient of the
KernelSymbolsTable (which is now an interface).
It works by storing a copy of the kallsyms file and querying it's content,
instead of preparsing the whole file at construction time.

Also fix a small leak in the SymbolToOffset helper where a file Close() was missing.

@NDStrahilevitz
Copy link
Contributor Author

@yanivagman tests are failing because they need root/syslog caps to run, otherwise reading kallsyms yields the results with all addresses set to 0.

yanivagman
yanivagman previously approved these changes Dec 26, 2022
Copy link
Collaborator

@yanivagman yanivagman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Lazy kernel symbols is a slower but more memory efficient of the
KernelSymbolsTable (which is now an interface).
It works by storing a copy of the kallsyms file and querying it's content,
instead of preparsing the whole file at construction time.
When running go test with sudo, the PATH must be set externally with
env PATH=$(PATH)
Add this in the helpers test rule.
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