BPF Static Keys
summary
Adds a BPF Static Keys API that compiles helpers into asm goto-generated NOP/JUMP patches and registers a list of patch points so user space can toggle branches by writing 0/1 into a map of size one. Kernel receives patch instruction offsets, jump targets and map pointers, applies per-branch replacement (NOP ↔ JUMP) for enabled/disabled behavior, refuses normal BPF access to those maps, and supports C and Go loaders and shared keys across programs for low-latency (ms–s) tracing toggles without recompiling.
AI-written summary · about
chapters (10)
- 0:00Introduction to BPF static keys
- 1:04Static key interface in kernel
- 4:06Extending BPF API for static branches
- 10:38Program loading and verification
- 13:08Impact on JIT generated code
- 17:25Runtime static key changes
- 20:14Atomic updates and verification
- 22:03Performance and use cases
- 23:50Why not automate static keys
- 26:01Q&A
related talks
25mDiscussion: What's next for BPF Signing
27mBPF LSM - Updates and What next?
24mBPF Signing and IMA integration
36mThe journey of BPF from restricted C language towards extended and safe C.
43mHotBPF++: A More Powerful Memory Protection for the Linux Kernel
29meBPF on the Rise - Getting Started
33meBPF: exploring use case of BPF kernel infrastructure
20mEPF: Evil Packet Filter
