From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Naveen N. Rao" Subject: Re: [PATCH bpf-next 08/13] bpf, ppc64: remove obsolete exception handling from div/mod Date: Mon, 29 Jan 2018 00:22:37 +0530 Message-ID: <1517165527.nvga6ffll5.naveen@linux.ibm.com> References: <20180126223348.11250-1-daniel@iogearbox.net> <20180126223348.11250-9-daniel@iogearbox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT Cc: netdev@vger.kernel.org To: ast@kernel.org, Daniel Borkmann Return-path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:36352 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752065AbeA1SyQ (ORCPT ); Sun, 28 Jan 2018 13:54:16 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0SIs06J065440 for ; Sun, 28 Jan 2018 13:54:16 -0500 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fs7khab43-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Sun, 28 Jan 2018 13:54:15 -0500 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 28 Jan 2018 18:54:14 -0000 In-Reply-To: <20180126223348.11250-9-daniel@iogearbox.net> Sender: netdev-owner@vger.kernel.org List-ID: Daniel Borkmann wrote: > Since we've changed div/mod exception handling for src_reg in > eBPF verifier itself, remove the leftovers from ppc64 JIT. > > Signed-off-by: Daniel Borkmann > Cc: Naveen N. Rao > --- > arch/powerpc/net/bpf_jit_comp64.c | 8 -------- > 1 file changed, 8 deletions(-) Probably too late, but none the less: Acked-by: Naveen N. Rao Thanks, Naveen > > diff --git a/arch/powerpc/net/bpf_jit_comp64.c b/arch/powerpc/net/bpf_jit_comp64.c > index 217a78e..0a34b0c 100644 > --- a/arch/powerpc/net/bpf_jit_comp64.c > +++ b/arch/powerpc/net/bpf_jit_comp64.c > @@ -381,10 +381,6 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, > goto bpf_alu32_trunc; > case BPF_ALU | BPF_DIV | BPF_X: /* (u32) dst /= (u32) src */ > case BPF_ALU | BPF_MOD | BPF_X: /* (u32) dst %= (u32) src */ > - PPC_CMPWI(src_reg, 0); > - PPC_BCC_SHORT(COND_NE, (ctx->idx * 4) + 12); > - PPC_LI(b2p[BPF_REG_0], 0); > - PPC_JMP(exit_addr); > if (BPF_OP(code) == BPF_MOD) { > PPC_DIVWU(b2p[TMP_REG_1], dst_reg, src_reg); > PPC_MULW(b2p[TMP_REG_1], src_reg, > @@ -395,10 +391,6 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, > goto bpf_alu32_trunc; > case BPF_ALU64 | BPF_DIV | BPF_X: /* dst /= src */ > case BPF_ALU64 | BPF_MOD | BPF_X: /* dst %= src */ > - PPC_CMPDI(src_reg, 0); > - PPC_BCC_SHORT(COND_NE, (ctx->idx * 4) + 12); > - PPC_LI(b2p[BPF_REG_0], 0); > - PPC_JMP(exit_addr); > if (BPF_OP(code) == BPF_MOD) { > PPC_DIVD(b2p[TMP_REG_1], dst_reg, src_reg); > PPC_MULD(b2p[TMP_REG_1], src_reg, > -- > 2.9.5 > >