eBPF: Loading in different kernels
Objective
- to learn loading compiled eBPF program in different kernels within
Github Actions
- for testing its compatibility with kernel and observe if it loads correctly
Featured in
Reasoning
LVH
For loading eBPF object in different kernels, we will be using little-vm-helper(LVH), an open-source cilium project for creating light-weight virtual machines.
LVH has Github Action that can be used to launch a little-vm
with a custom linux-kernel image
inside Github Action Runner VM.
LVH Images
Kernel images used by LVH are built using another open-source cilium project namely little-vm-helper-images. These kernel-images are stored here.
As of now 3 variants of images are available:
- base
- kind
- complexity-test
These differ by:
-
packages: the kind of packages available inside them, e.g in some
dig
is not available.
Code
Note
Try forking the ebpf-playground and triggering the workflows.
- Visit here for getting kernel tags
- List of kernel images to test against.
- Downloading the eBPF object to load
-
Note
- Using LVH to provision virtual-machine with given kernel
- Mounting the
$PWD
inside VM at/host
- Loading the program