DOOM in the kernel, or fibers in eBPF
A 30-minute write-up on running DOOM inside eBPF on a stock Linux kernel
- Category
- Other
- Website
- ayles.github.io
- Language
- English
- Listed
- 4d ago
eBPF programs are supposed to be small: a tiny stack, five argument registers, a limited call depth, no recursion, and loops that the verifier can prove will end. DOOM fits none of those constraints, which is what makes this write-up interesting. Published on 2026-09-09 and marked as a 30-minute read, it walks through getting DOOM to run as a BPF program on an unmodified Linux kernel. The object file passes the stock verifier and runs through the stock JIT with no kernel patches. Initialization, game logic and rendering all execute inside the kernel. One game tick, including a complete rendered frame, finishes within a single BPF invocation. The second half of the title, fibers in eBPF, points at the technique the piece is really about.