Entrypoint Handler and Code Generator
This project performs two main tasks:
- First, it autogenerates the eBPF codes based on user requirements.
- Second, it attaches different entrypoints to trace several events based on user requirements.
The autogenerated codes are available in ./entries folder. There are samples of generated code under ./samples subfolder.
Environment
- OS: Ubuntu 20.10
- Kernel: v5.8
Known requirements
This project is mainly based on libbpfgo.
See how to install libbpfgo here.
Building and running
make all
The above make will compile the main executable entrypoint.
This executable can be run with three main options; each defaulted to false.
sudo ./entrypoint -generate=<true/flase> -make=<true/false> -attach=<true/false>
-generate: based on kernel events to trace, this option will generate one or several eBPF codes.
-make: this option is used to compile autogenerated eBPF code from source to object file.
-attach: load and attach compiled eBPF code to different hooks (kprobe/kretprobe, tracepoints, etc.)