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
Add CO-RE bitfield support to bindsnoop
#529
Conversation
cdf7d48
to
167b250
Compare
b52dc69
to
a4efbb2
Compare
167b250
to
e5fb9ec
Compare
a4efbb2
to
5dc520b
Compare
26347a2
to
f846a09
Compare
f846a09
to
dc52fe8
Compare
5dc520b
to
414806a
Compare
a6cd587
to
7fdde77
Compare
I reworked this PR to use |
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.
Lest some comments. Please organize the commits a bit, commit messages are not complete and the don't follow a logic sequence.
# There is no way to clear the cache and llvm-strip is needed by bpf2go. | ||
# For now, we will add it here. | ||
sudo apt install llvm |
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.
What about updating the key
used in actions/cache@v2
?
Btw, now that I look with more detail at the logic to install the deb packages, isn't it possible to move all usages of actions/cache@v2
from workflows/inspektor-gadget.yml
to install-debian-packages/action.yml
to avoid repeating that so many times?
I am also not satified with them and I do not really know how to organize them...
|
7fdde77
to
0dffcd6
Compare
Yes, that should work fine. |
1a31213
to
ced6dc7
Compare
6de1edb
to
bef78b3
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.
I tested and it worked fine. Just one last question about debs cache mechanism in github actions.
with: | ||
path: "~/cache-debs" | ||
# Update cache key if you add or update a package. | ||
key: v3 |
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.
One additional question here. What is the procedure to update a dependency? Or better, how avoid this logic to always use the check instead of trying to install new versions of the libraries?
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.
As long as we do not change the cache key, we will be stuck with the version of the software which were installed for this given cache key.
This should not be a problem for libbpf
and libbseccomp
as we install specific version of this libraries, but for llvm
it can be more troublesome...
We will need to think to a better way to handle this case while not losing the speed gain of the cache.
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.
You're right. Let's think about a better way to handle it in another PR.
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! Please notice we should wait the release of v0.5.0 before merging it.
Thank you for the review! |
We need to bump cilium/ebpf to be able to use BPF_CORE_READ_BITFIELD_PROBED(). To do so, we had to modify the following due to upstream changes: 1. Replace ebpf.RemoveMemlockRlimit() by rlimit.RemoveMemlock(). The former was removed in: 8ea11c59b057 ("rlimit: create package, only bump memlock to infinite if necessary") 2. Add -no-global-types to bpf2go running due to compile errors. 3. Add nil as last argument to link.K(ret)?probe() and link.Tracepoint() because they take now an option argument. 4. Add llvm to container software and CI because bfp2go now needs llvm-strip. Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
…dsnoop CO-RE." This reverts commit ff78729.
Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
bef78b3
to
873557c
Compare
0.5.0 has been released, do you want to merge this now? |
Le mercredi 27 avril 2022, 13:51:06 BST Marga Manterola a écrit :
0.5.0 has been released, do you want to merge this now?
Yes! This is why I rebased it but I forgot to check the results of the CI
yesterday 😅.
|
Thank you for the reviews! |
Hi.
This PR uses a new feature from
cilium/ebpf
to be able to print port and options of abind()
.Best regards.