[PATCH] bpf: arm64: lift restriction on last instruction
Alexei Starovoitov
ast at plumgrid.com
Wed Dec 3 07:54:32 PST 2014
On Wed, Dec 3, 2014 at 12:38 AM, Zi Shen Lim <zlim.lnx at gmail.com> 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 <zlim.lnx at gmail.com>
yours is cleaner than my own attempt to fix it.
Thanks!
Acked-by: Alexei Starovoitov <ast at plumgrid.com>
More information about the linux-arm-kernel
mailing list