The Linux operating system uses eBPF technology to run sandboxed software programs inside the kernel without requiring administrators to modify core source code or compile risky out-of-tree device driver modules [7]. By running event-driven bytecode under an in-kernel verifier and Just-In-Time (JIT) compiler, eBPF technology gives engineers low-overhead telemetry, fast network packet filtering, and custom security controls. Linus Torvalds praised the design, noting that “BPF has actually been really useful, and the real power of it is how it allows people to do specialized code that isn’t enabled until asked for”. Founding industry partners Meta, Google, Isovalent, Microsoft, and Netflix established the eBPF Foundation to guide development of this runtime, later joined by Red Hat, Huawei, and Crowdstrike [19].
Origins of eBPF Technology
The runtime began as an expansion of the classic Berkeley Packet Filter (cBPF), a 1990s Unix tool created to inspect and filter network socket traffic. In the original cBPF design, packet filtering ran on two 32-bit registers called A and X, supported by an accumulator, a hidden frame pointer, and seccomp filters that inspected raw system call data [14]. Linux kernel maintainer Daniel Borkmann submitted foundational patch sets to the Linux network development list, introducing cls_bpf classifier support and removing legacy kernel test stubs to turn a packet filter into a general engine. Working on git trees like iproute2 and net-next, Borkmann and kernel contributors exported BPF_PSEUDO_MAP_FD to user space and cleaned socket filter code to enable rich kernel programmability without source forks [15].
Engineers expanded the register model from 2 to 10 general-purpose 64-bit registers, supplemented by an eleventh read-only frame pointer designated R10 to store local stack frame references. These ten registers map to hardware CPU registers. On x86_64, arm64, sparcv9, and mips64 servers, the 64-bit calling convention matches hardware application binary interfaces, allowing register values R1 through R5 to pass arguments to in-kernel functions without translation penalties. The design replaced conditional jumps with jump-true and fall-through logic for faster branching [14].
Vadim Shchekoldin designed the official eBee logo. Industry adoption grew when Red Hat, Huawei, Tigera, Datoms, DaoCloud, and FutureWei joined the eBPF Foundation to standardize runtime specifications for enterprise clouds. Today, eBPF technology powers deep observability on Linux clusters run by Google, Netflix, and Meta [19].

The In-Kernel Virtual Machine
The runtime operates as a 64-bit RISC register machine embedded in the Linux kernel, using eleven 64-bit registers designated R0 through R10 that provide 32-bit subregisters for arithmetic operations. Register R0 stores function return codes, registers R1 through R5 pass input arguments, and registers R6 through R9 act as callee-saved registers that keep their contents between helper calls. When an event triggers an attached program, the operating system loads a context pointer into R1, pointing to network sk_buff buffers for packet filters or seccomp_data structures for system call monitors. The instruction set implements 87 discrete instructions, including 64-bit arithmetic logic units, atomic counters, and endianness conversion tools that map cleanly to native hardware instructions on x86_64 chips [14].
Memory limits in the virtual machine are set to preserve host server stability. Every loaded program receives a private 512-byte stack frame for local variables, preventing memory leaks and keeping resource consumption predictable under heavy multi-tenant cloud workloads [17, 19]. When authors combine BPF-to-BPF function calls with tail calls, the Linux kernel shrinks caller stack depth to 256 bytes, guaranteeing that 32 nested tail calls never exceed 8 kilobytes of kernel stack. This guard prevents stack overflow crashes on real-time and production server kernels [17].
The virtual machine isolates kernel memory. Developers exploring the architectural safety mechanisms within the Linux engine examine how this sandboxing model prevents invalid pointer dereferences without degrading raw hardware throughput. A Just-In-Time compiler translates verified bytecode into native machine instructions, matching the speed of compiled C modules [7].
Static Verification and Safety Guarantees
Before any bytecode instruction runs inside the kernel, the program must pass the eBPF verifier, which carries out static code analysis to verify that the code cannot crash the host [7, 19]. The verifier performs depth-first graph traversal through all execution branches, simulating register state transitions and tracking stack pointer offsets through abstract interpretation to block out-of-bounds reads and uninitialized memory access [14, 19]. Early implementations capped program size at 4096 instructions to ensure fast termination, but today’s kernels accept bounded loops as long as exit conditions are mathematically provable at load time [7, 14]. The verifier also prevents concurrency deadlocks by requiring that programs release all held spinlocks before exit, allowing only a single lock to be held at any given moment [19].
How could testing tools discover kernel runtime bugs when the verifier stops malformed bytecode at load time? In a 2024 study, researchers H. Hung and A. A. Sani created BRF, an automated testing tool designed to evaluate the eBPF runtime subsystem. They found that the standard kernel fuzzer Syzkaller fails to trigger runtime paths because verifier checks reject inputs that lack proper system call dependencies or required semantics [3]. BRF generated valid dependencies to test deep paths.

