-
Notifications
You must be signed in to change notification settings - Fork 162
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(driver/ebpf): fixed eBPF issues on clang5 #109
Conversation
* bound check state->n_drops_X counters * moved off_bounded declaration near its usage in bpf_parse_readv_writev_bufs() * force-disable switch jump table Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Hi @FedeDP. Thanks for your PR. I'm waiting for a falcosecurity member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
It seems like we still got some issues on falco-builder env: falcosecurity/falco#1761 (comment) Let's keep this open in wip mode to track all the required fixes. |
It was an user mistake, the patch is working fine! |
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
/ok-to-test |
More tests:
|
…, not kmod: kmod allows jump table usage. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
LGTM label has been added. Git tree hash: 17c470fe23f300758c47c86d8cbd7cdcb8919a2c
|
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, leogr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Federico Di Pierro nierro92@gmail.com
What type of PR is this?
/kind bug
Any specific area of the project related to this PR?
/area driver-ebpf
What this PR does / why we need it:
It fixes some incompatibilities between eBPF probe and clang5.
Clang5 is provided with falco-builder docker image, thus it is important to support it; see see falcosecurity/falco#1761.
Tested on kernel 4.19.0 and clang 5.0.1, and kernel 5.14.14 and clang 12.0.1.
As the PR actually just adds some checks, i think we can skip the full test matrix.
All the following changes are mandatory:
The latter one was the most tricky: it seems like we already disable jump table in our makefile with the
-fno-jump-tables
flag.But it seems like clang-5 with
-O2
optimization flags, still somewhat makes use of them.Thus, use a "smart" trick to disable them in any case.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: