diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2018-01-26 17:33:45 -0500 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-01-26 19:42:06 -0500 |
commit | 1fb5c9c622c559e1524a419358c78397be822dda (patch) | |
tree | be4ae2868b334228f59e2bd0cc16c6678bf9c223 /arch/mips/net | |
parent | 740d52c646d748bf439ab3398359c3257efd022e (diff) |
bpf, mips64: remove obsolete exception handling from div/mod
Since we've changed div/mod exception handling for src_reg in
eBPF verifier itself, remove the leftovers from mips64 JIT.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: David Daney <david.daney@cavium.com>
Reviewed-by: David Daney <david.daney@cavium.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'arch/mips/net')
-rw-r--r-- | arch/mips/net/ebpf_jit.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/mips/net/ebpf_jit.c b/arch/mips/net/ebpf_jit.c index 4e347030ed2c..296f1410ae5c 100644 --- a/arch/mips/net/ebpf_jit.c +++ b/arch/mips/net/ebpf_jit.c | |||
@@ -860,11 +860,6 @@ static int build_one_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, | |||
860 | break; | 860 | break; |
861 | case BPF_DIV: | 861 | case BPF_DIV: |
862 | case BPF_MOD: | 862 | case BPF_MOD: |
863 | b_off = b_imm(exit_idx, ctx); | ||
864 | if (is_bad_offset(b_off)) | ||
865 | return -E2BIG; | ||
866 | emit_instr(ctx, beq, src, MIPS_R_ZERO, b_off); | ||
867 | emit_instr(ctx, movz, MIPS_R_V0, MIPS_R_ZERO, src); | ||
868 | emit_instr(ctx, ddivu, dst, src); | 863 | emit_instr(ctx, ddivu, dst, src); |
869 | if (bpf_op == BPF_DIV) | 864 | if (bpf_op == BPF_DIV) |
870 | emit_instr(ctx, mflo, dst); | 865 | emit_instr(ctx, mflo, dst); |
@@ -943,11 +938,6 @@ static int build_one_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, | |||
943 | break; | 938 | break; |
944 | case BPF_DIV: | 939 | case BPF_DIV: |
945 | case BPF_MOD: | 940 | case BPF_MOD: |
946 | b_off = b_imm(exit_idx, ctx); | ||
947 | if (is_bad_offset(b_off)) | ||
948 | return -E2BIG; | ||
949 | emit_instr(ctx, beq, src, MIPS_R_ZERO, b_off); | ||
950 | emit_instr(ctx, movz, MIPS_R_V0, MIPS_R_ZERO, src); | ||
951 | emit_instr(ctx, divu, dst, src); | 941 | emit_instr(ctx, divu, dst, src); |
952 | if (bpf_op == BPF_DIV) | 942 | if (bpf_op == BPF_DIV) |
953 | emit_instr(ctx, mflo, dst); | 943 | emit_instr(ctx, mflo, dst); |