summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnay Wadhera <awadhera@berkeley.edu>2021-05-20 21:55:29 -0700
committerMichael Bestas <mkbestas@lineageos.org>2022-04-19 00:49:42 +0300
commit58c5030c405c4c26ef80c7f263555468f3c20885 (patch)
treed9e845d82d3c129813ac5aafb8ae5c0bdc48ccc7
parentbae72d3c34f74fe9d0aa6392bd7f8808532ab2a4 (diff)
Revert "bpf: arsh is not supported in 32 bit alu thus reject it"
This reverts commit 7dcda40e52ff0712a2d7d5353c1722cb1f994330. Signed-off-by: Chatur27 <jasonbright2709@gmail.com>
-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 32af15136bf4..a62679711de0 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -1165,11 +1165,6 @@ static int check_alu_op(struct verifier_env *env, struct bpf_insn *insn)
return -EINVAL;
}
- if (opcode == BPF_ARSH && BPF_CLASS(insn->code) != BPF_ALU64) {
- verbose("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;