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
906906 BPF_MAP_TYPE_RINGBUF,
907907 BPF_MAP_TYPE_INODE_STORAGE,
908908 BPF_MAP_TYPE_TASK_STORAGE,
909+ BPF_MAP_TYPE_BLOOM_FILTER,
909910 };
910911
911912 /* Note that tracing related programs such as
@@ -1274,6 +1275,13 @@ union bpf_attr { · 362 unmodified lines
12741275 * struct stored as the
12751276 * map value
12761277 */
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;
12771285 };
12781286
12791287 struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
@@ -4909,6 +4917,27 @@ union bpf_attr { · 3629 unmodified lines
49094917 * Return
49104918 * The number of bytes written to the buffer, or a negative error
49114919 * 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.
49124941 */
49134942 #define __BPF_FUNC_MAPPER(FN) \
49144943 FN(unspec), \
@@ -5089,6 +5118,8 @@ union bpf_attr { · 174 unmodified lines
50895118 FN(task_pt_regs), \
50905119 FN(get_branch_snapshot), \
50915120 FN(trace_vprintk), \
5121+ FN(skc_to_unix_sock), \
5122+ FN(kallsyms_lookup_name), \
50925123 /* */
50935124
50945125 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
@@ -5613,6 +5644,7 @@ struct bpf_prog_info { · 518 unmodified lines
56135644 __u64 run_time_ns;
56145645 __u64 run_cnt;
56155646 __u64 recursion_misses;
5647+ __u32 verified_insns;
56165648 } __attribute__((aligned(8)));
56175649
56185650 struct bpf_map_info {
@@ -5630,6 +5662,8 @@ struct bpf_map_info { · 11 unmodified lines
56305662 __u32 btf_id;
56315663 __u32 btf_key_type_id;
56325664 __u32 btf_value_type_id;
5665+ __u32 :32; /* alignment pad */
5666+ __u64 map_extra;
56335667 } __attribute__((aligned(8)));
56345668
56355669 struct bpf_btf_info {
include/uapi/linux/btf.h+4−4
@@ -43,7 +43,7 @@ struct btf_type { · 42 unmodified lines
4343 * "size" tells the size of the type it is describing.
4444 *
4545 * "type" is used by PTR, TYPEDEF, VOLATILE, CONST, RESTRICT,
46− * FUNC, FUNC_PROTO, VAR and TAG.
46+ * FUNC, FUNC_PROTO, VAR and DECL_TAG.
4747 * "type" is a type_id referring to another type.
4848 */
4949 union {
@@ -74,7 +74,7 @@ enum { · 24 unmodified lines
7474 BTF_KIND_VAR = 14, /* Variable */
7575 BTF_KIND_DATASEC = 15, /* Section */
7676 BTF_KIND_FLOAT = 16, /* Floating point */
77− BTF_KIND_TAG = 17, /* Tag */
77+ BTF_KIND_DECL_TAG = 17, /* Decl Tag */
7878
7979 NR_BTF_KINDS,
8080 BTF_KIND_MAX = NR_BTF_KINDS - 1,
@@ -174,14 +174,14 @@ struct btf_var_secinfo { · 93 unmodified lines
174174 __u32 size;
175175 };
176176
177−/* BTF_KIND_TAG is followed by a single "struct btf_tag" to describe
177+/* BTF_KIND_DECL_TAG is followed by a single "struct btf_decl_tag" to describe
178178 * additional information related to the tag applied location.
179179 * If component_idx == -1, the tag is applied to a struct, union,
180180 * variable or function. Otherwise, it is applied to a struct/union
181181 * member or a func argument, and component_idx indicates which member
182182 * or argument (0 ... vlen-1).
183183 */
184−struct btf_tag {
184+struct btf_decl_tag {
185185 __s32 component_idx;
186186 };
187187

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