
What Is eBPF? Programs, Maps and the Verifier
eBPF runs small verified programs inside the Linux kernel. Learn the three parts that matter, programs, maps and the verifier, with a first complete example.
Tag
82 posts

eBPF runs small verified programs inside the Linux kernel. Learn the three parts that matter, programs, maps and the verifier, with a first complete example.

A process is a running program plus the kernel's record of it: a PID, a private address space and a table entry. See each part in C on Linux.

Learn what the GStreamer base, good, bad, ugly and libav plugin sets contain, how to install them on Linux, and how to map a missing element to its package.

Compare epoll level-triggered and edge-triggered modes with EPOLLET, see exactly when each reports readiness, and pick the right one for your server.

Read each column of /proc/interrupts, find which CPU serves a device, and pin an IRQ to chosen CPUs with smp_affinity_list on Linux 6.12.

Write a single-threaded TCP echo server on Linux with epoll_create1, epoll_ctl and epoll_wait, using non-blocking sockets and a clean accept and read loop.

A cheat sheet of the errno values you meet most on Linux, such as ENOENT, EACCES, EINTR and EAGAIN, with the cause, the reaction and when not to retry.

Find out whether your CPU supports hardware virtualization on Linux by reading the vmx and svm flags, running kvm-ok and checking that /dev/kvm exists.

A process owns an address space and a thread is a schedulable flow inside one. See what each shares and isolates on Linux, with fork and pthread_create code.

Reserve 1 GiB huge pages at boot on Linux with the hugepagesz=1G and hugepages= kernel parameters, check the pdpe1gb flag, and verify the pool in /proc/meminfo.

cgroups v2 replaces v1's many hierarchies with one unified tree and different file names. What changed, how to detect which one you run, and how to migrate.

Record a program's system calls with strace, turn the list into a libseccomp allowlist, and test it with a logging default before you switch to kill.