History

Merge tag 'bpf-next-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

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() ...

Linus Torvalds committed 1 year ago

Commit fa593d02 parents 7f2ff7b 9aa8fe2213 files · +10643 −3497Browse files

Showing the changes to include/uapi (3 of 213 files). Show all

Unified · Split

3 files
  1. include/uapi/linux/bpf.h +9 −1
  2. include/uapi/linux/btf.h +2 −1
  3. include/uapi/linux/xattr.h +4 −0
include/uapi/linux/bpf.h+9−1
@@ -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
54enum bpf_cond_pseudo_jmp {57enum 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, the1216/* 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't6032/* 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 argument6033 * know or care about integer value that is now passed as second argument
include/uapi/linux/btf.h+2−1
@@ -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: unused37 * bits 29-30: unused
38 * bit 31: kind_flag, currently used by38 * bit 31: kind_flag, currently used by
39 * struct, union, enum, fwd and enum6439 * 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.
include/uapi/linux/xattr.h+4−0
@@ -83,6 +83,10 @@ struct xattr_args { · 82 unmodified lines
83#define XATTR_CAPS_SUFFIX "capability"83#define XATTR_CAPS_SUFFIX "capability"
84#define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX84#define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX
85 85
86#define XATTR_BPF_LSM_SUFFIX "bpf."
87#define XATTR_NAME_BPF_LSM (XATTR_SECURITY_PREFIX XATTR_BPF_LSM_SUFFIX)
88#define XATTR_NAME_BPF_LSM_LEN (sizeof(XATTR_NAME_BPF_LSM) - 1)
89
86#define XATTR_POSIX_ACL_ACCESS "posix_acl_access"90#define XATTR_POSIX_ACL_ACCESS "posix_acl_access"
87#define XATTR_NAME_POSIX_ACL_ACCESS XATTR_SYSTEM_PREFIX XATTR_POSIX_ACL_ACCESS91#define XATTR_NAME_POSIX_ACL_ACCESS XATTR_SYSTEM_PREFIX XATTR_POSIX_ACL_ACCESS
88#define XATTR_POSIX_ACL_DEFAULT "posix_acl_default"92#define XATTR_POSIX_ACL_DEFAULT "posix_acl_default"