From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: [PATCH bpf-next 10/13] bpf, mips64: remove obsolete exception handling from div/mod Date: Fri, 26 Jan 2018 23:33:45 +0100 Message-ID: <20180126223348.11250-11-daniel@iogearbox.net> References: <20180126223348.11250-1-daniel@iogearbox.net> Cc: netdev@vger.kernel.org, Daniel Borkmann , David Daney To: ast@kernel.org Return-path: Received: from www62.your-server.de ([213.133.104.62]:41490 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752430AbeAZWeB (ORCPT ); Fri, 26 Jan 2018 17:34:01 -0500 In-Reply-To: <20180126223348.11250-1-daniel@iogearbox.net> Sender: netdev-owner@vger.kernel.org List-ID: 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 Cc: David Daney --- arch/mips/net/ebpf_jit.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/arch/mips/net/ebpf_jit.c b/arch/mips/net/ebpf_jit.c index 4e34703..296f1410 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, break; case BPF_DIV: case BPF_MOD: - b_off = b_imm(exit_idx, ctx); - if (is_bad_offset(b_off)) - return -E2BIG; - emit_instr(ctx, beq, src, MIPS_R_ZERO, b_off); - emit_instr(ctx, movz, MIPS_R_V0, MIPS_R_ZERO, src); emit_instr(ctx, ddivu, dst, src); if (bpf_op == BPF_DIV) emit_instr(ctx, mflo, dst); @@ -943,11 +938,6 @@ static int build_one_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, break; case BPF_DIV: case BPF_MOD: - b_off = b_imm(exit_idx, ctx); - if (is_bad_offset(b_off)) - return -E2BIG; - emit_instr(ctx, beq, src, MIPS_R_ZERO, b_off); - emit_instr(ctx, movz, MIPS_R_V0, MIPS_R_ZERO, src); emit_instr(ctx, divu, dst, src); if (bpf_op == BPF_DIV) emit_instr(ctx, mflo, dst); -- 2.9.5