Pull bpf updates from Alexei Starovoitov: "For this merge window we're splitting BPF pull request into three for higher visibility: main changes, res_spin_lock, try_alloc_pages. These are the main BPF changes: - Add DFA-based live registers analysis to improve verification of programs with loops (Eduard Zingerman) - Introduce load_acquire and store_release BPF instructions and add x86, arm64 JIT support (Peilin Ye) - Fix loop detection logic in the verifier (Eduard Zingerman) - Drop unnecesary lock in bpf_map_inc_not_zero() (Eric Dumazet) - Add kfunc for populating cpumask bits (Emil Tsalapatis) - Convert various shell based tests to selftests/bpf/test_progs format (Bastien Curutchet) - Allow passing referenced kptrs into struct_ops callbacks (Amery Hung) - Add a flag to LSM bpf hook to facilitate bpf program signing (Blaise Boscaccy) - Track arena arguments in kfuncs (Ihor Solodrai) - Add copy_remote_vm_str() helper for reading strings from remote VM and bpf_copy_from_user_task_str() kfunc (Jordan Rome) - Add support for timed may_goto instruction (Kumar Kartikeya Dwivedi) - Allow bpf_get_netns_cookie() int cgroup_skb programs (Mahe Tardy) - Reduce bpf_cgrp_storage_busy false positives when accessing cgroup local storage (Martin KaFai Lau) - Introduce bpf_dynptr_copy() kfunc (Mykyta Yatsenko) - Allow retrieving BTF data with BTF token (Mykyta Yatsenko) - Add BPF kfuncs to set and get xattrs with 'security.bpf.' prefix (Song Liu) - Reject attaching programs to noreturn functions (Yafang Shao) - Introduce pre-order traversal of cgroup bpf programs (Yonghong Song)" * tag 'bpf-next-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (186 commits) selftests/bpf: Add selftests for load-acquire/store-release when register number is invalid bpf: Fix out-of-bounds read in check_atomic_load/store() libbpf: Add namespace for errstr making it libbpf_errstr bpf: Add struct_ops context information to struct bpf_prog_aux selftests/bpf: Sanitize pointer prior fclose() selftests/bpf: Migrate test_xdp_vlan.sh into test_progs selftests/bpf: test_xdp_vlan: Rename BPF sections bpf: clarify a misleading verifier error message selftests/bpf: Add selftest for attaching fexit to __noreturn functions bpf: Reject attaching fexit/fmod_ret to __noreturn functions bpf: Only fails the busy counter check in bpf_cgrp_storage_get if it creates storage bpf: Make perf_event_read_output accessible in all program types. bpftool: Using the right format specifiers bpftool: Add -Wformat-signedness flag to detect format errors selftests/bpf: Test freplace from user namespace libbpf: Pass BPF token from find_prog_btf_id to BPF_BTF_GET_FD_BY_ID bpf: Return prog btf_id without capable check bpf: BPF token support for BPF_BTF_GET_FD_BY_ID bpf, x86: Fix objtool warning for timed may_goto bpf: Check map->record at the beginning of check_and_free_fields() ...
Showing the changes to tools/include/uapi/linux (2 of 213 files). Show all
Unified · Split
| @@ -51,6 +51,9 @@ · 50 unmodified lines | |||
| 51 | #define BPF_XCHG (0xe0 | BPF_FETCH) /* atomic exchange */ | 51 | #define BPF_XCHG (0xe0 | BPF_FETCH) /* atomic exchange */ |
| 52 | #define BPF_CMPXCHG (0xf0 | BPF_FETCH) /* atomic compare-and-write */ | 52 | #define BPF_CMPXCHG (0xf0 | BPF_FETCH) /* atomic compare-and-write */ |
| 53 | 53 | ||
| 54 | #define BPF_LOAD_ACQ 0x100 /* load-acquire */ | ||
| 55 | #define BPF_STORE_REL 0x110 /* store-release */ | ||
| 56 | |||
| 54 | enum bpf_cond_pseudo_jmp { | 57 | enum bpf_cond_pseudo_jmp { |
| 55 | BPF_MAY_GOTO = 0, | 58 | BPF_MAY_GOTO = 0, |
| 56 | }; | 59 | }; |
| @@ -1207,6 +1210,7 @@ enum bpf_perf_event_type { · 1150 unmodified lines | |||
| 1207 | #define BPF_F_BEFORE (1U << 3) | 1210 | #define BPF_F_BEFORE (1U << 3) |
| 1208 | #define BPF_F_AFTER (1U << 4) | 1211 | #define BPF_F_AFTER (1U << 4) |
| 1209 | #define BPF_F_ID (1U << 5) | 1212 | #define BPF_F_ID (1U << 5) |
| 1213 | #define BPF_F_PREORDER (1U << 6) | ||
| 1210 | #define BPF_F_LINK BPF_F_LINK /* 1 << 13 */ | 1214 | #define BPF_F_LINK BPF_F_LINK /* 1 << 13 */ |
| 1211 | 1215 | ||
| 1212 | /* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the | 1216 | /* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the |
| @@ -1648,6 +1652,7 @@ union bpf_attr { · 435 unmodified lines | |||
| 1648 | }; | 1652 | }; |
| 1649 | __u32 next_id; | 1653 | __u32 next_id; |
| 1650 | __u32 open_flags; | 1654 | __u32 open_flags; |
| 1655 | __s32 fd_by_id_token_fd; | ||
| 1651 | }; | 1656 | }; |
| 1652 | 1657 | ||
| 1653 | struct { /* anonymous struct used by BPF_OBJ_GET_INFO_BY_FD */ | 1658 | struct { /* anonymous struct used by BPF_OBJ_GET_INFO_BY_FD */ |
| @@ -6019,7 +6024,10 @@ union bpf_attr { · 4365 unmodified lines | |||
| 6019 | FN(user_ringbuf_drain, 209, ##ctx) \ | 6024 | FN(user_ringbuf_drain, 209, ##ctx) \ |
| 6020 | FN(cgrp_storage_get, 210, ##ctx) \ | 6025 | FN(cgrp_storage_get, 210, ##ctx) \ |
| 6021 | FN(cgrp_storage_delete, 211, ##ctx) \ | 6026 | FN(cgrp_storage_delete, 211, ##ctx) \ |
| 6022 | /* */ | 6027 | /* This helper list is effectively frozen. If you are trying to \ |
| 6028 | * add a new helper, you should add a kfunc instead which has \ | ||
| 6029 | * less stability guarantees. See Documentation/bpf/kfuncs.rst \ | ||
| 6030 | */ | ||
| 6023 | 6031 | ||
| 6024 | /* backwards-compatibility macros for users of __BPF_FUNC_MAPPER that don't | 6032 | /* backwards-compatibility macros for users of __BPF_FUNC_MAPPER that don't |
| 6025 | * know or care about integer value that is now passed as second argument | 6033 | * know or care about integer value that is now passed as second argument |
| @@ -36,7 +36,8 @@ struct btf_type { · 35 unmodified lines | |||
| 36 | * bits 24-28: kind (e.g. int, ptr, array...etc) | 36 | * bits 24-28: kind (e.g. int, ptr, array...etc) |
| 37 | * bits 29-30: unused | 37 | * bits 29-30: unused |
| 38 | * bit 31: kind_flag, currently used by | 38 | * bit 31: kind_flag, currently used by |
| 39 | * struct, union, enum, fwd and enum64 | 39 | * struct, union, enum, fwd, enum64, |
| 40 | * decl_tag and type_tag | ||
| 40 | */ | 41 | */ |
| 41 | __u32 info; | 42 | __u32 info; |
| 42 | /* "size" is used by INT, ENUM, STRUCT, UNION, DATASEC and ENUM64. | 43 | /* "size" is used by INT, ENUM, STRUCT, UNION, DATASEC and ENUM64. |