ebpf
ebpf copied to clipboard
ebpf-go is a pure-Go library to read, modify and load eBPF programs and attach them to various hooks in the Linux kernel.
The current generic abstraction of `bpf_link_info` makes it harder to implement features like #1295. Instead of splitting LinkInfo into a generic part and having extra structs to represent the fields...
cmd/bpf2go: don't require internet connection in tests Disable the checksum db and the module proxy. They aren't needed for tests and disabling means we don't need internet access. Signed-off-by: Lorenz...
While looking at `__weak` support I came across the following pattern used in selftests: ``` void invalid_kfunc(void) __ksym __weak; #define bpf_ksym_exists(sym) \ ({ \ _Static_assert(!__builtin_constant_p(!!sym), #sym " should be marked...
While trying to replicate some tests for `__weak` symbols I discovered that we at pressent don't support `__ksym` variables, only functions. For example, if you were to attempt to load:...
Why is this important ? Why to add additional tests ? goal is to add better test coverage for `parseCPUsFromFile` from actual file, test cases used are from tests in...
We currently inherit an allocation problem from `encoding/binary`: `binary.Size` doesn't cache it's result for slices of structs. This means that our zero-alloc code path via `sysenc` isn't zero-alloc, since we...
adding support to get info data from kprobe_multi/perf_events probes, using it in tetragon [1941](https://github.com/cilium/tetragon/pull/1941)
Allow pinning entire object files at once instead of on a per-map or per-prog basis. Also make it work for bpf2go users. See individual commits for motivation and details.
It generates`coverage.out` as an artifact and merges it to `coverage.html`. fixes #1256
This is guaranteed to match the kernel struct defenitions. I've tried to generate those structs in the `sys` package (`sys/types.go`) but there are private methods so I've tried to write...