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 ABI0
support to Go crypto/tls
eBPF tracer
#1169
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1169 +/- ##
============================================
- Coverage 45.17% 28.16% -17.02%
============================================
Files 137 64 -73
Lines 13255 5252 -8003
============================================
- Hits 5988 1479 -4509
+ Misses 6839 3686 -3153
+ Partials 428 87 -341 Continue to review full report at Codecov.
|
This reverts commit 48b041b.
…to feat/ebpf-go-abi0
… kernel versions older than 5.8 Also; Add legacy version of thread_struct: thread_struct___v46 Build an additional object file for the kernel versions older than or equal to 4.6 and load them accordingly. Add github.com/moby/moby
PR description is updated. |
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.
Approved, except maybe remove support for kernel 4.6. See slack discussion.
Adds
vmlinux.h
for x86 and ARM64 which is generated by the command below in the machines with the corresponding architecture:that contains the declaration of
struct task_struct
. The struct is needed to get the Goroutine ID from thread-local storage. It's described in theABI0
specs.Go
ABI0
(<=1.16) specificationhttps://go.dev/doc/asm
task_struct
, CO-RE andcilium/ebpf
The heap-like area forstruct task_struct
requires ring buffer. It means that; the PR increases the minimum supported Linux kernel version from4.10
to5.8
.We read
task_struct
usingBPF_CORE_READ
. Its memberthread
is athread_struct
andthread_struct
is different in kernel versions older than or equal to4.6
.But
cilium/ebpf
does not support.kconfig
:Therefore; for now, we build object files per kernel version and load them accordingly.
Possible TODOs for this subject;
cilium/cilium
tags images per kernel version. So, do the same thing.cilium/ebpf
to add.kconfig
support. (uncertain)cilium/ebpf
or fork it.Check Lists
Tested
ABI0
works on x86_64ABI0
works on ARM64ABIInternal
works on x86_64ABIInternal
works on ARM64Build Strategies
Test Reference
kubeshark/sock-shop-demo#23