]> Git Repo - linux.git/commitdiff
Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf...
authorJakub Kicinski <[email protected]>
Tue, 7 Mar 2023 04:36:39 +0000 (20:36 -0800)
committerJakub Kicinski <[email protected]>
Tue, 7 Mar 2023 04:36:39 +0000 (20:36 -0800)
Daniel Borkmann says:

====================
pull-request: bpf-next 2023-03-06

We've added 85 non-merge commits during the last 13 day(s) which contain
a total of 131 files changed, 7102 insertions(+), 1792 deletions(-).

The main changes are:

1) Add skb and XDP typed dynptrs which allow BPF programs for more
   ergonomic and less brittle iteration through data and variable-sized
   accesses, from Joanne Koong.

2) Bigger batch of BPF verifier improvements to prepare for upcoming BPF
   open-coded iterators allowing for less restrictive looping capabilities,
   from Andrii Nakryiko.

3) Rework RCU enforcement in the verifier, add kptr_rcu and enforce BPF
   programs to NULL-check before passing such pointers into kfunc,
   from Alexei Starovoitov.

4) Add support for kptrs in percpu hashmaps, percpu LRU hashmaps and in
   local storage maps, from Kumar Kartikeya Dwivedi.

5) Add BPF verifier support for ST instructions in convert_ctx_access()
   which will help new -mcpu=v4 clang flag to start emitting them,
   from Eduard Zingerman.

6) Make uprobe attachment Android APK aware by supporting attachment
   to functions inside ELF objects contained in APKs via function names,
   from Daniel Müller.

7) Add a new flag BPF_F_TIMER_ABS flag for bpf_timer_start() helper
   to start the timer with absolute expiration value instead of relative
   one, from Tero Kristo.

8) Add a new kfunc bpf_cgroup_from_id() to look up cgroups via id,
   from Tejun Heo.

9) Extend libbpf to support users manually attaching kprobes/uprobes
   in the legacy/perf/link mode, from Menglong Dong.

10) Implement workarounds in the mips BPF JIT for DADDI/R4000,
   from Jiaxun Yang.

11) Enable mixing bpf2bpf and tailcalls for the loongarch BPF JIT,
    from Hengqi Chen.

12) Extend BPF instruction set doc with describing the encoding of BPF
    instructions in terms of how bytes are stored under big/little endian,
    from Jose E. Marchesi.

13) Follow-up to enable kfunc support for riscv BPF JIT, from Pu Lehui.

14) Fix bpf_xdp_query() backwards compatibility on old kernels,
    from Yonghong Song.

15) Fix BPF selftest cross compilation with CLANG_CROSS_FLAGS,
    from Florent Revest.

16) Improve bpf_cpumask_ma to only allocate one bpf_mem_cache,
    from Hou Tao.

17) Fix BPF verifier's check_subprogs to not unnecessarily mark
    a subprogram with has_tail_call, from Ilya Leoshkevich.

18) Fix arm syscall regs spec in libbpf's bpf_tracing.h, from Puranjay Mohan.

* tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (85 commits)
  selftests/bpf: Add test for legacy/perf kprobe/uprobe attach mode
  selftests/bpf: Split test_attach_probe into multi subtests
  libbpf: Add support to set kprobe/uprobe attach mode
  tools/resolve_btfids: Add /libsubcmd to .gitignore
  bpf: add support for fixed-size memory pointer returns for kfuncs
  bpf: generalize dynptr_get_spi to be usable for iters
  bpf: mark PTR_TO_MEM as non-null register type
  bpf: move kfunc_call_arg_meta higher in the file
  bpf: ensure that r0 is marked scratched after any function call
  bpf: fix visit_insn()'s detection of BPF_FUNC_timer_set_callback helper
  bpf: clean up visit_insn()'s instruction processing
  selftests/bpf: adjust log_fixup's buffer size for proper truncation
  bpf: honor env->test_state_freq flag in is_state_visited()
  selftests/bpf: enhance align selftest's expected log matching
  bpf: improve regsafe() checks for PTR_TO_{MEM,BUF,TP_BUFFER}
  bpf: improve stack slot state printing
  selftests/bpf: Disassembler tests for verifier.c:convert_ctx_access()
  selftests/bpf: test if pointer type is tracked for BPF_ST_MEM
  bpf: allow ctx writes using BPF_ST_MEM instruction
  bpf: Use separate RCU callbacks for freeing selem
  ...
