Skip to content

Commit c49f7db

Browse files
Jiong WangAlexei Starovoitov
authored andcommitted
bpf: verifier remove the rejection on BPF_ALU | BPF_ARSH
This patch remove the rejection on BPF_ALU | BPF_ARSH as we have supported them on interpreter and all JIT back-ends Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
1 parent 2dc6b10 commit c49f7db

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

kernel/bpf/verifier.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3649,11 +3649,6 @@ static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn)
36493649
return -EINVAL;
36503650
}
36513651

3652-
if (opcode == BPF_ARSH && BPF_CLASS(insn->code) != BPF_ALU64) {
3653-
verbose(env, "BPF_ARSH not supported for 32 bit ALU\n");
3654-
return -EINVAL;
3655-
}
3656-
36573652
if ((opcode == BPF_LSH || opcode == BPF_RSH ||
36583653
opcode == BPF_ARSH) && BPF_SRC(insn->code) == BPF_K) {
36593654
int size = BPF_CLASS(insn->code) == BPF_ALU64 ? 64 : 32;

0 commit comments

Comments
 (0)