Re: sparc64 and ARM64 JIT bug (was Re: LLVM 4.0 code generation bug)

2017-05-02 Thread Daniel Borkmann
On 05/02/2017 05:02 AM, David Miller wrote: From: Alexei Starovoitov Date: Mon, 1 May 2017 19:39:33 -0700 On 5/1/17 7:31 PM, David Miller wrote: If the last BPF instruction before exit is a ldimm64, branches to the exit point at the wrong location. Here is what I get from test_pkt_access.c

Re: sparc64 and ARM64 JIT bug

2017-05-01 Thread David Miller
From: David Miller Date: Mon, 01 May 2017 23:02:34 -0400 (EDT) > for (i = 0; i < prog->len; i++) { > const struct bpf_insn *insn = &prog->insnsi[i]; > int ret; > > ret = build_insn(insn, ctx); > ctx->offset[i] = ctx->idx; > >

sparc64 and ARM64 JIT bug (was Re: LLVM 4.0 code generation bug)

2017-05-01 Thread David Miller
From: Alexei Starovoitov Date: Mon, 1 May 2017 19:39:33 -0700 > On 5/1/17 7:31 PM, David Miller wrote: >> >> If the last BPF instruction before exit is a ldimm64, branches to the >> exit point at the wrong location. >> >> Here is what I get from test_pkt_access.c on sparc: >> >>