====================

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
1  2 
arch/mips/Kconfig
kernel/bpf/syscall.c

diff --combined arch/mips/Kconfig
index 37072e15b263403d19a940d044cb7e2ade6c8133,363cd59a3bc02e87eef1a5bd9bff18b56bd347f2..5ea07c833c5be9296b7a93958887e62b09fc2642
@@@ -63,10 -63,7 +63,7 @@@ config MIP
        select HAVE_DEBUG_STACKOVERFLOW
        select HAVE_DMA_CONTIGUOUS
        select HAVE_DYNAMIC_FTRACE
-       select HAVE_EBPF_JIT if !CPU_MICROMIPS && \
-                               !CPU_DADDI_WORKAROUNDS && \
-                               !CPU_R4000_WORKAROUNDS && \
-                               !CPU_R4400_WORKAROUNDS
+       select HAVE_EBPF_JIT if !CPU_MICROMIPS
        select HAVE_EXIT_THREAD
        select HAVE_FAST_GUP
        select HAVE_FTRACE_MCOUNT_RECORD
@@@ -445,7 -442,6 +442,7 @@@ config LANTI
        select IRQ_MIPS_CPU
        select CEVT_R4K
        select CSRC_R4K
 +      select NO_EXCEPT_FILL
        select SYS_HAS_CPU_MIPS32_R1
        select SYS_HAS_CPU_MIPS32_R2
        select SYS_SUPPORTS_BIG_ENDIAN
diff --combined kernel/bpf/syscall.c
index adc83cb82f379df0c9692b5fdd24cbb33319b444,eb50025b03c18c9c9e8d13c35d6ab3fc45c3885a..ede5f987484f081320e952e07883627d3eb0cf4b
@@@ -895,10 -895,10 +895,10 @@@ static int bpf_map_mmap(struct file *fi
        /* set default open/close callbacks */
        vma->vm_ops = &bpf_map_default_vmops;
        vma->vm_private_data = map;
 -      vma->vm_flags &= ~VM_MAYEXEC;
 +      vm_flags_clear(vma, VM_MAYEXEC);
        if (!(vma->vm_flags & VM_WRITE))
                /* disallow re-mapping with PROT_WRITE */
 -              vma->vm_flags &= ~VM_MAYWRITE;
 +              vm_flags_clear(vma, VM_MAYWRITE);
  
        err = map->ops->map_mmap(map, vma);
        if (err)
@@@ -1059,9 -1059,15 +1059,15 @@@ static int map_check_btf(struct bpf_ma
                        case BPF_KPTR_UNREF:
                        case BPF_KPTR_REF:
                                if (map->map_type != BPF_MAP_TYPE_HASH &&
+                                   map->map_type != BPF_MAP_TYPE_PERCPU_HASH &&
                                    map->map_type != BPF_MAP_TYPE_LRU_HASH &&
+                                   map->map_type != BPF_MAP_TYPE_LRU_PERCPU_HASH &&
                                    map->map_type != BPF_MAP_TYPE_ARRAY &&
-                                   map->map_type != BPF_MAP_TYPE_PERCPU_ARRAY) {
+                                   map->map_type != BPF_MAP_TYPE_PERCPU_ARRAY &&
+                                   map->map_type != BPF_MAP_TYPE_SK_STORAGE &&
+                                   map->map_type != BPF_MAP_TYPE_INODE_STORAGE &&
+                                   map->map_type != BPF_MAP_TYPE_TASK_STORAGE &&
+                                   map->map_type != BPF_MAP_TYPE_CGRP_STORAGE) {
                                        ret = -EOPNOTSUPP;
                                        goto free_map_tab;
                                }
This page took 0.105067 seconds and 4 git commands to generate.