-
Notifications
You must be signed in to change notification settings - Fork 382
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
tetragon: Separate execve sensor into taill called programs #456
Conversation
b9dd8aa
to
d0094ef
Compare
Adding mergeSensorMaps function that merges sensor maps together. Signed-off-by: Jiri Olsa <[email protected]>
Signed-off-by: Jiri Olsa <[email protected]>
Separating execve sensor into 2 programs: 1) event_execve 2) execve_send The 1) does the data retrieval and 2) sends event to the user space. This separation simplifies the code and allows us to move to clang 14, which generates un-verifiable code without the split. We can split 1) even further in future if needed, so far separating 2) simplified the code enough. Signed-off-by: Jiri Olsa <[email protected]>
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.
Thank you @olsajiri this solves my problems too for 4.19 and cgroups ;-)
Approved!
@@ -185,10 +188,37 @@ event_execve(struct sched_execve_args *ctx) | |||
fileoff = ctx->filename & 0xFFFF; | |||
binary = event_filename_builder(ctx, execve, pid, EVENT_EXECVE, binary, | |||
(char *)ctx + fileoff); | |||
event->binary = binary; |
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.
this reads a bit strange I'm not sure why
event->binary = event_filename_builder(...)
is not used.
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.
ugh, will fix that in another PR, thanks
The execve is getting more complex and on 4.19 it's reaching
the maximum program size.
Splitting execve sensor into 2 (so far) tail called programs and
adjusting TestLoad* tests.
Signed-off-by: Jiri Olsa [email protected]