linux/arch/mips/net
Johan Almbladh 8110ba0977
bpf: Fix BSWAP 32 and 16 on MIPS64
The 16/32-bit byteswap implementations for MIPS64r1 and earlier do
not have an explicit zero extension afterwards. The input is first
sign-extended to 64 bits, and the byteswap sequence can then leave
the result sign-extended depending on the value of the low bits.

Add the missing zero-extension.

Found with test_bpf on MIPS64r1 emulated by QEMU.

Fixes: fbc802de6b ("mips, bpf: Add new eBPF JIT for 64-bit MIPS")
Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://patch.msgid.link/20260923105158.3514342-2-johan.almbladh@anyfinetworks.com
2026-09-24 01:57:52 +00:00
..
bpf_jit_comp.c bpf: Pass bpf_verifier_env to JIT 2026-04-16 07:03:40 -07:00
bpf_jit_comp.h mips, bpf: Fix reference to non-existing Kconfig symbol 2021-11-30 17:19:36 +01:00
bpf_jit_comp32.c bpf: Fix immediate JMP JEQ/JNE on MIPS32 2026-09-24 01:57:48 +00:00
bpf_jit_comp64.c bpf: Fix BSWAP 32 and 16 on MIPS64 2026-09-24 01:57:52 +00:00
Makefile bpf, mips: Clean up config options about JIT 2021-10-11 15:29:37 +02:00