-
Notifications
You must be signed in to change notification settings - Fork 170
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
Keep the license passed in bpf_attr #37
Conversation
This reverts half of commit 8918b95. It makes eBPF work at all again, at least on Ubuntu 16.04 and 20.04 Signed-off-by: Grzegorz Nosek <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
I'm approving this with the main purpose of unblocking falcosecurity/falco#1552
See the comment above.
@@ -154,6 +154,7 @@ static int bpf_load_program(const struct bpf_insn *insns, | |||
attr.prog_type = type; | |||
attr.insn_cnt = (uint32_t) insns_cnt; | |||
attr.insns = (unsigned long) insns; | |||
attr.license = (unsigned long) "GPL"; |
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.
I see this as a workaround. The root issue should be in our loader (that is not parsing 'license' section).
Could we add a comment so we won't forget to fix the loader in the future?
LGTM label has been added. Git tree hash: 3d2145b9f25a640c37f1a489213c789a1561f694
|
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.
Since #42 fixed the root issue, IMO we don't need this workaround anymore.
Thanks anyway!
Thanks for bringing this up Grzeg. #42 is in. I believe we can close this /close |
@leodido: Closed this PR. In response to this:
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. |
This reverts half of commit 8918b95.
It makes eBPF work at all again, at least on Ubuntu 16.04 and 20.04
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:
Without an explicit license in the
bpf_attr
struct, the bpf() syscall returns -EFAULT when loading any eBPF program:Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Based on my reading of https://man7.org/linux/man-pages/man7/bpf-helpers.7.html#LICENSE, fetching the license from a dedicated section is a userspace feature (libbpf, maybe?)
cc @fntlnz
Does this PR introduce a user-facing change?: