eBPF & bcc Toolset

Extended BPF programs for tracing, networking, and security — bcc tools, bpftrace one-liners, and production use cases.

Overview

eBPF (extended Berkeley Packet Filter) lets you run sandboxed programs in the Linux kernel without changing kernel source or loading kernel modules. The kernel verifies all eBPF programs for safety (no infinite loops, no out-of-bounds access) before running them.

How It Works

  • Write a C program using the BPF API
  • Compile with Clang/LLVM to BPF bytecode
  • Load via bpf() syscall — kernel verifier checks safety
  • JIT compiler translates to native machine code
  • Program runs at a hook point: kprobe, tracepoint, XDP, cgroup, LSM hook, etc.

Key concepts

  • BPF verifier
  • XDP (eXpress Data Path)
  • BPF maps
  • kprobe

Interview questions

  • How does eBPF allow safe kernel instrumentation without kernel modules, and what does the verifier check?
  • How does Cilium use eBPF to replace kube-proxy, and what are the performance benefits?

Sign up free to read the full topic

More Linux topics

Start free on Cariara · Coding problems · System design studio