All of lore.kernel.org
 help / color / mirror / Atom feed
* Fw: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT
@ 2019-11-08 15:57 Stephen Hemminger
  2019-11-08 23:37 ` Daniel Borkmann
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Hemminger @ 2019-11-08 15:57 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
	Yonghong Song
  Cc: bpf



Begin forwarded message:

Date: Fri, 08 Nov 2019 07:35:59 +0000
From: bugzilla-daemon@bugzilla.kernel.org
To: stephen@networkplumber.org
Subject: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT


https://bugzilla.kernel.org/show_bug.cgi?id=205469

            Bug ID: 205469
           Summary: x86_32: bpf: multiple test_bpf failures using eBPF JIT
           Product: Networking
           Version: 2.5
    Kernel Version: 4.19.81 LTS
          Hardware: i386
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Other
          Assignee: stephen@networkplumber.org
          Reporter: itugrok@yahoo.com
                CC: itugrok@yahoo.com
        Regression: No

Created attachment 285829
  --> https://bugzilla.kernel.org/attachment.cgi?id=285829&action=edit  
test_bpf failures: kernel 4.19.81/x86_32 (OpenWrt)

Summary:
========

Running the 4.19.81 LTS kernel on QEMU/x86_32, the standard test_bpf.ko
testsuite generates multiple errors with the eBPF JIT enabled:

  ...
  test_bpf: #32 JSET jited:1 40 ret 0 != 20 46 FAIL
  test_bpf: #321 LD_IND word positive offset jited:1 ret 0 != -291897430 FAIL
  test_bpf: #322 LD_IND word negative offset jited:1 ret 0 != -1437222042 FAIL
  test_bpf: #323 LD_IND word unaligned (addr & 3 == 2) jited:1 ret 0 !=
-1150890889 FAIL
  test_bpf: #326 LD_IND word positive offset, all ff jited:1 ret 0 != -1 FAIL
  ...
  test_bpf: Summary: 373 PASSED, 5 FAILED, [344/366 JIT'ed]

However, with eBPF JIT disabled (net.core.bpf_jit_enable=0) all tests pass.


Steps to Reproduce:
===================

  # sysctl net.core.bpf_jit_enable=1
  # modprobe test_bpf
  <Kernel log with failures and test summary>


Affected Systems Tested:
========================

  OpenWrt master on QEMU/pc-q35(x86_32) [LTS kernel 4.19.81]


Kernel Logs:
============

Boot log with test results is attached.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fw: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT
  2019-11-08 15:57 Fw: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT Stephen Hemminger
@ 2019-11-08 23:37 ` Daniel Borkmann
  2019-11-09 18:36   ` Wang YanQing
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Borkmann @ 2019-11-08 23:37 UTC (permalink / raw)
  To: Wang YanQing
  Cc: Stephen Hemminger, Alexei Starovoitov, Martin KaFai Lau,
	Song Liu, Yonghong Song, bpf

[ Cc Wang (x86_32 BPF JIT maintainer) ]

On 11/8/19 4:57 PM, Stephen Hemminger wrote:
> 
> Begin forwarded message:
> 
> Date: Fri, 08 Nov 2019 07:35:59 +0000
> From: bugzilla-daemon@bugzilla.kernel.org
> To: stephen@networkplumber.org
> Subject: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT
> 
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=205469
> 
>              Bug ID: 205469
>             Summary: x86_32: bpf: multiple test_bpf failures using eBPF JIT
>             Product: Networking
>             Version: 2.5
>      Kernel Version: 4.19.81 LTS
>            Hardware: i386
>                  OS: Linux
>                Tree: Mainline
>              Status: NEW
>            Severity: normal
>            Priority: P1
>           Component: Other
>            Assignee: stephen@networkplumber.org
>            Reporter: itugrok@yahoo.com
>                  CC: itugrok@yahoo.com
>          Regression: No
> 
> Created attachment 285829
>    --> https://bugzilla.kernel.org/attachment.cgi?id=285829&action=edit
> test_bpf failures: kernel 4.19.81/x86_32 (OpenWrt)
> 
> Summary:
> ========
> 
> Running the 4.19.81 LTS kernel on QEMU/x86_32, the standard test_bpf.ko
> testsuite generates multiple errors with the eBPF JIT enabled:
> 
>    ...
>    test_bpf: #32 JSET jited:1 40 ret 0 != 20 46 FAIL
>    test_bpf: #321 LD_IND word positive offset jited:1 ret 0 != -291897430 FAIL
>    test_bpf: #322 LD_IND word negative offset jited:1 ret 0 != -1437222042 FAIL
>    test_bpf: #323 LD_IND word unaligned (addr & 3 == 2) jited:1 ret 0 !=
> -1150890889 FAIL
>    test_bpf: #326 LD_IND word positive offset, all ff jited:1 ret 0 != -1 FAIL
>    ...
>    test_bpf: Summary: 373 PASSED, 5 FAILED, [344/366 JIT'ed]
> 
> However, with eBPF JIT disabled (net.core.bpf_jit_enable=0) all tests pass.
> 
> 
> Steps to Reproduce:
> ===================
> 
>    # sysctl net.core.bpf_jit_enable=1
>    # modprobe test_bpf
>    <Kernel log with failures and test summary>
> 
> 
> Affected Systems Tested:
> ========================
> 
>    OpenWrt master on QEMU/pc-q35(x86_32) [LTS kernel 4.19.81]
> 
> 
> Kernel Logs:
> ============
> 
> Boot log with test results is attached.
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fw: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT
  2019-11-08 23:37 ` Daniel Borkmann
