Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1428424

Re: [PATCH] ppc: Fix BPF JIT for ABIv2

From Michael Ellerman <mpe@ellerman.id.au>
Newsgroups linux.kernel
Subject Re: [PATCH] ppc: Fix BPF JIT for ABIv2
Date 2016-06-22 07:30 +0200
Message-ID <rMITD-7ER-9@gated-at.bofh.it> (permalink)
References (1 earlier) <rL1xn-6DO-3@gated-at.bofh.it> <rL1H3-6Xf-1@gated-at.bofh.it> <rLPaO-5qT-11@gated-at.bofh.it> <rMcTM-3R8-7@gated-at.bofh.it> <rMrg6-4Cx-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 2016-06-21 at 14:28 +0530, Naveen N. Rao wrote:
> On 2016/06/20 03:56PM, Thadeu Lima de Souza Cascardo wrote:
> > On Sun, Jun 19, 2016 at 11:19:14PM +0530, Naveen N. Rao wrote:
> > > On 2016/06/17 10:00AM, Thadeu Lima de Souza Cascardo wrote:
> > > > 
> > > > Hi, Michael and Naveen.
> > > > 
> > > > I noticed independently that there is a problem with BPF JIT and ABIv2, and
> > > > worked out the patch below before I noticed Naveen's patchset and the latest
> > > > changes in ppc tree for a better way to check for ABI versions.
> > > > 
> > > > However, since the issue described below affect mainline and stable kernels,
> > > > would you consider applying it before merging your two patchsets, so that we can
> > > > more easily backport the fix?
> > > 
> > > Hi Cascardo,
> > > Given that this has been broken on ABIv2 since forever, I didn't bother 
> > > fixing it. But, I can see why this would be a good thing to have for 
> > > -stable and existing distros. However, while your patch below may fix 
> > > the crash you're seeing on ppc64le, it is not sufficient -- you'll need 
> > > changes in bpf_jit_asm.S as well.
> > 
> > Hi, Naveen.
> > 
> > Any tips on how to exercise possible issues there? Or what changes you think
> > would be sufficient?
> 
> The calling convention is different with ABIv2 and so we'll need changes 
> in bpf_slow_path_common() and sk_negative_common().
> 
> However, rather than enabling classic JIT for ppc64le, are we better off 
> just disabling it?
> 
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -128,7 +128,7 @@ config PPC
>         select IRQ_FORCED_THREADING
>         select HAVE_RCU_TABLE_FREE if SMP
>         select HAVE_SYSCALL_TRACEPOINTS
> -       select HAVE_CBPF_JIT
> +       select HAVE_CBPF_JIT if CPU_BIG_ENDIAN
>         select HAVE_ARCH_JUMP_LABEL
>         select ARCH_HAVE_NMI_SAFE_CMPXCHG
>         select ARCH_HAS_GCOV_PROFILE_ALL
> 
> 
> Michael,
> Let me know your thoughts on whether you intend to take this patch or 
> Cascardo's patch for -stable before the eBPF patches. I can redo my 
> patches accordingly.

Can one of you send me a proper version of this patch, with change log and
sign-off etc.

cheers

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF Michael Ellerman <mpe@ellerman.id.au> - 2016-06-17 15:00 +0200
  [PATCH] ppc: Fix BPF JIT for ABIv2 Thadeu Lima de Souza Cascardo <cascardo@redhat.com> - 2016-06-17 15:10 +0200
    Re: [PATCH] ppc: Fix BPF JIT for ABIv2 "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-06-19 20:00 +0200
      Re: [PATCH] ppc: Fix BPF JIT for ABIv2 Thadeu Lima de Souza Cascardo <cascardo@redhat.com> - 2016-06-20 21:20 +0200
        Re: [PATCH] ppc: Fix BPF JIT for ABIv2 "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-06-21 12:40 +0200
          Re: [PATCH] ppc: Fix BPF JIT for ABIv2 Michael Ellerman <mpe@ellerman.id.au> - 2016-06-21 13:40 +0200
            Re: [PATCH] ppc: Fix BPF JIT for ABIv2 Thadeu Lima de Souza Cascardo <cascardo@redhat.com> - 2016-06-21 17:00 +0200
              Re: [PATCH] ppc: Fix BPF JIT for ABIv2 Michael Ellerman <mpe@ellerman.id.au> - 2016-06-22 06:10 +0200
              Re: [PATCH] ppc: Fix BPF JIT for ABIv2 "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-06-22 09:20 +0200
                Re: [PATCH] ppc: Fix BPF JIT for ABIv2 "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-06-22 17:00 +0200
          Re: [PATCH] ppc: Fix BPF JIT for ABIv2 Michael Ellerman <mpe@ellerman.id.au> - 2016-06-22 07:30 +0200
    Re: [PATCH] ppc: Fix BPF JIT for ABIv2 Michael Ellerman <mpe@ellerman.id.au> - 2016-06-22 07:20 +0200
  Re: [6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-06-19 19:40 +0200
    Re: [6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF Michael Ellerman <mpe@ellerman.id.au> - 2016-06-21 01:50 +0200
      Re: [6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-06-21 09:10 +0200
        Re: [6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF Michael Ellerman <mpe@ellerman.id.au> - 2016-06-21 13:20 +0200
          Re: [6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-06-22 09:10 +0200

csiph-web