-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Userspace kprobe offset verification can now fail #2332
Conversation
ce0abfb
to
c161d63
Compare
Thanks @viktormalik. I just fixed the changelog, will wait for #2333 to land, so I can rebase and get clean CI (even though it passed with the partial REQUIRES) |
@@ -76,6 +76,23 @@ EXPECT Offset outside the function bounds \('vfs_read' size is* | |||
TIMEOUT 5 | |||
WILL_FAIL | |||
|
|||
NAME kprobe_offset_module |
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.
Maybe add comment that this test relies on lack of module instruction checking support?
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.
@danobi, it's just punting the check to the kernel - if you get the offset wrong, the kernel won't let the program attach. After all, if we implemented module disassembly and offset checking, this test would still pass, so it's clearly not relying on the absence of anything.
Off by 1 in changelog link? |
c161d63
to
635fbed
Compare
Sorry, forgot to push. |
635fbed
to
1e79c6b
Compare
The description is correct, but the link is still wrong. |
Previously, this logic could only fail in unsafe mode. Unfortunately, this prevented attachment to module functions with an offset, as the module binary would never be examined. This PR makes the logic entirely optional and improves the error messages to provide a similar user experience. Fixes bpftrace#2327
1e79c6b
to
0d513c5
Compare
Previously, this logic could only fail in unsafe mode. Unfortunately,
this prevented attachment to module functions with an offset, as
the module binary would never be examined.
This PR makes the logic entirely optional and improves the error
messages to provide a similar user experience.
Fixes #2327
Checklist
CHANGELOG.md