diff options
| author | Alexei Starovoitov <ast@kernel.org> | 2026-11-02 00:10:40 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-11-02 00:10:41 +0000 |
| commit | 714b7112017fc7f8b2afabccf562acdb12d2ea7d (patch) | |
| tree | f49c1ce081d19372c077ffb4e227753a3eecbd6e /include/linux | |
| parent | 1d55411e8b677c67de7a20618d95dc114796de26 (diff) | |
| parent | ee36c9aa44ef300cd651074bd97552b229337f85 (diff) | |
Merge branch 'bpf-fixes-for-the-verifier-arena-skb-and-lwt-helpers'
Alexei Starovoitov says:
====================
bpf: Fixes for the verifier, arena, skb and lwt helpers
From: Alexei Starovoitov <ast@kernel.org>
These patches fix bugs in BPF:
patches area
------- ----------------------------------------------------------------
01-02 stack traces: the limit of the trace length
03-07 arena: the range of mmap() and of bpf_arena_free_pages()
08-12 arguments of kfuncs and of extension progs
13 cgroup detach: the permission check
14 cgroup skb progs: the network offset
15 bpf_skb_adjust_room(): the limit of gso_size
16-24 lwt and seg6local End.BPF progs: pushed headers, skb->cb, dst
25-27 skb offsets when a helper adds or removes room
10 of the patches are from Chris Mason and Josef Bacik. Patches 07 and 12
are selftests.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
====================
Link: https://patch.msgid.link/20261101190535.1454146-1-alexei.starovoitov@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bpf.h | 10 | ||||
| -rw-r--r-- | include/linux/bpf_verifier.h | 8 | ||||
| -rw-r--r-- | include/linux/btf.h | 1 |
3 files changed, 11 insertions, 8 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 1a8c3e514284..0b44bcb4f56e 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -1752,12 +1752,22 @@ enum bpf_func_context { BPF_FUNC_CTX_CNT, }; +struct bpf_subprog_arg_info { + enum bpf_arg_type arg_type; + union { + u32 mem_size; + u32 btf_id; + }; +}; + struct bpf_func_info_aux { u16 linkage; bool unreliable; bool called[BPF_FUNC_CTX_CNT]; bool verified[BPF_FUNC_CTX_CNT]; bool called_with_pkt_ptrs; + /* what the callers of a global function are checked against */ + struct bpf_subprog_arg_info args[MAX_BPF_FUNC_REG_ARGS]; }; enum bpf_jit_poke_reason { diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index 8852c173c53e..33dc3d402057 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -923,14 +923,6 @@ struct bpf_func_ptr { /* the subprog that a bpf_func_ptr pointed to was removed as dead code */ #define BPF_FUNC_PTR_DELETED ((u32)-1) -struct bpf_subprog_arg_info { - enum bpf_arg_type arg_type; - union { - u32 mem_size; - u32 btf_id; - }; -}; - enum priv_stack_mode { PRIV_STACK_UNKNOWN, NO_PRIV_STACK, diff --git a/include/linux/btf.h b/include/linux/btf.h index a18254b7521b..87fad4076f0e 100644 --- a/include/linux/btf.h +++ b/include/linux/btf.h @@ -631,6 +631,7 @@ s32 btf_find_dtor_kfunc(struct btf *btf, u32 btf_id); int register_btf_id_dtor_kfuncs(const struct btf_id_dtor_kfunc *dtors, u32 add_cnt, struct module *owner); struct btf_struct_meta *btf_find_struct_meta(const struct btf *btf, u32 btf_id); +bool btf_is_projection_type(const char *pname); bool btf_is_projection_of(const char *pname, const char *tname); bool btf_is_prog_ctx_type(struct bpf_verifier_log *log, const struct btf *btf, const struct btf_type *t, enum bpf_prog_type prog_type, |