The kernel hardens verified programs against attacks. Kernel memory holding bytecode is marked read-only, while constant blinding replaces immediate values with masked calculations to thwart attackers attempting Just-In-Time spraying against host memory. To counter speculative execution leaks like Spectre, the verifier analyzes transient execution paths and inserts protective memory access masks [7].
How eBPF Technology Executes Bytecode
Developing software for eBPF technology begins in high-level languages like C or P4 rather than raw hex opcodes, compiling code through LLVM and the Clang compiler suite [1, 7]. The compiler outputs standard Executable and Linkable Format (ELF) binaries containing bytecode sections, which the libbpf user-space library opens, parses, and loads into the kernel using the bpf system call [7, 18]. Libraries like libbpf-bootstrap, bcc, and bpftrace provide higher abstractions, letting systems engineers define intent-based monitoring policies while Cilium injects verified networking logic into Linux container pods without manual bytecode authoring [7, 13]. Once the bpf system call validates user credentials like root status or CAP_BPF capabilities, the kernel attaches bytecode to predefined hook points on network drivers and system calls [7].
Porting compiled binaries between different Linux distributions once required recompiling on every target host. The community solved this limitation with BPF CO-RE (Compile Once – Run Everywhere), which relies on BPF Type Format (BTF) metadata generated from kernel structures at /sys/kernel/btf/vmlinux. By dumping types into vmlinux.h with bpftool, Clang records struct offset relocations that libbpf reconciles dynamically at runtime, guaranteeing portability even when kernel internal layouts change [18]. This mechanism eliminates target host kernel header dependency issues.
Program composition combines function calls with tail calls. Before Linux 4.16 and LLVM 6.0, compilers had to inline every sub-function, but current kernels support native BPF-to-BPF calls that conserve CPU cache and instruction space [19]. Tail calls use BPF_MAP_TYPE_PROG_ARRAY tables and bpf_tail_call helpers to jump to new programs without returning, capped at 32 jumps [17].

State Management and Shared Maps
Because programs run briefly, storing state needs maps. In eBPF technology, maps are kernel-managed key-value stores that let sandboxed programs share data between kernel routines and user-space background daemons using system calls [7, 19]. Supported types include hash tables, arrays, ring buffers, stack traces, and longest prefix match (LPM) trie structures [7].
At Cloudflare, infrastructure engineers used kernel maps when building tubular, an open-source socket management tool built to fix limitations in the BSD socket API for millions of IP addresses. Cloudflare services like Spectrum and the 1.1.1.1 public DNS resolver must bind multiple endpoints to port 80 or 8080 on 127.0.0.1 without conflicting with authoritative nameservers. The tubectl utility registers socket file descriptors through the pidfd_getfd system call and systemd units, storing routing bindings inside an LPM trie map that matches IP prefixes with numeric identifiers. To survive daemon crashes and allow unattended online upgrades, tubular persists maps in /sys/fs/bpf using the BPF_OBJ_PIN system call without dropping a single live network connection [10].
Lockless map architectures are essential for high-frequency network monitoring on multi-core server processors. In research on packet monitoring, S. Miano, X. Chen, R. B. Basat, and G. Antichi implemented NitroSketch in eBPF to evaluate traffic measurement accuracy and CPU overhead. They showed that standard user-space algorithms suffer cache penalties inside the kernel, but redesigning lookup tables and per-CPU maps reduced memory overhead and boosted measurement throughput by 40% [2]. Per-CPU maps prevent multi-core lock contention during packet counting.