@ 2019-11-09 18:36   ` Wang YanQing
  2019-11-11 12:56     ` Daniel Borkmann
  0 siblings, 1 reply; 7+ messages in thread
From: Wang YanQing @ 2019-11-09 18:36 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: Stephen Hemminger, Alexei Starovoitov, Martin KaFai Lau,
	Song Liu, Yonghong Song, bpf

On Sat, Nov 09, 2019 at 12:37:49AM +0100, Daniel Borkmann wrote:
> [ Cc Wang (x86_32 BPF JIT maintainer) ]
> 
> On 11/8/19 4:57 PM, Stephen Hemminger wrote:
> > 
> > Begin forwarded message:
> > 
> > Date: Fri, 08 Nov 2019 07:35:59 +0000
> > From: bugzilla-daemon@bugzilla.kernel.org
> > To: stephen@networkplumber.org
> > Subject: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT
> > 
> > 
> > https://bugzilla.kernel.org/show_bug.cgi?id=205469
> > 
> >              Bug ID: 205469
> >             Summary: x86_32: bpf: multiple test_bpf failures using eBPF JIT
> >             Product: Networking
> >             Version: 2.5
> >      Kernel Version: 4.19.81 LTS
> >            Hardware: i386
> >                  OS: Linux
> >                Tree: Mainline
> >              Status: NEW
> >            Severity: normal
> >            Priority: P1
> >           Component: Other
> >            Assignee: stephen@networkplumber.org
> >            Reporter: itugrok@yahoo.com
> >                  CC: itugrok@yahoo.com
> >          Regression: No
> > 
> > Created attachment 285829
> >    --> https://bugzilla.kernel.org/attachment.cgi?id=285829&action=edit
> > test_bpf failures: kernel 4.19.81/x86_32 (OpenWrt)
> > 
> > Summary:
> > ========
> > 
> > Running the 4.19.81 LTS kernel on QEMU/x86_32, the standard test_bpf.ko
> > testsuite generates multiple errors with the eBPF JIT enabled:
> > 
> >    ...
> >    test_bpf: #32 JSET jited:1 40 ret 0 != 20 46 FAIL
> >    test_bpf: #321 LD_IND word positive offset jited:1 ret 0 != -291897430 FAIL
> >    test_bpf: #322 LD_IND word negative offset jited:1 ret 0 != -1437222042 FAIL
> >    test_bpf: #323 LD_IND word unaligned (addr & 3 == 2) jited:1 ret 0 !=
> > -1150890889 FAIL
> >    test_bpf: #326 LD_IND word positive offset, all ff jited:1 ret 0 != -1 FAIL
> >    ...
> >    test_bpf: Summary: 373 PASSED, 5 FAILED, [344/366 JIT'ed]
> > 
> > However, with eBPF JIT disabled (net.core.bpf_jit_enable=0) all tests pass.
> > 
> > 
> > Steps to Reproduce:
> > ===================
> > 
> >    # sysctl net.core.bpf_jit_enable=1
> >    # modprobe test_bpf
> >    <Kernel log with failures and test summary>
> > 
> > 
> > Affected Systems Tested:
> > ========================
> > 
> >    OpenWrt master on QEMU/pc-q35(x86_32) [LTS kernel 4.19.81]
> > 
> > 
> > Kernel Logs:
> > ============
> > 
> > Boot log with test results is attached.
> > 

Hi Daniel Borkmann!

I have tested and verified that the report bug has been fixed by commit
711aef1bbf88 ("bpf, x32: Fix bug for BPF_JMP | {BPF_JSGT, BPF_JSLE, BPF_JSLT, BPF_JSGE}")

But that fix hasn't been backport to stable trees, so maybe we should do it:)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fw: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT
  2019-11-09 18:36   ` Wang YanQing
@ 2019-11-11 12:56     ` Daniel Borkmann
  2019-11-21 20:37       ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Borkmann @ 2019-11-11 12:56 UTC (permalink / raw)
  To: Wang YanQing
  Cc: Stephen Hemminger, Alexei Starovoitov, Martin KaFai Lau,
	Song Liu, Yonghong Song, bpf

On 11/9/19 7:36 PM, Wang YanQing wrote:
> On Sat, Nov 09, 2019 at 12:37:49AM +0100, Daniel Borkmann wrote:
>> [ Cc Wang (x86_32 BPF JIT maintainer) ]
>>
>> On 11/8/19 4:57 PM, Stephen Hemminger wrote:
>>>
>>> Begin forwarded message:
>>>
>>> Date: Fri, 08 Nov 2019 07:35:59 +0000
>>> From: bugzilla-daemon@bugzilla.kernel.org
>>> To: stephen@networkplumber.org
>>> Subject: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT
>>>
>>>
>>> https://bugzilla.kernel.org/show_bug.cgi?id=205469
>>>
>>>               Bug ID: 205469
>>>              Summary: x86_32: bpf: multiple test_bpf failures using eBPF JIT
>>>              Product: Networking
>>>              Version: 2.5
>>>       Kernel Version: 4.19.81 LTS
>>>             Hardware: i386
>>>                   OS: Linux
>>>                 Tree: Mainline
>>>               Status: NEW
>>>             Severity: normal
>>>             Priority: P1
>>>            Component: Other
>>>             Assignee: stephen@networkplumber.org
>>>             Reporter: itugrok@yahoo.com
>>>                   CC: itugrok@yahoo.com
>>>           Regression: No
>>>
>>> Created attachment 285829
>>>     --> https://bugzilla.kernel.org/attachment.cgi?id=285829&action=edit
>>> test_bpf failures: kernel 4.19.81/x86_32 (OpenWrt)
>>>
>>> Summary:
>>> ========
>>>
>>> Running the 4.19.81 LTS kernel on QEMU/x86_32, the standard test_bpf.ko
>>> testsuite generates multiple errors with the eBPF JIT enabled:
>>>
>>>     ...
>>>     test_bpf: #32 JSET jited:1 40 ret 0 != 20 46 FAIL
>>>     test_bpf: #321 LD_IND word positive offset jited:1 ret 0 != -291897430 FAIL
>>>     test_bpf: #322 LD_IND word negative offset jited:1 ret 0 != -1437222042 FAIL
>>>     test_bpf: #323 LD_IND word unaligned (addr & 3 == 2) jited:1 ret 0 !=
>>> -1150890889 FAIL
>>>     test_bpf: #326 LD_IND word positive offset, all ff jited:1 ret 0 != -1 FAIL
>>>     ...
>>>     test_bpf: Summary: 373 PASSED, 5 FAILED, [344/366 JIT'ed]
>>>
>>> However, with eBPF JIT disabled (net.core.bpf_jit_enable=0) all tests pass.
>>>
>>>
>>> Steps to Reproduce:
>>> ===================
>>>
>>>     # sysctl net.core.bpf_jit_enable=1
>>>     # modprobe test_bpf
>>>     <Kernel log with failures and test summary>
>>>
>>>
>>> Affected Systems Tested:
>>> ========================
>>>
>>>     OpenWrt master on QEMU/pc-q35(x86_32) [LTS kernel 4.19.81]
>>>
>>>
>>> Kernel Logs:
>>> ============
>>>
>>> Boot log with test results is attached.
>>>
> 
> Hi Daniel Borkmann!
> 
> I have tested and verified that the report bug has been fixed by commit
> 711aef1bbf88 ("bpf, x32: Fix bug for BPF_JMP | {BPF_JSGT, BPF_JSLE, BPF_JSLT, BPF_JSGE}")
> 
> But that fix hasn't been backport to stable trees, so maybe we should do it:)

Yes, given you have access to a x32 setup and are also able to runtime test the backported
JIT changes, please submit it to stable with us in Cc. Thanks Wang!

Best,
Daniel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fw: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT
  2019-11-11 12:56     ` Daniel Borkmann
@ 2019-11-21 20:37       ` Greg KH
  2019-11-21 20:42         ` Daniel Borkmann
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2019-11-21 20:37 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: Wang YanQing, Stephen Hemminger, Alexei Starovoitov,
	Martin KaFai Lau, Song Liu, Yonghong Song, bpf

On Mon, Nov 11, 2019 at 01:56:31PM +0100, Daniel Borkmann wrote:
> On 11/9/19 7:36 PM, Wang YanQing wrote:
> > On Sat, Nov 09, 2019 at 12:37:49AM +0100, Daniel Borkmann wrote:
> > > [ Cc Wang (x86_32 BPF JIT maintainer) ]
> > > 
> > > On 11/8/19 4:57 PM, Stephen Hemminger wrote:
> > > > 
> > > > Begin forwarded message:
> > > > 
> > > > Date: Fri, 08 Nov 2019 07:35:59 +0000
> > > > From: bugzilla-daemon@bugzilla.kernel.org
> > > > To: stephen@networkplumber.org
> > > > Subject: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT
> > > > 
> > > > 
> > > > https://bugzilla.kernel.org/show_bug.cgi?id=205469
> > > > 
> > > >               Bug ID: 205469
> > > >              Summary: x86_32: bpf: multiple test_bpf failures using eBPF JIT
> > > >              Product: Networking
> > > >              Version: 2.5
> > > >       Kernel Version: 4.19.81 LTS
> > > >             Hardware: i386
> > > >                   OS: Linux
> > > >                 Tree: Mainline
> > > >               Status: NEW
> > > >             Severity: normal
> > > >             Priority: P1
> > > >            Component: Other
> > > >             Assignee: stephen@networkplumber.org
> > > >             Reporter: itugrok@yahoo.com
> > > >                   CC: itugrok@yahoo.com
> > > >           Regression: No
> > > > 
> > > > Created attachment 285829
> > > >     --> https://bugzilla.kernel.org/attachment.cgi?id=285829&action=edit
> > > > test_bpf failures: kernel 4.19.81/x86_32 (OpenWrt)
> > > > 
> > > > Summary:
> > > > ========
> > > > 
> > > > Running the 4.19.81 LTS kernel on QEMU/x86_32, the standard test_bpf.ko
> > > > testsuite generates multiple errors with the eBPF JIT enabled:
> > > > 
> > > >     ...
> > > >     test_bpf: #32 JSET jited:1 40 ret 0 != 20 46 FAIL
> > > >     test_bpf: #321 LD_IND word positive offset jited:1 ret 0 != -291897430 FAIL
> > > >     test_bpf: #322 LD_IND word negative offset jited:1 ret 0 != -1437222042 FAIL
> > > >     test_bpf: #323 LD_IND word unaligned (addr & 3 == 2) jited:1 ret 0 !=
> > > > -1150890889 FAIL
> > > >     test_bpf: #326 LD_IND word positive offset, all ff jited:1 ret 0 != -1 FAIL
> > > >     ...
> > > >     test_bpf: Summary: 373 PASSED, 5 FAILED, [344/366 JIT'ed]
> > > > 
> > > > However, with eBPF JIT disabled (net.core.bpf_jit_enable=0) all tests pass.
> > > > 
> > > > 
> > > > Steps to Reproduce:
> > > > ===================
> > > > 
> > > >     # sysctl net.core.bpf_jit_enable=1
> > > >     # modprobe test_bpf
> > > >     <Kernel log with failures and test summary>
> > > > 
> > > > 
> > > > Affected Systems Tested:
> > > > ========================
> > > > 
> > > >     OpenWrt master on QEMU/pc-q35(x86_32) [LTS kernel 4.19.81]
> > > > 
> > > > 
> > > > Kernel Logs:
> > > > ============
> > > > 
> > > > Boot log with test results is attached.
> > > > 
> > 
> > Hi Daniel Borkmann!
> > 
> > I have tested and verified that the report bug has been fixed by commit
> > 711aef1bbf88 ("bpf, x32: Fix bug for BPF_JMP | {BPF_JSGT, BPF_JSLE, BPF_JSLT, BPF_JSGE}")
> > 
> > But that fix hasn't been backport to stable trees, so maybe we should do it:)
> 
> Yes, given you have access to a x32 setup and are also able to runtime test the backported
> JIT changes, please submit it to stable with us in Cc. Thanks Wang!

Backporting this would be nice if someone could do it :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fw: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT
  2019-11-21 20:37       ` Greg KH
@ 2019-11-21 20:42         ` Daniel Borkmann
  2019-11-21 20:47           ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Borkmann @ 2019-11-21 20:42 UTC (permalink / raw)
  To: Greg KH
  Cc: Wang YanQing, Stephen Hemminger, Alexei Starovoitov,
	Martin KaFai Lau, Song Liu, Yonghong Song, bpf

On 11/21/19 9:37 PM, Greg KH wrote:
> On Mon, Nov 11, 2019 at 01:56:31PM +0100, Daniel Borkmann wrote:
>> On 11/9/19 7:36 PM, Wang YanQing wrote:
>>> On Sat, Nov 09, 2019 at 12:37:49AM +0100, Daniel Borkmann wrote:
>>>> [ Cc Wang (x86_32 BPF JIT maintainer) ]
>>>>
>>>> On 11/8/19 4:57 PM, Stephen Hemminger wrote:
>>>>>
>>>>> Begin forwarded message:
>>>>>
>>>>> Date: Fri, 08 Nov 2019 07:35:59 +0000
>>>>> From: bugzilla-daemon@bugzilla.kernel.org
>>>>> To: stephen@networkplumber.org
>>>>> Subject: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT
>>>>>
>>>>>
>>>>> https://bugzilla.kernel.org/show_bug.cgi?id=205469
>>>>>
>>>>>                Bug ID: 205469
>>>>>               Summary: x86_32: bpf: multiple test_bpf failures using eBPF JIT
>>>>>               Product: Networking
>>>>>               Version: 2.5
>>>>>        Kernel Version: 4.19.81 LTS
>>>>>              Hardware: i386
>>>>>                    OS: Linux
>>>>>                  Tree: Mainline
>>>>>                Status: NEW
>>>>>              Severity: normal
>>>>>              Priority: P1
>>>>>             Component: Other
>>>>>              Assignee: stephen@networkplumber.org
>>>>>              Reporter: itugrok@yahoo.com
>>>>>                    CC: itugrok@yahoo.com
>>>>>            Regression: No
>>>>>
>>>>> Created attachment 285829
>>>>>      --> https://bugzilla.kernel.org/attachment.cgi?id=285829&action=edit
>>>>> test_bpf failures: kernel 4.19.81/x86_32 (OpenWrt)
>>>>>
>>>>> Summary:
>>>>> ========
>>>>>
>>>>> Running the 4.19.81 LTS kernel on QEMU/x86_32, the standard test_bpf.ko
>>>>> testsuite generates multiple errors with the eBPF JIT enabled:
>>>>>
>>>>>      ...
>>>>>      test_bpf: #32 JSET jited:1 40 ret 0 != 20 46 FAIL
>>>>>      test_bpf: #321 LD_IND word positive offset jited:1 ret 0 != -291897430 FAIL
>>>>>      test_bpf: #322 LD_IND word negative offset jited:1 ret 0 != -1437222042 FAIL
>>>>>      test_bpf: #323 LD_IND word unaligned (addr & 3 == 2) jited:1 ret 0 !=
>>>>> -1150890889 FAIL
>>>>>      test_bpf: #326 LD_IND word positive offset, all ff jited:1 ret 0 != -1 FAIL
>>>>>      ...
>>>>>      test_bpf: Summary: 373 PASSED, 5 FAILED, [344/366 JIT'ed]
>>>>>
>>>>> However, with eBPF JIT disabled (net.core.bpf_jit_enable=0) all tests pass.
>>>>>
>>>>>
>>>>> Steps to Reproduce:
>>>>> ===================
>>>>>
>>>>>      # sysctl net.core.bpf_jit_enable=1
>>>>>      # modprobe test_bpf
>>>>>      <Kernel log with failures and test summary>
>>>>>
>>>>>
>>>>> Affected Systems Tested:
>>>>> ========================
>>>>>
>>>>>      OpenWrt master on QEMU/pc-q35(x86_32) [LTS kernel 4.19.81]
>>>>>
>>>>>
>>>>> Kernel Logs:
>>>>> ============
>>>>>
>>>>> Boot log with test results is attached.
>>>>>
>>>
>>> Hi Daniel Borkmann!
>>>
>>> I have tested and verified that the report bug has been fixed by commit
>>> 711aef1bbf88 ("bpf, x32: Fix bug for BPF_JMP | {BPF_JSGT, BPF_JSLE, BPF_JSLT, BPF_JSGE}")
>>>
>>> But that fix hasn't been backport to stable trees, so maybe we should do it:)
>>
>> Yes, given you have access to a x32 setup and are also able to runtime test the backported
>> JIT changes, please submit it to stable with us in Cc. Thanks Wang!
> 
> Backporting this would be nice if someone could do it :)

It landed on the stable list today:

https://lore.kernel.org/stable/20191121074336.GA15326@udknight/
https://lore.kernel.org/stable/20191121074725.GA15476@udknight/
https://lore.kernel.org/stable/20191121074511.GC15326@udknight/
https://lore.kernel.org/stable/20191121074452.GB15326@udknight/

Thanks,
Daniel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fw: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT
  2019-11-21 20:42         ` Daniel Borkmann
@ 2019-11-21 20:47           ` Greg KH
  0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2019-11-21 20:47 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: Wang YanQing, Stephen Hemminger, Alexei Starovoitov,
	Martin KaFai Lau, Song Liu, Yonghong Song, bpf

On Thu, Nov 21, 2019 at 09:42:54PM +0100, Daniel Borkmann wrote:
> On 11/21/19 9:37 PM, Greg KH wrote:
> > On Mon, Nov 11, 2019 at 01:56:31PM +0100, Daniel Borkmann wrote:
> > > On 11/9/19 7:36 PM, Wang YanQing wrote:
> > > > On Sat, Nov 09, 2019 at 12:37:49AM +0100, Daniel Borkmann wrote:
> > > > > [ Cc Wang (x86_32 BPF JIT maintainer) ]
> > > > > 
> > > > > On 11/8/19 4:57 PM, Stephen Hemminger wrote:
> > > > > > 
> > > > > > Begin forwarded message:
> > > > > > 
> > > > > > Date: Fri, 08 Nov 2019 07:35:59 +0000
> > > > > > From: bugzilla-daemon@bugzilla.kernel.org
> > > > > > To: stephen@networkplumber.org
> > > > > > Subject: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT
> > > > > > 
> > > > > > 
> > > > > > https://bugzilla.kernel.org/show_bug.cgi?id=205469
> > > > > > 
> > > > > >                Bug ID: 205469
> > > > > >               Summary: x86_32: bpf: multiple test_bpf failures using eBPF JIT
> > > > > >               Product: Networking
> > > > > >               Version: 2.5
> > > > > >        Kernel Version: 4.19.81 LTS
> > > > > >              Hardware: i386
> > > > > >                    OS: Linux
> > > > > >                  Tree: Mainline
> > > > > >                Status: NEW
> > > > > >              Severity: normal
> > > > > >              Priority: P1
> > > > > >             Component: Other
> > > > > >              Assignee: stephen@networkplumber.org
> > > > > >              Reporter: itugrok@yahoo.com
> > > > > >                    CC: itugrok@yahoo.com
> > > > > >            Regression: No
> > > > > > 
> > > > > > Created attachment 285829
> > > > > >      --> https://bugzilla.kernel.org/attachment.cgi?id=285829&action=edit
> > > > > > test_bpf failures: kernel 4.19.81/x86_32 (OpenWrt)
> > > > > > 
> > > > > > Summary:
> > > > > > ========
> > > > > > 
> > > > > > Running the 4.19.81 LTS kernel on QEMU/x86_32, the standard test_bpf.ko
> > > > > > testsuite generates multiple errors with the eBPF JIT enabled:
> > > > > > 
> > > > > >      ...
> > > > > >      test_bpf: #32 JSET jited:1 40 ret 0 != 20 46 FAIL
> > > > > >      test_bpf: #321 LD_IND word positive offset jited:1 ret 0 != -291897430 FAIL
> > > > > >      test_bpf: #322 LD_IND word negative offset jited:1 ret 0 != -1437222042 FAIL
> > > > > >      test_bpf: #323 LD_IND word unaligned (addr & 3 == 2) jited:1 ret 0 !=
> > > > > > -1150890889 FAIL
> > > > > >      test_bpf: #326 LD_IND word positive offset, all ff jited:1 ret 0 != -1 FAIL
> > > > > >      ...
> > > > > >      test_bpf: Summary: 373 PASSED, 5 FAILED, [344/366 JIT'ed]
> > > > > > 
> > > > > > However, with eBPF JIT disabled (net.core.bpf_jit_enable=0) all tests pass.
> > > > > > 
> > > > > > 
> > > > > > Steps to Reproduce:
> > > > > > ===================
> > > > > > 
> > > > > >      # sysctl net.core.bpf_jit_enable=1
> > > > > >      # modprobe test_bpf
> > > > > >      <Kernel log with failures and test summary>
> > > > > > 
> > > > > > 
> > > > > > Affected Systems Tested:
> > > > > > ========================
> > > > > > 
> > > > > >      OpenWrt master on QEMU/pc-q35(x86_32) [LTS kernel 4.19.81]
> > > > > > 
> > > > > > 
> > > > > > Kernel Logs:
> > > > > > ============
> > > > > > 
> > > > > > Boot log with test results is attached.
> > > > > > 
> > > > 
> > > > Hi Daniel Borkmann!
> > > > 
> > > > I have tested and verified that the report bug has been fixed by commit
> > > > 711aef1bbf88 ("bpf, x32: Fix bug for BPF_JMP | {BPF_JSGT, BPF_JSLE, BPF_JSLT, BPF_JSGE}")
> > > > 
> > > > But that fix hasn't been backport to stable trees, so maybe we should do it:)
> > > 
> > > Yes, given you have access to a x32 setup and are also able to runtime test the backported
> > > JIT changes, please submit it to stable with us in Cc. Thanks Wang!
> > 
> > Backporting this would be nice if someone could do it :)
> 
> It landed on the stable list today:
> 
> https://lore.kernel.org/stable/20191121074336.GA15326@udknight/
> https://lore.kernel.org/stable/20191121074725.GA15476@udknight/
> https://lore.kernel.org/stable/20191121074511.GC15326@udknight/
> https://lore.kernel.org/stable/20191121074452.GB15326@udknight/

Ugh, I totally missed them as they got filed into my bpf@ mailing list
mbox.  Thanks, I'll go dig them up now!

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-11-21 20:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 15:57 Fw: [Bug 205469] New: x86_32: bpf: multiple test_bpf failures using eBPF JIT Stephen Hemminger
2019-11-08 23:37 ` Daniel Borkmann
2019-11-09 18:36   ` Wang YanQing
2019-11-11 12:56     ` Daniel Borkmann
2019-11-21 20:37       ` Greg KH
2019-11-21 20:42         ` Daniel Borkmann
2019-11-21 20:47           ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.