Next steps for BPF support in the GNU toolchain
3 days ago
- #Compiler
- #GCC
- #BPF
- Integration of BTF and CTF in the GNU toolchain is progressing, with libctf now able to produce and consume BTF.
- Enhancements needed for BTF to replace CTF include a string header field, agreement on structure member format in archives, and floating-point data representation.
- GCC's BPF backend is under development, with a focus on adding support for btf_decl_tag and btf_type_tag attributes to improve BPF verifier compatibility.
- Challenges in GCC BPF backend include bugs, may_goto instruction support, and producing verifiable code that passes the BPF verifier.
- A new compiler flag, -fverifiable, is proposed to ensure GCC optimizations do not break BPF verification, with discussions on how to implement it effectively.
- Debate exists on whether compiler adjustments or verifier improvements are the better approach to ensuring BPF program safety and verifiability.