]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
s390/bpf: Zero-extend bpf prog return values and kfunc arguments
authorIlya Leoshkevich <iii@linux.ibm.com>
Fri, 13 Mar 2026 17:46:25 +0000 (18:46 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 16 Mar 2026 16:21:35 +0000 (09:21 -0700)
commit202e42e4aa890172366354b233c42c73107a3f59
treef749813a1db42853e378b74381db85be472d8637
parentbb41fcef5c7932e61ce87f573497ab0472cfe496
s390/bpf: Zero-extend bpf prog return values and kfunc arguments

s390x ABI requires callers to zero-extend unsigned arguments and
sign-extend signed arguments, and callees to zero-extend unsigned
return values and sign-extend signed return values.

s390 BPF JIT currently implements only sign extension. Fix this
omission and implement zero extension too.

Fixes: 528eb2cb87bc ("s390/bpf: Implement arch_prepare_bpf_trampoline()")
Reported-by: Hari Bathini <hbathini@linux.ibm.com>
Closes: https://lore.kernel.org/bpf/20260312080113.843408-1-hbathini@linux.ibm.com/
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Tested-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://lore.kernel.org/r/20260313174807.581826-1-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/s390/net/bpf_jit_comp.c