summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/verifier.c
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@netronome.com>2018-12-05 13:52:35 -0500
committerAlexei Starovoitov <ast@kernel.org>2018-12-07 13:30:48 -0800
commitc49f7dbd4f9c2c49df7fc0f5b50c1350ee7e01ee (patch)
treeb3c2daf6038c24e8ddbb1958c045e8e8bffc4fea /kernel/bpf/verifier.c
parent2dc6b100f928aac8d7532bf7112d3f8d3f952bad (diff)
downloadlinux-c49f7dbd4f9c2c49df7fc0f5b50c1350ee7e01ee.tar.gz
linux-c49f7dbd4f9c2c49df7fc0f5b50c1350ee7e01ee.tar.bz2
linux-c49f7dbd4f9c2c49df7fc0f5b50c1350ee7e01ee.zip
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>
Diffstat (limited to 'kernel/bpf/verifier.c')
-rw-r--r--kernel/bpf/verifier.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 7658c61c1a88..2752d35ad073 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -3649,11 +3649,6 @@ static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn)
return -EINVAL;
}
- if (opcode == BPF_ARSH && BPF_CLASS(insn->code) != BPF_ALU64) {
- verbose(env, "BPF_ARSH not supported for 32 bit ALU\n");
- return -EINVAL;
- }
-
if ((opcode == BPF_LSH || opcode == BPF_RSH ||
opcode == BPF_ARSH) && BPF_SRC(insn->code) == BPF_K) {
int size = BPF_CLASS(insn->code) == BPF_ALU64 ? 64 : 32;