-
Notifications
You must be signed in to change notification settings - Fork 168
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
new(libs): replace elfutils/libelf with elftoolchain/libelf (but with fork this time) #2175
new(libs): replace elfutils/libelf with elftoolchain/libelf (but with fork this time) #2175
Conversation
Please double check driver/API_VERSION file. See versioning. /hold |
453a429
to
9fd784c
Compare
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2175 +/- ##
==========================================
+ Coverage 75.04% 75.19% +0.15%
==========================================
Files 255 259 +4
Lines 33589 33875 +286
Branches 5739 5800 +61
==========================================
+ Hits 25207 25473 +266
- Misses 8382 8402 +20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
9fd784c
to
26b0bef
Compare
cc @Molter73 / @FedeDP (and @federico-sysdig ) do you like this solution? If so, I'll work to fix that pesky CI job so this will be ready for review. After merging I'll initiate the org transfer of the elftoolchain fork. |
My main concern now is that this approach will not work with hermetic builds (i.e no internet access), which we use for our project. I guess we could change the cmake script so we could make elftoolchain use the bundled or a non-bundled version like other dependencies, which in turn might allow adopters to keep using elfutils/libelf with some tinkering if they so choose (this last point would be a nice to have for us, but not a deal breaker). |
I really like this approach!
In the end, the usage of such a library is only useful in Falco context, right? EDIT: am not sure how much work would be needed to support both, ie: the old elfutils/libelf mode (the default IMHO), and the new one. |
Yeah, I assumed something of the sort would work, just worried the new cmake module added will always attempt to download the new library. In any case, if it causes any issues in our workflows I'll fix it, so no need to worry 😄 |
0ed91a8
to
8d8126a
Compare
…libelf Signed-off-by: Luca Guerra <[email protected]>
8d8126a
to
4ec3c74
Compare
Ok, now it works like this:
|
I was wondering, isn't there a way to keep the exact same code as before, with just a change like:
? By avoiding the |
There is an actual reason why we have This should pave the way for another patch I'm working on to essentially get rid of |
${MODERN_BPF_SKEL_DIR} | ||
${LIBELF_INCLUDE} |
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.
@FedeDP : you see how we no longer need to tell libpman to go look for libelf? libpman does not use libelf directly. This is possible because we are building libelf as a native cmake target and "linking" it to the libbpf target
I see, that makes sense! |
@Molter73 does this solution work for you? It should not change anything for your use case |
Awesome! Great work Luca!!
Yup, this should require no changes on our side, thanks for the extra effort you put into this! |
Thanks! If you like it, can you approve? I'll initiate the repo transfer and restore the Falco static build once merged |
Signed-off-by: Luca Guerra <[email protected]>
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
LGTM label has been added. Git tree hash: 1806f997a58f094601343e5ab284d419bfe6a8b8
|
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, LucaGuerra, Molter73 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 |
/milestone 0.20.0 |
/unhold |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area build
/area libscap-engine-modern-bpf
Does this PR require a change in the driver versions?
No
What this PR does / why we need it:
Following from discussion in #2174 this is an alternate implementation. Here, we are downloading elftoolchain/libelf from a forked repo which you can find here https://github.com/LucaGuerra/elftoolchain . As you can see, it only downloads libelf and it is also versioned. The content of the patches is the same.
Of course, if we like this idea and we end up merging it we'll work to port
elftoolchain
within thefalcosecurity
org instead of my own personal account :)Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: