-
Notifications
You must be signed in to change notification settings - Fork 268
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
ebpf: Limit args
access to kprobe
/uprobe
and ret
access to kretprobe
/uretprobe
#912
ebpf: Limit args
access to kprobe
/uprobe
and ret
access to kretprobe
/uretprobe
#912
Conversation
✅ Deploy Preview for aya-rs-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hey! Sorry for the delay in reviewing this! Have had a busy couple of weeks but I plan to take a look in the next couple of days :) |
Sorry it took so long! Looks great, if you mark as ready for review I'll approve. Also CI is failing, so please fix that. |
Created retprobe.rs to hold RetProbeContext and moved the ret from ProbeContext in probe.rs into RetProbeContext. Now, only kprobe (which uses ProbeContext) can access args, and kretprobe (which uses RetProbeContext) can access ret. Fixes: aya-rs#700
Added logic in expand function in both kprobe.rs and uprobe.rs for valid macros. Now, kprobe & uprobe proc macros only accept ProbeContext, and kretprobe & uretprobe only accept RetProbeContext. Ref: aya-rs#700
Added integration test methods for kretprobe and uretprobe with their appropriate contexts.
649165f
to
b0d24cd
Compare
Lint errors are now resolved. 🐱 |
Update kretprobe and uretprobe to use RetProbeContext in response to the changes from aya-rs/aya#912
Update kretprobe and uretprobe to use RetProbeContext in response to aya-rs/aya#700 and aya-rs/aya#912
Update kretprobe and uretprobe to use RetProbeContext in response to aya-rs/aya#700 and aya-rs/aya#912
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, great work!
Update kretprobe and uretprobe to use RetProbeContext in response to aya-rs/aya#700 and aya-rs/aya#912
Here's my stab at #700. Feel free to let me know if anything needs to be changed or if you're looking for something different. 🙂🙃
Separated
args
access tokprobe
/uprobe
andret
access tokretprobe
/uretprobe
by definingProbeContext
&RetProbeContext
with onlyargs
&ret
respectively. Then updated the procedural macros forkprobe
/uprobe
to only acceptProbeContext
, andkretprobe
/uretprobe
to only acceptRetProbeContext
.Fixes: #700