pull-request: bpf-next 2023-12-22

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David, hi Jakub, hi Paolo, hi Eric,

The following pull-request contains BPF updates for your *net-next* tree.

We've added 22 non-merge commits during the last 3 day(s) which contain
a total of 23 files changed, 652 insertions(+), 431 deletions(-).

The main changes are:

1) Add verifier support for annotating user's global BPF subprogram arguments
   with few commonly requested annotations for a better developer experience,
   from Andrii Nakryiko.

   These tags are:
     - Ability to annotate a special PTR_TO_CTX argument
     - Ability to annotate a generic PTR_TO_MEM as non-NULL

2) Support BPF verifier tracking of BPF_JNE which helps cases when the compiler
   transforms (unsigned) "a > 0" into "if a == 0 goto xxx" and the like, from
   Menglong Dong.

3) Fix a warning in bpf_mem_cache's check_obj_size() as reported by LKP, from Hou Tao.

4) Re-support uid/gid options when mounting bpffs which had to be reverted with
   the prior token series revert to avoid conflicts, from Daniel Borkmann.

5) Fix a libbpf NULL pointer dereference in bpf_object__collect_prog_relos() found
   from fuzzing the library with malformed ELF files, from Mingyi Zhang.

6) Skip DWARF sections in libbpf's linker sanity check given compiler options to
   generate compressed debug sections can trigger a rejection due to misalignment,
   from Alyssa Ross.

7) Fix an unnecessary use of the comma operator in BPF verifier, from Simon Horman.

8) Fix format specifier for unsigned long values in cpustat sample, from Colin Ian King.

Please consider pulling these changes from:

  git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git tags/for-netdev

Thanks a lot & wishing you all happy holidays!

Also thanks to reporters, reviewers and testers of commits in this pull-request:

Andrii Nakryiko, Christian Brauner, Daniel Borkmann, Dave Marchevsky, 
Eduard Zingerman, kernel test robot, Randy Dunlap, Sergei Trofimovich, 
Shung-Hsi Yu

----------------------------------------------------------------

The following changes since commit 1728df7fc11bf09322852ff05e73908244011594:

  Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next (2023-12-19 18:35:28 +0100)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git tags/for-netdev

for you to fetch changes up to 5abde62465222edd3080b70099bd809f166d5d7d:

  bpf: Avoid unnecessary use of comma operator in verifier (2023-12-21 22:40:25 +0100)

----------------------------------------------------------------
bpf-next-for-netdev

----------------------------------------------------------------
Alexei Starovoitov (3):
      Merge branch 'bpf-support-to-track-bpf_jne'
      Merge branch 'enhance-bpf-global-subprogs-with-argument-tags'
      Merge branch 'bpf-fix-warning-in-check_obj_size'

Alyssa Ross (1):
      libbpf: Skip DWARF sections in linker sanity check

Andrii Nakryiko (10):
      bpf: abstract away global subprog arg preparation logic from reg state setup
      bpf: reuse btf_prepare_func_args() check for main program BTF validation
      bpf: prepare btf_prepare_func_args() for handling static subprogs
      bpf: move subprog call logic back to verifier.c
      bpf: reuse subprog argument parsing logic for subprog call checks
      bpf: support 'arg:xxx' btf_decl_tag-based hints for global subprog args
      bpf: add support for passing dynptr pointer to global subprog
      libbpf: add __arg_xxx macros for annotating global func args
      selftests/bpf: add global subprog annotation tests
      selftests/bpf: add freplace of BTF-unreliable main prog test

Colin Ian King (1):
      samples/bpf: Use %lu format specifier for unsigned long values

Daniel Borkmann (1):
      bpf: Re-support uid and gid when mounting bpffs

Hou Tao (3):
      selftests/bpf: Close cgrp fd before calling cleanup_cgroup_environment()
      bpf: Use c->unit_size to select target cache during free
      selftests/bpf: Remove tests for zeroed-array kptr

Menglong Dong (4):
      bpf: make the verifier tracks the "not equal" for regs
      selftests/bpf: remove reduplicated s32 casting in "crafted_cases"
      selftests/bpf: activate the OP_NE logic in range_cond()
      selftests/bpf: add testcase to verifier_bounds.c for BPF_JNE

Mingyi Zhang (1):
      libbpf: Fix NULL pointer dereference in bpf_object__collect_prog_relos

Simon Horman (1):
      bpf: Avoid unnecessary use of comma operator in verifier

 include/linux/bpf.h                                |   7 +-
 include/linux/bpf_verifier.h                       |  29 ++-
 kernel/bpf/btf.c                                   | 282 ++++++---------------
 kernel/bpf/inode.c                                 |  53 +++-
 kernel/bpf/memalloc.c                              | 105 +-------
 kernel/bpf/verifier.c                              | 224 +++++++++++++---
 samples/bpf/cpustat_user.c                         |   4 +-
 tools/lib/bpf/bpf_helpers.h                        |   3 +
 tools/lib/bpf/libbpf.c                             |   2 +
 tools/lib/bpf/linker.c                             |   3 +
 .../testing/selftests/bpf/benchs/bench_htab_mem.c  |   1 +
 .../selftests/bpf/prog_tests/fexit_bpf2bpf.c       |  30 ++-
 tools/testing/selftests/bpf/prog_tests/log_fixup.c |   4 +-
 .../testing/selftests/bpf/prog_tests/reg_bounds.c  |  27 +-
 tools/testing/selftests/bpf/prog_tests/verifier.c  |   2 +
 .../selftests/bpf/progs/cgrp_kfunc_failure.c       |   2 +-
 .../selftests/bpf/progs/freplace_unreliable_prog.c |  20 ++
 .../selftests/bpf/progs/task_kfunc_failure.c       |   2 +-
 tools/testing/selftests/bpf/progs/test_bpf_ma.c    | 100 ++++----
 .../selftests/bpf/progs/test_global_func5.c        |   2 +-
 .../testing/selftests/bpf/progs/verifier_bounds.c  |  62 +++++
 .../bpf/progs/verifier_btf_unreliable_prog.c       |  20 ++
 .../selftests/bpf/progs/verifier_global_subprogs.c |  99 +++++++-
 23 files changed, 652 insertions(+), 431 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/freplace_unreliable_prog.c
 create mode 100644 tools/testing/selftests/bpf/progs/verifier_btf_unreliable_prog.c




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux