1. 17 May, 2023 1 commit
    • Jakub Kicinski's avatar
      Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · a0e35a64
      Jakub Kicinski authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2023-05-16
      
      We've added 57 non-merge commits during the last 19 day(s) which contain
      a total of 63 files changed, 3293 insertions(+), 690 deletions(-).
      
      The main changes are:
      
      1) Add precision propagation to verifier for subprogs and callbacks,
         from Andrii Nakryiko.
      
      2) Improve BPF's {g,s}setsockopt() handling with wrong option lengths,
         from Stanislav Fomichev.
      
      3) Utilize pahole v1.25 for the kernel's BTF generation to filter out
         inconsistent function prototypes, from Alan Maguire.
      
      4) Various dyn-pointer verifier improvements to relax restrictions,
         from Daniel Rosenberg.
      
      5) Add a new bpf_task_under_cgroup() kfunc for designated task,
         from Feng Zhou.
      
      6) Unblock tests for arm64 BPF CI after ftrace supporting direct call,
         from Florent Revest.
      
      7) Add XDP hint kfunc metadata for RX hash/timestamp for igc,
         from Jesper Dangaard Brouer.
      
      8) Add several new dyn-pointer kfuncs to ease their usability,
         from Joanne Koong.
      
      9) Add in-depth LRU internals description and dot function graph,
         from Joe Stringer.
      
      10) Fix KCSAN report on bpf_lru_list when accessing node->ref,
          from Martin KaFai Lau.
      
      11) Only dump unprivileged_bpf_disabled log warning upon write,
          from Kui-Feng Lee.
      
      12) Extend test_progs to directly passing allow/denylist file,
          from Stephen Veiss.
      
      13) Fix BPF trampoline memleak upon failure attaching to fentry,
          from Yafang Shao.
      
      14) Fix emitting struct bpf_tcp_sock type in vmlinux BTF,
          from Yonghong Song.
      
      * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (57 commits)
        bpf: Fix memleak due to fentry attach failure
        bpf: Remove bpf trampoline selector
        bpf, arm64: Support struct arguments in the BPF trampoline
        bpftool: JIT limited misreported as negative value on aarch64
        bpf: fix calculation of subseq_idx during precision backtracking
        bpf: Remove anonymous union in bpf_kfunc_call_arg_meta
        bpf: Document EFAULT changes for sockopt
        selftests/bpf: Correctly handle optlen > 4096
        selftests/bpf: Update EFAULT {g,s}etsockopt selftests
        bpf: Don't EFAULT for {g,s}setsockopt with wrong optlen
        libbpf: fix offsetof() and container_of() to work with CO-RE
        bpf: Address KCSAN report on bpf_lru_list
        bpf: Add --skip_encoding_btf_inconsistent_proto, --btf_gen_optimized to pahole flags for v1.25
        selftests/bpf: Accept mem from dynptr in helper funcs
        bpf: verifier: Accept dynptr mem as mem in helpers
        selftests/bpf: Check overflow in optional buffer
        selftests/bpf: Test allowing NULL buffer in dynptr slice
        bpf: Allow NULL buffers in bpf_dynptr_slice(_rw)
        selftests/bpf: Add testcase for bpf_task_under_cgroup
        bpf: Add bpf_task_under_cgroup() kfunc
        ...
      ====================
      
      Link: https://lore.kernel.org/r/20230515225603.27027-1-daniel@iogearbox.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a0e35a64
  2. 16 May, 2023 7 commits
  3. 15 May, 2023 20 commits
  4. 14 May, 2023 1 commit
    • Martin KaFai Lau's avatar
      Merge branch 'bpf: Don't EFAULT for {g,s}setsockopt with wrong optlen' · 79b3604d
      Martin KaFai Lau authored
      Stanislav Fomichev says:
      
      ====================
      optval larger than PAGE_SIZE leads to EFAULT if the BPF program
      isn't careful enough. This is often overlooked and might break
      completely unrelated socket options. Instead of EFAULT,
      let's ignore BPF program buffer changes. See the first patch for
      more info.
      
      In addition, clearly document this corner case and reset optlen
      in our selftests (in case somebody copy-pastes from them).
      
      v6:
      - no changes; resending due to screwing up v5 series with the unrelated
        patch
      
      v5:
      - goto in the selftest (Martin)
      - set IP_TOS to zero to avoid endianness complications (Martin)
      
      v4:
      - ignore retval as well when optlen > PAGE_SIZE (Martin)
      
      v3:
      - don't hard-code PAGE_SIZE (Martin)
      - reset orig_optlen in getsockopt when kernel part succeeds (Martin)
      ====================
      Signed-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
      79b3604d
  5. 13 May, 2023 11 commits