-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libbpf-cargo: Open skeleton without options by default
In the logic we generate for opening the skeleton, we unconditionally work with some bpf_object_open_opts object, even if the user did not customize anything. That's fine in principle, but it can trigger a bug when a old system libbpf is used and which violates its forward compatibility guarantees. With this change we work around the issue by invoking the bpf_object__open_skeleton() libbpf function with a NULL pointer if SkelBuilder::open() instead of SkelBuilder::open_opts() is being used. This is generally the common case and so we work around the underlying libbpf bug until fixed and new releases rolled out to various distributions. Closes: #927 Signed-off-by: Daniel Müller <[email protected]>
- Loading branch information
1 parent
ccd2a34
commit d105bf2
Showing
2 changed files
with
29 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters