mbox series

[4.19,0/9] bpf: fix verifier selftests on inefficient unaligned access architectures

Message ID 1622604473-781-1-git-send-email-yangtiezhu@loongson.cn (mailing list archive)
Headers show
Series bpf: fix verifier selftests on inefficient unaligned access architectures | expand

Message

Tiezhu Yang June 2, 2021, 3:27 a.m. UTC
With the following patch series, all verifier selftests pass on the archs which
select HAVE_EFFICIENT_UNALIGNED_ACCESS.

[v2,4.19,00/19] bpf: fix verifier selftests, add CVE-2021-29155, CVE-2021-33200 fixes
https://patchwork.kernel.org/project/netdevbpf/cover/20210528103810.22025-1-ovidiu.panait@windriver.com/

But on inefficient unaligned access architectures, there still exist many failures,
so some patches about F_NEEDS_EFFICIENT_UNALIGNED_ACCESS are also needed, backport
to 4.19 with a minor context difference.

This patch series is based on the series (all now queued up by greg k-h):
"bpf: fix verifier selftests, add CVE-2021-29155, CVE-2021-33200 fixes".

Björn Töpel (2):
  selftests/bpf: add "any alignment" annotation for some tests
  selftests/bpf: Avoid running unprivileged tests with alignment
    requirements

Daniel Borkmann (2):
  bpf: fix test suite to enable all unpriv program types
  bpf: test make sure to run unpriv test cases in test_verifier

David S. Miller (4):
  bpf: Add BPF_F_ANY_ALIGNMENT.
  bpf: Adjust F_NEEDS_EFFICIENT_UNALIGNED_ACCESS handling in
    test_verifier.c
  bpf: Make more use of 'any' alignment in test_verifier.c
  bpf: Apply F_NEEDS_EFFICIENT_UNALIGNED_ACCESS to more ACCEPT test
    cases.

Joe Stringer (1):
  selftests/bpf: Generalize dummy program types

 include/uapi/linux/bpf.h                    |  14 ++
 kernel/bpf/syscall.c                        |   7 +-
 kernel/bpf/verifier.c                       |   3 +
 tools/include/uapi/linux/bpf.h              |  14 ++
 tools/lib/bpf/bpf.c                         |   8 +-
 tools/lib/bpf/bpf.h                         |   2 +-
 tools/testing/selftests/bpf/test_align.c    |   4 +-
 tools/testing/selftests/bpf/test_verifier.c | 224 ++++++++++++++++++++--------
 8 files changed, 206 insertions(+), 70 deletions(-)

Comments

Tiezhu Yang June 5, 2021, 7:16 a.m. UTC | #1
On 06/02/2021 11:27 AM, Tiezhu Yang wrote:
> With the following patch series, all verifier selftests pass on the archs which
> select HAVE_EFFICIENT_UNALIGNED_ACCESS.
>
> [v2,4.19,00/19] bpf: fix verifier selftests, add CVE-2021-29155, CVE-2021-33200 fixes
> https://patchwork.kernel.org/project/netdevbpf/cover/20210528103810.22025-1-ovidiu.panait@windriver.com/
>
> But on inefficient unaligned access architectures, there still exist many failures,
> so some patches about F_NEEDS_EFFICIENT_UNALIGNED_ACCESS are also needed, backport
> to 4.19 with a minor context difference.
>
> This patch series is based on the series (all now queued up by greg k-h):
> "bpf: fix verifier selftests, add CVE-2021-29155, CVE-2021-33200 fixes".
>
> Björn Töpel (2):
>    selftests/bpf: add "any alignment" annotation for some tests
>    selftests/bpf: Avoid running unprivileged tests with alignment
>      requirements
>
> Daniel Borkmann (2):
>    bpf: fix test suite to enable all unpriv program types
>    bpf: test make sure to run unpriv test cases in test_verifier
>
> David S. Miller (4):
>    bpf: Add BPF_F_ANY_ALIGNMENT.
>    bpf: Adjust F_NEEDS_EFFICIENT_UNALIGNED_ACCESS handling in
>      test_verifier.c
>    bpf: Make more use of 'any' alignment in test_verifier.c
>    bpf: Apply F_NEEDS_EFFICIENT_UNALIGNED_ACCESS to more ACCEPT test
>      cases.
>
> Joe Stringer (1):
>    selftests/bpf: Generalize dummy program types
>
>   include/uapi/linux/bpf.h                    |  14 ++
>   kernel/bpf/syscall.c                        |   7 +-
>   kernel/bpf/verifier.c                       |   3 +
>   tools/include/uapi/linux/bpf.h              |  14 ++
>   tools/lib/bpf/bpf.c                         |   8 +-
>   tools/lib/bpf/bpf.h                         |   2 +-
>   tools/testing/selftests/bpf/test_align.c    |   4 +-
>   tools/testing/selftests/bpf/test_verifier.c | 224 ++++++++++++++++++++--------
>   8 files changed, 206 insertions(+), 70 deletions(-)
>

