Re: [PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-16 Thread Ilias Apalodimas
Hi Will, On Tue, Sep 15, 2020 at 02:11:03PM +0100, Will Deacon wrote: [...] > > continue; > > } > > - if (ctx->image == NULL) > > - ctx->offset[i] = ctx->idx; > > if (ret) > > return ret; > > } > > +

Re: [PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-16 Thread Yauheni Kaliuta
Hi, Jean-Philippe! > On Wed, 16 Sep 2020 15:17:02 +0200, Jean-Philippe Brucker wrote: > On Wed, Sep 16, 2020 at 03:39:37PM +0300, Yauheni Kaliuta wrote: >> If you start to amend extables, could you consider a change like >> >> 05a68e892e89 ("s390/kernel: expand exception table logic to

Re: [PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-16 Thread Jean-Philippe Brucker
On Wed, Sep 16, 2020 at 03:39:37PM +0300, Yauheni Kaliuta wrote: > If you start to amend extables, could you consider a change like > > 05a68e892e89 ("s390/kernel: expand exception table logic to allow new > handling options") > > and implementation of BPF_PROBE_MEM then? Commit 800834285361

Re: [PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-16 Thread Yauheni Kaliuta
Hi, Ilias! > On Tue, 15 Sep 2020 22:23:11 +0300, Ilias Apalodimas wrote: > Hi Will, > On Tue, Sep 15, 2020 at 03:17:08PM +0100, Will Deacon wrote: >> On Tue, Sep 15, 2020 at 04:53:44PM +0300, Ilias Apalodimas wrote: >> > On Tue, Sep 15, 2020 at 02:11:03PM +0100, Will Deacon wrote: >>

Re: [PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-15 Thread Will Deacon
On Tue, Sep 15, 2020 at 04:53:44PM +0300, Ilias Apalodimas wrote: > On Tue, Sep 15, 2020 at 02:11:03PM +0100, Will Deacon wrote: > > Hi Ilias, > > > > On Mon, Sep 14, 2020 at 07:03:55PM +0300, Ilias Apalodimas wrote: > > > Running the eBPF test_verifier leads to random errors looking like this: >

Re: [PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-15 Thread Ilias Apalodimas
On Tue, Sep 15, 2020 at 02:11:03PM +0100, Will Deacon wrote: > Hi Ilias, > > On Mon, Sep 14, 2020 at 07:03:55PM +0300, Ilias Apalodimas wrote: > > Running the eBPF test_verifier leads to random errors looking like this: > > > > [ 6525.735488] Unexpected kernel BRK exception at EL1 > > [

Re: [PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-15 Thread Jean-Philippe Brucker
On Tue, Sep 15, 2020 at 02:11:03PM +0100, Will Deacon wrote: > > ret = build_insn(insn, ctx, extra_pass); > > if (ret > 0) { > > i++; > > if (ctx->image == NULL) > > - ctx->offset[i] = ctx->idx; > > +

Re: [PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-15 Thread Ilias Apalodimas
Hi Will, On Tue, Sep 15, 2020 at 03:17:08PM +0100, Will Deacon wrote: > On Tue, Sep 15, 2020 at 04:53:44PM +0300, Ilias Apalodimas wrote: > > On Tue, Sep 15, 2020 at 02:11:03PM +0100, Will Deacon wrote: > > > Hi Ilias, > > > > > > On Mon, Sep 14, 2020 at 07:03:55PM +0300, Ilias Apalodimas

Re: [PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-15 Thread Will Deacon
Hi Ilias, On Mon, Sep 14, 2020 at 07:03:55PM +0300, Ilias Apalodimas wrote: > Running the eBPF test_verifier leads to random errors looking like this: > > [ 6525.735488] Unexpected kernel BRK exception at EL1 > [ 6525.735502] Internal error: ptrace BRK handler: f2000100 [#1] SMP Does this

[PATCH v2] arm64: bpf: Fix branch offset in JIT

2020-09-14 Thread Ilias Apalodimas
Running the eBPF test_verifier leads to random errors looking like this: [ 6525.735488] Unexpected kernel BRK exception at EL1 [ 6525.735502] Internal error: ptrace BRK handler: f2000100 [#1] SMP [ 6525.741609] Modules linked in: nls_utf8 cifs libdes libarc4 dns_resolver fscache binfmt_misc