mirror-linux/arch/x86/net
Kumar Kartikeya Dwivedi a91ae3c893 bpf, x86: Add support for signed arena loads
Currently, signed load instructions into arena memory are unsupported.
The compiler is free to generate these, and on GCC-14 we see a
corresponding error when it happens. The hurdle in supporting them is
deciding which unused opcode to use to mark them for the JIT's own
consumption. After much thinking, it appears 0xc0 / BPF_NOSPEC can be
combined with load instructions to identify signed arena loads. Use
this to recognize and JIT them appropriately, and remove the verifier
side limitation on the program if the JIT supports them.

Co-developed-by: Puranjay Mohan <puranjay@kernel.org>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Link: https://lore.kernel.org/r/20250923110157.18326-2-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-09-23 12:00:22 -07:00
..
Makefile bpf, x86: Add x86 JIT support for timed may_goto 2025-03-15 11:48:28 -07:00
bpf_jit_comp.c bpf, x86: Add support for signed arena loads 2025-09-23 12:00:22 -07:00
bpf_jit_comp32.c bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro() 2024-03-14 19:28:52 -07:00
bpf_timed_may_goto.S bpf, x86: Fix objtool warning for timed may_goto 2025-03-15 15:55:14 -07:00