Introduction to eBPF Load-Acquire and Store-Release Instructions
summary
Adds two BPF_ATOMIC ops providing load-acquire and store-release semantics, available in LLVM 21+ and merged into mainline kernel with support for arm64, x86-64, riscv64 and ppc64. Instructions encode as stx atomic with immediate fields, accept 8/16/32/64 sizes, and subword loads zero-extend. Compiler needs -mcpu=v4 to emit V4 BPF, verifier rejects unaligned accesses and 64-bit acquires on 32-bit kernels, and JITs map to LDAR/LDAPR on arm64 (LDAR chosen) and plain aligned loads/stores on x86-64. -mcpu=auto probing is still limited.
AI-written summary · about
chapters (8)
- 0:00Introduction to eBPF LA/STL
- 2:56Why load acquire and store release
- 9:40Memory model benefits on ARM64
- 10:00Encodings and usage in BPF
- 15:05Compilation to native instructions
- 20:49Kernel verifier and JIT details
- 24:05Potential future work
- 25:52Q&A session
related talks
29meBPF on the Rise - Getting Started
33meBPF: exploring use case of BPF kernel infrastructure
01h 03mBPF and Spectre: Mitigating transient execution attacks
32meBPF: The Next Power Tool of SREs
36mThe journey of BPF from restricted C language towards extended and safe C.
30mBPF for Security and LSM updates
27mBPF LSM - Updates and What next?
36mDebugging with eBPF on Arm Platforms
