bpf: add the missing BPF instructions
Series of patches adding missing BPF instructions to gas, enabling GCC support.
This is the cover letter for a series of patches aimed at adding several missing BPF instructions to the GNU Assembler (gas). These instructions, such as addr_space_cast, load-acquire/store-release, gotox, and r11 as a stack argument register, are emitted by clang and accepted by the kernel, but were not supported by gas. Adding them is crucial for enabling GCC to generate code for these features. The series has been updated to v3, incorporating feedback and adding new patches.
- proposer
Submits a series of patches to add missing BPF instructions to gas, explaining the need and summarizing the changes in v3.
“gas lacks BPF instructions that clang emits (and the kernel accepts). This showed up recently with callx and gotol support. So instead of playing whack-a-mole address all the current gaps so GCC side can proceed.”
In Details
This series of six patches addresses gaps in gas's BPF instruction support, specifically for instructions used by clang and the Linux kernel that GCC also needs to support. Patches include addr_space_cast (for arenas), load-acquire/store-release, gotox (indirect jump), and r11 as a stack argument register. The changes are primarily in gas/config/tc-bpf.c and gas/doc/c-bpf.texi, with accompanying test cases, and are designed to align gas with newer BPF features.
- BPF
- Berkeley Packet Filter, a technology that allows programs to be run in the Linux kernel without altering kernel source code. It's often used for network packet filtering and more general in-kernel computation.
- gas
- The GNU Assembler, part of the GNU Binutils project, responsible for converting assembly language code into machine code.
- addr_space_cast
- A BPF instruction used to cast between different address spaces, specifically generic and arena address spaces.
- ISA
- Instruction Set Architecture, the set of commands a CPU understands.