linux/arch
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
..
alpha pci-v7.3-changes 2026-08-23 12:44:10 -07:00
arc Treewide timer related cleanups: 2026-08-18 15:58:29 -07:00
arm ARM updates for 7.3-rc1 2026-08-30 09:43:01 -07:00
arm64 bpf, arm64: set up the frame pointer for the exception callback 2026-09-13 21:59:21 -07:00
csky mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
hexagon Treewide timer related cleanups: 2026-08-18 15:58:29 -07:00
loongarch kmalloc_obj conversions for v7.3-rc2 2026-09-05 20:45:18 -07:00
m68k m68knommu: updates and fixes for v7.3 2026-08-28 08:44:36 -07:00
microblaze Treewide timer related cleanups: 2026-08-18 15:58:29 -07:00
mips bpf: Fix BSWAP 32 and 16 on MIPS64 2026-09-24 01:57:52 +00:00
nios2 mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
openrisc OpenRISC 7.3 updates 2026-08-30 09:26:54 -07:00
parisc parisc architecture fixes and updates for kernel v7.3-rc1: 2026-08-23 10:30:02 -07:00
powerpc treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
riscv bpf-fixes 2026-09-06 13:49:44 -07:00
s390 treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
sh gpio updates for v7.3-rc1 2026-08-19 09:10:07 -07:00
sparc mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
um um: Use asm-generic/timex.h over the host architecture one 2026-08-24 17:10:35 -07:00
x86 bpf-fixes 2026-09-06 13:49:44 -07:00
xtensa Xtensa updates for v7.3 2026-08-28 08:55:47 -07:00
.gitignore
Kconfig VDSO updates: 2026-08-18 16:56:25 -07:00