From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: [PATCH bpf-next 12/13] bpf, arm: remove obsolete exception handling from div/mod Date: Fri, 26 Jan 2018 23:33:47 +0100 Message-ID: <20180126223348.11250-13-daniel@iogearbox.net> References: <20180126223348.11250-1-daniel@iogearbox.net> Cc: netdev@vger.kernel.org, Daniel Borkmann , Shubham Bansal To: ast@kernel.org Return-path: Received: from www62.your-server.de ([213.133.104.62]:41499 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752440AbeAZWeB (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 arm32 JIT. Signed-off-by: Daniel Borkmann Cc: Shubham Bansal --- arch/arm/net/bpf_jit_32.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 41e2feb..b5030e1 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c @@ -363,15 +363,7 @@ static inline int epilogue_offset(const struct jit_ctx *ctx) static inline void emit_udivmod(u8 rd, u8 rm, u8 rn, struct jit_ctx *ctx, u8 op) { const u8 *tmp = bpf2a32[TMP_REG_1]; - s32 jmp_offset; - /* checks if divisor is zero or not. If it is, then - * exit directly. - */ - emit(ARM_CMP_I(rn, 0), ctx); - _emit(ARM_COND_EQ, ARM_MOV_I(ARM_R0, 0), ctx); - jmp_offset = epilogue_offset(ctx); - _emit(ARM_COND_EQ, ARM_B(jmp_offset), ctx); #if __LINUX_ARM_ARCH__ == 7 if (elf_hwcap & HWCAP_IDIVA) { if (op == BPF_DIV) -- 2.9.5