-
Notifications
You must be signed in to change notification settings - Fork 323
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
Add Prefix
and NotPrefix
operators to matchBinaries
#1732
Conversation
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
00a4dda
to
4fc0539
Compare
cc @tpapagian @kkourt (I pinged you since you reviewed the previous one, it might be easier to read this one) This is not 100% done (still in draft) because I still need to make it work with 4.19 but if you have some time to take a look 👀 while I'm on PTO (basically end of this week and next week) it would be lovely. For 4.19 to work, maybe we can reduce the max size of the prefix |
4fc0539
to
8323121
Compare
So I've disabled matchBianries Prefix for kernel < 5.3, d92ee0c. Now everything pass. |
Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
This is reusing the LPM_TRIE map from the matchArgs on string for prefixes. Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
It uses classical testing and also add perfring tests to make sure events filtered are indeed missing. Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
New matchBinaries prefix operator reuse the LPM_TRIE map and some of the code of the matchArgs string/path prefix operator. This test checks that those two still work together. Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
Programs where already at the limit for the size of progs for 4.19 kernels, this disables the Prefix/NotPrefix feature for <5.3.0. Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
d92ee0c
to
89a0720
Compare
cc @kevsecurity I bumped the CRD version, 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.
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.
LGTM, thanks!
This PR goes on top of #1731. It fixes #1278.
The implementation is pretty trivial thanks to the work that was already done with prefix on
matchArgs
and the changes of the #1731.