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
Fix process_execute_failed
only for supported new kernels
#3881
Fix process_execute_failed
only for supported new kernels
#3881
Conversation
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.
Much better IMO. Thanks for addressing.
@josedonizetti or @geyslan I think one of you should review this as well due to the new kernel compatibility check. |
@AlonZivony when you move it for review, ping us. 👍🏼 |
419d325
to
009b60e
Compare
009b60e
to
9fc0ae6
Compare
This is ready for review :) |
Is this a fix, a feature or a chore? A bit of all? 😀 If a fix, please open one issue to link it exposing the reasons. Tks. I'm reviewing it now. 👍🏼 |
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.
LGTM when addressed a few things.
@AlonZivony I have this PR #3848 that touches on some parts that you also touched on (e.g. attaching probe). I think it's worth taking a look just to catch on upcoming changes. |
9fc0ae6
to
379a507
Compare
a84af2d
to
878a200
Compare
@geyslan I will give you a notice when the PR is ready again. |
878a200
to
5479759
Compare
@geyslan ok now it passes all the tests and ready for review :) |
5479759
to
3105f86
Compare
Add to each probe the option to determine its relevance according to the OS version. If a probe is irrelevant, an attempt to load it won't be initiated. This allows to have different probes for events according to OS version.
Fix an issue that usermode events are only created if they should be emitted.
The previous probe was missing from different distros and kernels. The new probes are safer, but only exist starting from v5.8 of the kernel.
3105f86
to
51177a2
Compare
@@ -129,7 +129,7 @@ for TEST in $TESTS; do | |||
--output option:parse-arguments \ | |||
--log file:$SCRIPT_TMP_DIR/tracee-log-$$ \ | |||
--signatures-dir "$SIG_DIR" \ | |||
--scope comm=echo,mv,ls,tracee,proctreetester,ping,ds_writer \ | |||
--scope comm=echo,mv,ls,tracee,proctreetester,ping,ds_writer,process_execute,tracee-ebpf \ |
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.
Why tracee-ebpf is required here?
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.
I feared that the init_namespaces
event might fail to be submitted in the future because of this filter.
Currently it doesn't matter as scope filters are not applied to it.
Just thought it was a better practice.
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.
LGTM
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.
Relying on kernel version to check if a symbol exists or not is not a good approach.
Commits can be backported (e.g. in RHEL), so we need a more robust way for these kind of checks.
I opened #3983 to fix it quickly for now, as it is not using any choosing mechanism of probes. |
1. Explain what the PR does
9fc0ae6 fix(events): change process_execute_failed probes
e9094a9 feat(events): add probe relevance attribute
Fix #3356
2. Explain how to test it
3. Other comments