-
Notifications
You must be signed in to change notification settings - Fork 25
Exclude unneeded progs #1636
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
base: master
Are you sure you want to change the base?
Exclude unneeded progs #1636
Conversation
Reduce number of bpf programs we include into the final probe. This helps to reduce the probe size, and as a side effect helps fighting debug log truncation due to its large size (it contains relocations for all of those progs).
collector/CMakeLists.txt
Outdated
# $ bpftool prog | grep tracing | awk '{print $4}' > all_progs.list | ||
# $ grep -v -f progs_in_use.list all_progs.list > collector/excluded_progs.list | ||
file(READ "excluded_progs.list" EXCLUDED_PROGS) | ||
STRING(REGEX REPLACE "\n" "" EXCLUDED_PROGS "${EXCLUDED_PROGS}") |
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.
Oh Lord have mercy on our souls :repenting_intensifies:
collector/excluded_progs.list
Outdated
@@ -0,0 +1,140 @@ | |||
^( |
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.
On a somewhat more serious note, could we change this to be a straight up list of progs, then use something like JOIN
to put them together with |
and simply add the ^(
and )$
afterwards?
https://cmake.org/cmake/help/latest/command/string.html#join
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.
Yeah, why not.
How do we keep this synchronized when either new system calls are supported in Falco or new system calls are added to collector ( |
Good question, @robbycochran. I've described in the commentary how the list was generated, so what we could do to make it easier is to automate this process, maybe load list of used syscalls from an external file during the build as well (not just define in the header), and add a CI check to verify if there are any differences. This way if:
|
Description
Reduce number of bpf programs we include into the final probe. This helps to reduce the probe size, and as a side effect helps fighting debug log truncation due to its large size (it contains relocations for all of those progs).
Checklist
Automated testing
If any of these don't apply, please comment below.
Testing Performed
Manual testing.