bpf: Support new signed div/mod instructions.
authorYonghong Song <yonghong.song@linux.dev>
Fri, 28 Jul 2023 01:12:19 +0000 (18:12 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 28 Jul 2023 01:52:33 +0000 (18:52 -0700)
commitec0e2da95f72d4a46050a4d994e4fe471474fd80
treef61640998fc71caa7506d67a1bd2668ca1adcce6
parent0845c3db7bf5c4ceb7100bcd8fd594d9ccf3c29a
bpf: Support new signed div/mod instructions.

Add interpreter/jit support for new signed div/mod insns.
The new signed div/mod instructions are encoded with
unsigned div/mod instructions plus insn->off == 1.
Also add basic verifier support to ensure new insns get
accepted.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20230728011219.3714605-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