History

Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

Alexei Starovoitov says: ==================== pull-request: bpf-next 2021-11-01 We've added 181 non-merge commits during the last 28 day(s) which contain a total of 280 files changed, 11791 insertions(+), 5879 deletions(-). The main changes are: 1) Fix bpf verifier propagation of 64-bit bounds, from Alexei. 2) Parallelize bpf test_progs, from Yucong and Andrii. 3) Deprecate various libbpf apis including af_xdp, from Andrii, Hengqi, Magnus. 4) Improve bpf selftests on s390, from Ilya. 5) bloomfilter bpf map type, from Joanne. 6) Big improvements to JIT tests especially on Mips, from Johan. 7) Support kernel module function calls from bpf, from Kumar. 8) Support typeless and weak ksym in light skeleton, from Kumar. 9) Disallow unprivileged bpf by default, from Pawan. 10) BTF_KIND_DECL_TAG support, from Yonghong. 11) Various bpftool cleanups, from Quentin. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (181 commits) libbpf: Deprecate AF_XDP support kbuild: Unify options for BTF generation for vmlinux and modules selftests/bpf: Add a testcase for 64-bit bounds propagation issue. bpf: Fix propagation of signed bounds from 64-bit min/max into 32-bit. bpf: Fix propagation of bounds from 64-bit min/max into 32-bit and var_off. selftests/bpf: Fix also no-alu32 strobemeta selftest bpf: Add missing map_delete_elem method to bloom filter map selftests/bpf: Add bloom map success test for userspace calls bpf: Add alignment padding for "map_extra" + consolidate holes bpf: Bloom filter map naming fixups selftests/bpf: Add test cases for struct_ops prog bpf: Add dummy BPF STRUCT_OPS for test purpose bpf: Factor out helpers for ctx access checking bpf: Factor out a helper to prepare trampoline for struct_ops prog selftests, bpf: Fix broken riscv build riscv, libbpf: Add RISC-V (RV64) support to bpf_tracing.h tools, build: Add RISC-V to HOSTARCH parsing riscv, bpf: Increase the maximum number of iterations selftests, bpf: Add one test for sockmap with strparser selftests, bpf: Fix test_txmsg_ingress_parser error ... ====================

Jakub Kicinski committed 5 years ago

Commit b7b98f82 parents 52fa3ee 0b17045280 files · +11791 −5879Browse files

