bpf: Support new 32bit offset jmp instruction
authorYonghong Song <yonghong.song@linux.dev>
Fri, 28 Jul 2023 01:12:31 +0000 (18:12 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 28 Jul 2023 01:52:33 +0000 (18:52 -0700)
commit4cd58e9af8b9d9fff6b7145e742abbfcda0af4af
tree2b6a5c2980c745a2b0096f544a17b6d82bb0fc89
parent7058e3a31ee4b9240cccab5bc13c1afbfa3d16a0
bpf: Support new 32bit offset jmp instruction

Add interpreter/jit/verifier support for 32bit offset jmp instruction.
If a conditional jmp instruction needs more than 16bit offset,
it can be simulated with a conditional jmp + a 32bit jmp insn.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20230728011231.3716103-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/x86/net/bpf_jit_comp.c
kernel/bpf/core.c
kernel/bpf/verifier.c