> Markdown version of [/videos/1199-into-the-hive-of-ebpf?t=460](https://www.wearedevelopers.com/videos/1199-into-the-hive-of-ebpf?t=460). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Into the hive of eBPF! Tired of waiting years for upstream kernel updates? Learn how eBPF securely runs sandboxed code directly within Linux, enabling instant zero-day patching and high-performance networking without system restarts. - **Speakers:** [Mohammed Aboullaite](https://www.wearedevelopers.com/@mohammed-aboullaite) - **Event:** World Congress 2024 - **Published:** August 29, 2024 - **Duration:** 28:20 - **URL:** https://www.wearedevelopers.com/videos/1199-into-the-hive-of-ebpf ## Summary eBPF fundamentally transforms how developers interact with the Linux kernel by making it securely and dynamically programmable. Historically, extending kernel functionality required writing complex kernel modules or enduring a multi-year wait for upstream source code changes to reach stable distributions. eBPF bypasses this bottleneck by allowing developers to run sandboxed, unprivileged code directly within the kernel—analogous to how JavaScript operates within a web browser. This gracefully solves the problem of extending core OS behavior reliably and rapidly without compromising system stability. The execution architecture heavily relies on event-driven hooks (such as kprobes, uprobes, and tracepoints) paired with rigorous safety checks. Programs are typically written in limited C or Rust, compiled into bytecode, and then processed by an in-kernel verifier that guarantees safe memory access and ensures the program has a definitive end state. Once verified, the bytecode is Just-In-Time (JIT) compiled into native machine code, achieving execution speeds virtually equivalent to native kernel operations. Developers maintain vital state across user and kernel space using eBPF maps, while the CO-RE (Compile Once – Run Everywhere) pattern and BPF Type Format (BTF) eliminate multi-kernel-version compatibility issues. Practically, eBPF empowers organizations to deploy continuous delivery pipelines for the operating system, allowing for the live hot-patching of zero-day vulnerabilities or instantaneous updates to core network routing without machine restarts. Core applications range from high-performance networking—offloading packets via XDP before they enter the standard network stack—to establishing enterprise security and cloud-native continuous profiling with minimal CPU overhead. Bolstered by sophisticated tooling like BCC, Cilium, and Katran, eBPF acts as a foundational enabler for modern, low-overhead architectures that confidently replace traditional resource-heavy network sidecars. **Keywords:** ebpf architecture, programmable linux kernel, jit compilation, in-kernel verifier, ebpf maps, kernel space sandboxing, xdp offloading, kprobes and uprobes, continuous profiling tools, co-re pattern, bpf type format (btf), cloud-native observability, zero-day hot-patching, katran load balancer, cilium networking, network sidecar alternatives, bcc python toolchain ## Chapters 1. **Introduction to the growing popularity of eBPF** (00:01) — Background on why cloud native communities are increasingly discussing eBPF technologies. 1. **Origins and evolution of Berkeley packet filter** (01:43) — The transition from static socket packet filtering to extended Berkeley packet filter execution. 1. **Role of the Linux kernel in handling processes** (04:03) — Understand how common high level commands invoke hundreds of complex kernel system calls. 1. **Challenges involved in extending historical kernel functionality** (05:58) — The friction in proposing upstream kernel patches versus maintaining unstable standalone kernel modules. 1. **Making the Linux kernel programmable with sandboxed execution** (07:40) — How eBPF provides a highly effective virtual machine to safely execute code natively in the kernel. 1. **Compiling and verifying bytecode for safe kernel execution** (09:38) — The execution pipeline compiles C or Rust into verified bytecode before just-in-time compilation runs it natively. 1. **Continuous delivery of eBPF using the BCC library** (11:59) — Modifying a Python based eBPF tracing script on the fly demonstrates live updates without restarting the kernel. 1. **Core benefits of secure eBPF APIs** (13:54) — The architecture enables high efficiency, continuous delivery, and long-term stable kernel APIs without compromising system security. 1. **Attaching programs to network events via kernel hooks** (14:56) — Event-driven eBPF processes bind to kprobes, tracepoints, and XDP interfaces to seamlessly handle network packets. 1. **Exchanging persistent information with eBPF maps and helpers** (17:03) — Key value maps safely bridge kernel and user space while helper functions provide crucial utility capabilities. 1. **Improving composability using eBPF functions and tail calls** (18:54) — Chaining tail calls links multiple execution blocks together to context-switch through complex programmable routing paths. 1. **Practical use cases covering networking and performance profiling** (19:56) — Leveraging eBPF non-intrusively tracks processes, optimizes traffic drops, and enforces cloud native security policies. 1. **Comparing runtime libraries for C Go and Rust** (21:30) — High level bindings facilitate building loaders and logic for tools like Aya or BCC using popular programming languages. 1. **Solving cross kernel portability via BTF type definitions** (22:18) — CO-RE methodologies embed offset intelligence so single binaries run appropriately across diverse historical kernel versions. 1. **Evaluating appropriate use cases for eBPF offloading routines** (23:28) — Bypassing heavy CPU tasks ensures the system stays highly responsive while maximizing load balancing wins. 1. **Ecosystem of tooling and future capabilities of eBPF** (24:18) — Open source projects leverage kernel bypass routing to reduce sidecar application latency and dynamically apply remote security patches. 1. **Addressing execution priority overhead and bytecode security concerns** (26:32) — Handling overlapping kernel hook priorities natively comes with measured enterprise compute overhead around two percent. ## Related Moments - [Introduction to eBPF as a secure virtual machine](https://www.wearedevelopers.com/videos/789-gentle-introduction-to-ebpf) (from "Gentle Introduction to eBPF") - [Writing eBPF programs using BCC and bpftrace libraries](https://www.wearedevelopers.com/videos/789-gentle-introduction-to-ebpf) (from "Gentle Introduction to eBPF") - [Architecture and execution lifecycle of eBPF programs](https://www.wearedevelopers.com/videos/1075-an-applied-introduction-to-ebpf-with-go) (from "An Applied Introduction to eBPF with Go") - [Attaching eBPF programs to event-driven kernel hooks](https://www.wearedevelopers.com/videos/789-gentle-introduction-to-ebpf) (from "Gentle Introduction to eBPF") - [Overview of eBPF and Edge Delta observability pipelines](https://www.wearedevelopers.com/videos/1075-an-applied-introduction-to-ebpf-with-go) (from "An Applied Introduction to eBPF with Go") - [Protecting hardware access controls using eBPF security hooks](https://www.wearedevelopers.com/videos/1119-a-hitchhikers-guide-to-container-security-automotive-edition-2024) (from "A Hitchhikers Guide to Container Security - Automotive Edition 2024") ## Related Articles - [Dev Digest 138 - Are you secure about this?](https://www.wearedevelopers.com/magazine/486-dev-digest-138-are-you-secure-about-this) - [Stephan Gillich - Bringing AI Everywhere](https://www.wearedevelopers.com/magazine/489-stephan-gillich-bringing-ai-everywhere) - [Dev Digest 132 - Binging WADFlix?](https://www.wearedevelopers.com/magazine/473-dev-digest-132-binging-wadflix) - [Dev Digest 131 - AI'm not sure about OSS](https://www.wearedevelopers.com/magazine/472-dev-digest-131-ai-m-not-sure-about-oss) ## Related Jobs - [Lead Cloud DevSecOps Engineer - Kubernetes](https://www.wearedevelopers.com/jobs/ext/1659167-lead-cloud-devsecops-engineer-kubernetes) at **BWI GmbH** - [Engineer, Offensive Security Organization](https://www.wearedevelopers.com/jobs/ext/1992296-engineer-offensive-security-organization) at **Twilio** - [Developer Embedded Linux](https://www.wearedevelopers.com/jobs/ext/381560-developer-embedded-linux) at **ZEISS Group** - [Developer Embedded Linux](https://www.wearedevelopers.com/jobs/ext/1543045-developer-embedded-linux) at **ZEISS Group** - [Softwareentwickler Embedded Linux C/C++](https://www.wearedevelopers.com/jobs/ext/1432628-softwareentwickler-embedded-linux-c-c) at **Power Plus Communications AG** - [Devops Engineer](https://www.wearedevelopers.com/jobs/ext/1940926-devops-engineer) at **Bitpanda**