Packet Processing with Express Data Path
High-throughput networking represents a leading deployment area for eBPF technology, where the eXpress Data Path (XDP) provides a programmable packet processing layer inside network device drivers. When a packet arrives from the physical wire, the network interface card (NIC) driver triggers an attached XDP program before the Linux kernel allocates expensive sk_buff socket buffers [1, 9]. Research by M. A. M. Vieira and colleagues in ACM Computing Surveys shows that XDP allows commodity Linux servers to perform line-rate packet filtering, traffic shaping, and load balancing. Because programs run in driver mode before kernel network stack traversal, servers can inspect headers and drop malicious traffic without wasting precious CPU cycles on buffer allocation [1].
Engineers Nikita Shirokov, Ranjeeth Dasineni, and Changigi at Meta developed Katran, an open-source software layer-4 load balancer deployed in points of presence to handle facebook.com traffic. Katran replaced an older IPVS balancer that suffered CPU bottlenecks on separate servers. By pairing XDP with an extended Maglev consistent hash algorithm, Katran balances traffic evenly across backend servers, using lockless per-CPU maps that scale throughput linearly with NIC receive queues [9]. Katran runs on standard commodity Linux server hardware.
Kernel network functions also encounter realistic operational limits. While Polycube demonstrated modular chaining of in-kernel network functions, research by F. Shahinfar, S. Miano, A. Panda, and G. Antichi revealed that not all networked workloads gain speed [4, 5]. Heavy state management can lead to performance isolation violations when diverse microservice workloads compete for kernel memory [5].
Tracing with Kernel Security Modules
Beyond packet routing, the runtime provides granular system observability and performance tracing on cloud server fleets without requiring system administrators to patch or restart running kernels [7, 12]. Brendan Gregg, senior performance architect at Netflix and author of Systems Performance and BPF Performance Tools from Addison-Wesley, received the USENIX LISA Award for creating flame graphs and tracing utilities. Gregg revealed that production Netflix cloud instances run 15 BPF programs by default, while Facebook instances run over 40 programs to collect latency histograms and trace system events. Because programs attach dynamically to kernel probes (kprobes), user probes (uprobes), and tracepoints, Brendan Gregg famously dubbed eBPF “superpowers for Linux” for giving operators complete visibility into application bottlenecks [12, 19].
Kernel security took a major step forward when Linux 5.7 introduced BPF_PROG_TYPE_LSM, an infrastructure patch set developed by K. P. Singh and security engineers at Google [11, 16]. Standard Mandatory Access Control frameworks like SELinux and AppArmor rely on static access policies. BPF LSM programs attach to Linux Security Module hooks via BPF trampolines, evaluating process credentials and returning permission codes before security-sensitive system calls can execute [11, 16]. Loading LSM security programs needs CAP_SYS_ADMIN system capabilities [16].

