From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751629AbaLCSEt (ORCPT ); Wed, 3 Dec 2014 13:04:49 -0500 Received: from foss-mx-na.foss.arm.com ([217.140.108.86]:44240 "EHLO foss-mx-na.foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750891AbaLCSEs (ORCPT ); Wed, 3 Dec 2014 13:04:48 -0500 Date: Wed, 3 Dec 2014 18:04:52 +0000 From: Will Deacon To: Alexei Starovoitov Cc: Zi Shen Lim , "David S. Miller" , Catalin Marinas , Daniel Borkmann , Network Development , "linux-arm-kernel@lists.infradead.org" , LKML Subject: Re: [PATCH] bpf: arm64: lift restriction on last instruction Message-ID: <20141203180451.GR7915@arm.com> References: <1417595881-32218-1-git-send-email-zlim.lnx@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 03, 2014 at 03:54:32PM +0000, Alexei Starovoitov wrote: > On Wed, Dec 3, 2014 at 12:38 AM, Zi Shen Lim wrote: > > Earlier implementation assumed last instruction is BPF_EXIT. > > Since this is no longer a restriction in eBPF, we remove this > > limitation. > > > > Per Alexei Starovoitov [1]: > >> classic BPF has a restriction that last insn is always BPF_RET. > >> eBPF doesn't have BPF_RET instruction and this restriction. > >> It has BPF_EXIT insn which can appear anywhere in the program > >> one or more times and it doesn't have to be last insn. > > > > [1] https://lkml.org/lkml/2014/11/27/2 > > > > Fixes: e54bcde3d69d ("arm64: eBPF JIT compiler") > > Signed-off-by: Zi Shen Lim > > yours is cleaner than my own attempt to fix it. > Thanks! > Acked-by: Alexei Starovoitov Cheers, I've applied this for 3.19. Will From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH] bpf: arm64: lift restriction on last instruction Date: Wed, 3 Dec 2014 18:04:52 +0000 Message-ID: <20141203180451.GR7915@arm.com> References: <1417595881-32218-1-git-send-email-zlim.lnx@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Zi Shen Lim , "David S. Miller" , Catalin Marinas , Daniel Borkmann , Network Development , "linux-arm-kernel@lists.infradead.org" , LKML To: Alexei Starovoitov Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Wed, Dec 03, 2014 at 03:54:32PM +0000, Alexei Starovoitov wrote: > On Wed, Dec 3, 2014 at 12:38 AM, Zi Shen Lim wrote: > > Earlier implementation assumed last instruction is BPF_EXIT. > > Since this is no longer a restriction in eBPF, we remove this > > limitation. > > > > Per Alexei Starovoitov [1]: > >> classic BPF has a restriction that last insn is always BPF_RET. > >> eBPF doesn't have BPF_RET instruction and this restriction. > >> It has BPF_EXIT insn which can appear anywhere in the program > >> one or more times and it doesn't have to be last insn. > > > > [1] https://lkml.org/lkml/2014/11/27/2 > > > > Fixes: e54bcde3d69d ("arm64: eBPF JIT compiler") > > Signed-off-by: Zi Shen Lim > > yours is cleaner than my own attempt to fix it. > Thanks! > Acked-by: Alexei Starovoitov Cheers, I've applied this for 3.19. Will From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Wed, 3 Dec 2014 18:04:52 +0000 Subject: [PATCH] bpf: arm64: lift restriction on last instruction In-Reply-To: References: <1417595881-32218-1-git-send-email-zlim.lnx@gmail.com> Message-ID: <20141203180451.GR7915@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Dec 03, 2014 at 03:54:32PM +0000, Alexei Starovoitov wrote: > On Wed, Dec 3, 2014 at 12:38 AM, Zi Shen Lim wrote: > > Earlier implementation assumed last instruction is BPF_EXIT. > > Since this is no longer a restriction in eBPF, we remove this > > limitation. > > > > Per Alexei Starovoitov [1]: > >> classic BPF has a restriction that last insn is always BPF_RET. > >> eBPF doesn't have BPF_RET instruction and this restriction. > >> It has BPF_EXIT insn which can appear anywhere in the program > >> one or more times and it doesn't have to be last insn. > > > > [1] https://lkml.org/lkml/2014/11/27/2 > > > > Fixes: e54bcde3d69d ("arm64: eBPF JIT compiler") > > Signed-off-by: Zi Shen Lim > > yours is cleaner than my own attempt to fix it. > Thanks! > Acked-by: Alexei Starovoitov Cheers, I've applied this for 3.19. Will