Hi Greg and Sasha,

Could you please apply this series to 4.19?
Any comments will be much appreciated.

Thanks,
Tiezhu
Greg Kroah-Hartman June 8, 2021, 2:40 p.m. UTC | #2
On Sat, Jun 05, 2021 at 03:16:44PM +0800, Tiezhu Yang wrote:
> On 06/02/2021 11:27 AM, Tiezhu Yang wrote:
> > With the following patch series, all verifier selftests pass on the archs which
> > select HAVE_EFFICIENT_UNALIGNED_ACCESS.
> > 
> > [v2,4.19,00/19] bpf: fix verifier selftests, add CVE-2021-29155, CVE-2021-33200 fixes
> > https://patchwork.kernel.org/project/netdevbpf/cover/20210528103810.22025-1-ovidiu.panait@windriver.com/
> > 
> > But on inefficient unaligned access architectures, there still exist many failures,
> > so some patches about F_NEEDS_EFFICIENT_UNALIGNED_ACCESS are also needed, backport
> > to 4.19 with a minor context difference.
> > 
> > This patch series is based on the series (all now queued up by greg k-h):
> > "bpf: fix verifier selftests, add CVE-2021-29155, CVE-2021-33200 fixes".
> > 
> > Björn Töpel (2):
> >    selftests/bpf: add "any alignment" annotation for some tests
> >    selftests/bpf: Avoid running unprivileged tests with alignment
> >      requirements
> > 
> > Daniel Borkmann (2):
> >    bpf: fix test suite to enable all unpriv program types
> >    bpf: test make sure to run unpriv test cases in test_verifier
> > 
> > David S. Miller (4):
> >    bpf: Add BPF_F_ANY_ALIGNMENT.
> >    bpf: Adjust F_NEEDS_EFFICIENT_UNALIGNED_ACCESS handling in
> >      test_verifier.c
> >    bpf: Make more use of 'any' alignment in test_verifier.c
> >    bpf: Apply F_NEEDS_EFFICIENT_UNALIGNED_ACCESS to more ACCEPT test
> >      cases.
> > 
> > Joe Stringer (1):
> >    selftests/bpf: Generalize dummy program types
> > 
> >   include/uapi/linux/bpf.h                    |  14 ++
> >   kernel/bpf/syscall.c                        |   7 +-
> >   kernel/bpf/verifier.c                       |   3 +
> >   tools/include/uapi/linux/bpf.h              |  14 ++
> >   tools/lib/bpf/bpf.c                         |   8 +-
> >   tools/lib/bpf/bpf.h                         |   2 +-
> >   tools/testing/selftests/bpf/test_align.c    |   4 +-
> >   tools/testing/selftests/bpf/test_verifier.c | 224 ++++++++++++++++++++--------
> >   8 files changed, 206 insertions(+), 70 deletions(-)
> > 
> 
> Hi Greg and Sasha,
> 
> Could you please apply this series to 4.19?

Please relax and give us longer than just 2 days to respond :)

I'll go review this now...

greg k-h
Greg Kroah-Hartman June 8, 2021, 2:45 p.m. UTC | #3
On Wed, Jun 02, 2021 at 11:27:44AM +0800, Tiezhu Yang wrote:
> With the following patch series, all verifier selftests pass on the archs which
> select HAVE_EFFICIENT_UNALIGNED_ACCESS.
> 
> [v2,4.19,00/19] bpf: fix verifier selftests, add CVE-2021-29155, CVE-2021-33200 fixes
> https://patchwork.kernel.org/project/netdevbpf/cover/20210528103810.22025-1-ovidiu.panait@windriver.com/
> 
> But on inefficient unaligned access architectures, there still exist many failures,
> so some patches about F_NEEDS_EFFICIENT_UNALIGNED_ACCESS are also needed, backport
> to 4.19 with a minor context difference.

Looks good, now queued up, thanks.

greg k-h