Cloudflare used LSM programs for live security. To stop privilege escalation attacks, Cloudflare engineers attached an LSM program to the cred_prepare hook on Linux 5.15, blocking unprivileged users from calling unshare with CLONE_NEWUSER flags. Kernel ftrace measurements showed this dynamic policy blocked the vulnerability with only 6,844 CPU cycles of overhead [11].
Why eBPF Technology Reaches New Systems
While the runtime originated inside the Linux kernel, widespread interest in unified systems engineering has pushed eBPF technology onto non-Linux platforms like Windows 10 and Windows Server 2016. Microsoft engineers Dave Thaler and Poorna Gaddehosur launched the open-source ebpf-for-windows project, adapting the IOVisor uBPF virtual machine and the PREVAIL verifier to run inside the Windows kernel execution context. Rather than modifying core Windows kernel source code, ebpf-for-windows exposes Libbpf APIs and implements shims that wrap native Windows APIs, allowing standard hooks like XDP and socket bind to function. The PREVAIL verifier runs inside a user-mode protected process, allowing Windows kernel components to trust verified bytecode and execute native machine code generated by the uBPF JIT compiler [8].
Extending operating system interfaces without full vendor kernel upgrades reflects broader developer trends. Community projects such as how developers built unofficial DirectX 12 graphics modifications for older Windows releases show how external tooling can unlock advanced APIs without formal operating system revisions. Similarly, Microsoft’s netsh command-line tool and Libbpf shared libraries give developers identical programming models on Windows and Linux, simplifying tool maintenance across heterogeneous server fleets [8]. Common hooks enable portable code deployment across operating systems.
New frontiers continue adopting in-kernel bytecode solutions. In 6G cellular network simulations, research by M. K. Pasupuleti used eBPF telemetry in NS-3 to feed multi-agent reinforcement learning agents, improving tail latency by 28% to 41% [6]. From Android and Samsung Galaxy smartphones to Yahoo! and Dropbox cloud services, eBPF technology provides trusted kernel programmability [19].
- ACADEMIC JOURNAL Vieira, M. A. M., Castanho, M. S., Pacífico, R. D. G., Santos, É. R. S., Júnior, E. P. M. C., & Vieira, L. F. M. (2020). Fast packet processing with eBPF and XDP: Concepts, code, challenges, and applications. ACM Computing Surveys, 53(1), 1-36. [Article Link]
- ACADEMIC JOURNAL Miano, S., Chen, X., Basat, R. B., & Antichi, G. (2023). Fast in-kernel traffic sketching in eBPF. ACM SIGCOMM Computer Communication Review, 53(1), 3-13. [Article Link]
- ACADEMIC JOURNAL Hung, H., & Sani, A. A. (2024). BRF: Fuzzing the eBPF runtime. Proceedings of the ACM on Software Engineering, 1(FSE), 1152-1171. [Article Link]
- ACADEMIC JOURNAL Miano, S., Risso, F., Bernal, M. V., Bertrone, M., & Lu, Y. (2021). A framework for eBPF-based network functions in an era of microservices. IEEE Transactions on Network and Service Management, 18(1), 133-151. [Article Link]
- ACADEMIC JOURNAL Shahinfar, F., Miano, S., Panda, A., & Antichi, G. (2025). Demystifying performance of eBPF network applications. Proceedings of the ACM on Networking, 3(CoNEXT3), 1-21. [Article Link]
- ACADEMIC JOURNAL Pasupuleti, M. K. (2023). NS-3 for 6G: Multi-agent RL slicing with eBPF telemetry. International Journal of Academic and Industrial Research Innovations, 3(6), 162-177. [Article Link]
- WEBSITE eBPF Project. (2026). What is eBPF? An introduction and deep dive into the eBPF technology. ebpf.io. [Article Link]
- WEBSITE Thaler, D., & Gaddehosur, P. (2021, May 10). Making eBPF work on Windows. Microsoft Open Source Blog. [Article Link]
- WEBSITE Shirokov, N., Dasineni, R., & Changigi. (2018, May 22). Open-sourcing Katran, a scalable network load balancer. Engineering at Meta. [Article Link]
- WEBSITE Cloudflare. (2022, February 17). Production ready eBPF, or how we fixed the BSD socket API. Cloudflare Blog. [Article Link]
- WEBSITE Cloudflare. (2022, June 29). Live-patching security vulnerabilities inside the Linux kernel with eBPF Linux Security Module. Cloudflare Blog. [Article Link]
- CONFERENCE PAPER Gregg, B. (2021, June). BPF internals. USENIX LISA21, USENIX Association. [Article Link]
- CONFERENCE PAPER Borkmann, D. (2020, August 19). eBPF and Kubernetes: Little helper minions for scaling microservices. KubeCon + CloudNativeCon Europe 2020, Sched. [Article Link]
- WEBSITE Linux Kernel Organization. (n.d.). Classic BPF vs eBPF. The Linux Kernel Documentation. [Article Link]
- WEBSITE Borkmann, D. (2015, February 11). [RFC PATCH net-next 0/7] eBPF support for cls_bpf. Spinics Linux Network Development. [Article Link]
- WEBSITE Singh, K. P. (2020, March 29). [PATCH bpf-next v9 0/8] MAC and audit policy using eBPF (KRSI). Spinics Linux BPF Development. [Article Link]
- WEBSITE eBPF Documentation Project. (2025, March 23). Tail calls. eBPF Docs. [Article Link]
- WEBSITE eBPF Documentation Project. (2024, July 28). BPF CO-RE. eBPF Docs. [Article Link]
- WEBSITE Wikipedia contributors. (n.d.). EBPF. Wikipedia, The Free Encyclopedia. [Article Link]