Showing the changes to include/uapi/linux (2 of 280 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/bpf.h +34 −0
  2. include/uapi/linux/btf.h +4 −4
include/uapi/linux/bpf.h+34−0
@@ -906,6 +906,7 @@ enum bpf_map_type { · 905 unmodified lines
906 BPF_MAP_TYPE_RINGBUF,906 BPF_MAP_TYPE_RINGBUF,
907 BPF_MAP_TYPE_INODE_STORAGE,907 BPF_MAP_TYPE_INODE_STORAGE,
908 BPF_MAP_TYPE_TASK_STORAGE,908 BPF_MAP_TYPE_TASK_STORAGE,
909 BPF_MAP_TYPE_BLOOM_FILTER,
909};910};
910 911
911/* Note that tracing related programs such as912/* Note that tracing related programs such as
@@ -1274,6 +1275,13 @@ union bpf_attr { · 362 unmodified lines
1274 * struct stored as the1275 * struct stored as the
1275 * map value1276 * map value
1276 */1277 */
1278 /* Any per-map-type extra fields
1279 *
1280 * BPF_MAP_TYPE_BLOOM_FILTER - the lowest 4 bits indicate the
1281 * number of hash functions (if 0, the bloom filter will default
1282 * to using 5 hash functions).
1283 */
1284 __u64 map_extra;
1277 };1285 };
1278 1286
1279 struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */1287 struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
@@ -4909,6 +4917,27 @@ union bpf_attr { · 3629 unmodified lines
4909 * Return4917 * Return
4910 * The number of bytes written to the buffer, or a negative error4918 * The number of bytes written to the buffer, or a negative error
4911 * in case of failure.4919 * in case of failure.
4920 *
4921 * struct unix_sock *bpf_skc_to_unix_sock(void *sk)
4922 * Description
4923 * Dynamically cast a *sk* pointer to a *unix_sock* pointer.
4924 * Return
4925 * *sk* if casting is valid, or **NULL** otherwise.
4926 *
4927 * long bpf_kallsyms_lookup_name(const char *name, int name_sz, int flags, u64 *res)
4928 * Description
4929 * Get the address of a kernel symbol, returned in *res*. *res* is
4930 * set to 0 if the symbol is not found.
4931 * Return
4932 * On success, zero. On error, a negative value.
4933 *
4934 * **-EINVAL** if *flags* is not zero.
4935 *
4936 * **-EINVAL** if string *name* is not the same size as *name_sz*.
4937 *
4938 * **-ENOENT** if symbol is not found.
4939 *
4940 * **-EPERM** if caller does not have permission to obtain kernel address.
4912 */4941 */
4913#define __BPF_FUNC_MAPPER(FN) \4942#define __BPF_FUNC_MAPPER(FN) \
4914 FN(unspec), \4943 FN(unspec), \
@@ -5089,6 +5118,8 @@ union bpf_attr { · 174 unmodified lines
5089 FN(task_pt_regs), \5118 FN(task_pt_regs), \
5090 FN(get_branch_snapshot), \5119 FN(get_branch_snapshot), \
5091 FN(trace_vprintk), \5120 FN(trace_vprintk), \
5121 FN(skc_to_unix_sock), \
5122 FN(kallsyms_lookup_name), \
5092 /* */5123 /* */
5093 5124
5094/* integer value in 'imm' field of BPF_CALL instruction selects which helper5125/* integer value in 'imm' field of BPF_CALL instruction selects which helper
@@ -5613,6 +5644,7 @@ struct bpf_prog_info { · 518 unmodified lines
5613 __u64 run_time_ns;5644 __u64 run_time_ns;
5614 __u64 run_cnt;5645 __u64 run_cnt;
5615 __u64 recursion_misses;5646 __u64 recursion_misses;
5647 __u32 verified_insns;
5616} __attribute__((aligned(8)));5648} __attribute__((aligned(8)));
5617 5649
5618struct bpf_map_info {5650struct bpf_map_info {
@@ -5630,6 +5662,8 @@ struct bpf_map_info { · 11 unmodified lines
5630 __u32 btf_id;5662 __u32 btf_id;
5631 __u32 btf_key_type_id;5663 __u32 btf_key_type_id;
5632 __u32 btf_value_type_id;5664 __u32 btf_value_type_id;
5665 __u32 :32; /* alignment pad */
5666 __u64 map_extra;
5633} __attribute__((aligned(8)));5667} __attribute__((aligned(8)));
5634 5668
5635struct bpf_btf_info {5669struct bpf_btf_info {
include/uapi/linux/btf.h+4−4
@@ -43,7 +43,7 @@ struct btf_type { · 42 unmodified lines
43 * "size" tells the size of the type it is describing.43 * "size" tells the size of the type it is describing.
44 *44 *
45 * "type" is used by PTR, TYPEDEF, VOLATILE, CONST, RESTRICT,45 * "type" is used by PTR, TYPEDEF, VOLATILE, CONST, RESTRICT,
46 * FUNC, FUNC_PROTO, VAR and TAG.46 * FUNC, FUNC_PROTO, VAR and DECL_TAG.
47 * "type" is a type_id referring to another type.47 * "type" is a type_id referring to another type.
48 */48 */
49 union {49 union {
@@ -74,7 +74,7 @@ enum { · 24 unmodified lines
74 BTF_KIND_VAR = 14, /* Variable */74 BTF_KIND_VAR = 14, /* Variable */
75 BTF_KIND_DATASEC = 15, /* Section */75 BTF_KIND_DATASEC = 15, /* Section */
76 BTF_KIND_FLOAT = 16, /* Floating point */76 BTF_KIND_FLOAT = 16, /* Floating point */
77 BTF_KIND_TAG = 17, /* Tag */77 BTF_KIND_DECL_TAG = 17, /* Decl Tag */
78 78
79 NR_BTF_KINDS,79 NR_BTF_KINDS,
80 BTF_KIND_MAX = NR_BTF_KINDS - 1,80 BTF_KIND_MAX = NR_BTF_KINDS - 1,
@@ -174,14 +174,14 @@ struct btf_var_secinfo { · 93 unmodified lines
174 __u32 size;174 __u32 size;
175};175};
176 176
177/* BTF_KIND_TAG is followed by a single "struct btf_tag" to describe177/* BTF_KIND_DECL_TAG is followed by a single "struct btf_decl_tag" to describe
178 * additional information related to the tag applied location.178 * additional information related to the tag applied location.
179 * If component_idx == -1, the tag is applied to a struct, union,179 * If component_idx == -1, the tag is applied to a struct, union,
180 * variable or function. Otherwise, it is applied to a struct/union180 * variable or function. Otherwise, it is applied to a struct/union
181 * member or a func argument, and component_idx indicates which member181 * member or a func argument, and component_idx indicates which member
182 * or argument (0 ... vlen-1).182 * or argument (0 ... vlen-1).
183 */183 */
184struct btf_tag {184struct btf_decl_tag {
185 __s32 component_idx;185 __s32 component_idx;
186};186};
187 187

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t