-
Notifications
You must be signed in to change notification settings - Fork 168
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
Add linux kernel module helpers #411
Conversation
So, I'm not sure how the module API issue 332 got linked to this pull request... I did not mention it by number? I mentioned the title though. Is that enough to accidentally link issues and pull requests? If so... booo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I agree that this still makes sense even with the module API. Some minor comments. (I unlinked the issue, maybe it was because your branch had the same name as the branch I had previously linked to it? That's weird.)
One more thing, the test case is failing for me with !SMP:
|
Huh, I guess I was getting too clever about that test. On !SMP the start should be 0, i.e. NULL, so I will probably only conditionally assert if |
There are a few common use cases that I find myself re-writing: iterating over the list of modules, looking up a module by name, and getting memory addresses related to modules (or vice versa). Add helpers for each. Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
There are a few common use cases that I find myself re-writing: iterating over the list of modules, looking up a module by name, and getting memory addresses related to modules (or vice versa). Add helpers for each.
I know there is the drgn module API which is upcoming, and I don't necessarily want to confuse or overlap with that. So maybe it's possible this will duplicate that API in some form, but I find myself needing to access kernel modules or look them up by name/address rather frequently. So here's some code and tests (tested on 6.9 and 4.19, hoping to let CI take a look at the rest 😉 ).