-
Notifications
You must be signed in to change notification settings - Fork 115
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
Allow users to skip Kernel check for bpf_loop functionality #1612
Allow users to skip Kernel check for bpf_loop functionality #1612
Conversation
c7ec80f
to
aaf9316
Compare
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! Sweet, this is a really good suggestion!
Hey @markrogers95, thanks for that. This looks good. As a mere suggestion, if you feel like going the extra mile, instead of implementing this as an option, we can auto-detect the support for
The program can be something stupid, that tries to call bpf_loop, such as:
You can then check the verifier error |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1612 +/- ##
=======================================
Coverage 71.13% 71.14%
=======================================
Files 197 197
Lines 19871 19876 +5
=======================================
+ Hits 14136 14141 +5
- Misses 5057 5058 +1
+ Partials 678 677 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
One thing I forgot to mention: this PR does not need to include any new object files, as there are no changes to actual ebpf programs - do you mind doing without them? I'm assuming they popped up because you used |
@rafaelroquetto thanks for the review! Spot on RE the make dev/compile changing the object files, I've corrected that now. Interesting point on the check for bpf_loop functionality - I did originally think about a slightly cleverer check for this, but opted for the flag as a simpler option in the spirit of the original check and the surrounding code. Happy to take the project's steer here! |
@markrogers95 great, your PR LGTM! We can go with the flag for now, I have some plans to revisit all of those kernel checks in Beyla and I can deal with the auto-detection then! Thanks again for your contribution! |
Amazing, thanks @rafaelroquetto - excited to contribute! Checked the integ tests and it looks like they've hit a test timeout in some semi-new functionality, I don't think this is related to my changes at all rather it looks like it's hit the timeout - is this something you've seen before? |
hey @markrogers95, some integration tests are broken. We have WIP to fix it, so hopefully soon we can merge this. |
ah nice, thanks @marctc - looks like only select people can merge, is there anything more needed from me here to get this over the line? if not, I'll await the merge and look forward to taking in the changes! |
Hey @markrogers95, I just merged the test fix PR #1617, if you don't mind merging main again and we'll kick off the tests. Thanks! |
nice @grcevski - thanks! I've merged now 👍 |
Thanks so much for your contribution @markrogers95 ! |
Thanks all for your reviews and having me onboard! |
Hello @grafsean!
Please, if the current pull request addresses a bug fix, label it with the |
Some patched/modified kernels have the required bpf_loop functionality ported back, for example RHEL9.2. The current check silently rejects these kernels for network based context propagation, which is difficult to debug without going over the code.
I have opted for a user-supplied variable here, so as to not introduce any unnecessary complexity to the uname parsing in common_linux.go. Feels like adding something to parse the
el
information out of<maj>.<min>.<patch>-<rel>.el9_2.<arch>
is both fragile and specific to one distro. Using a documented variable here to skip the check allows users who know their kernel has the required functionality to proceed with the context propagation as required.