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