History

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

Pull bpf fixes from Daniel Borkmann: - Fix BPF verifier to not affect subreg_def marks in its range propagation (Eduard Zingerman) - Fix a truncation bug in the BPF verifier's handling of coerce_reg_to_size_sx (Dimitar Kanaliev) - Fix the BPF verifier's delta propagation between linked registers under 32-bit addition (Daniel Borkmann) - Fix a NULL pointer dereference in BPF devmap due to missing rxq information (Florian Kauer) - Fix a memory leak in bpf_core_apply (Jiri Olsa) - Fix an UBSAN-reported array-index-out-of-bounds in BTF parsing for arrays of nested structs (Hou Tao) - Fix build ID fetching where memory areas backing the file were created with memfd_secret (Andrii Nakryiko) - Fix BPF task iterator tid filtering which was incorrectly using pid instead of tid (Jordan Rome) - Several fixes for BPF sockmap and BPF sockhash redirection in combination with vsocks (Michal Luczaj) - Fix riscv BPF JIT and make BPF_CMPXCHG fully ordered (Andrea Parri) - Fix riscv BPF JIT under CONFIG_CFI_CLANG to prevent the possibility of an infinite BPF tailcall (Pu Lehui) - Fix a build warning from resolve_btfids that bpf_lsm_key_free cannot be resolved (Thomas Weißschuh) - Fix a bug in kfunc BTF caching for modules where the wrong BTF object was returned (Toke Høiland-Jørgensen) - Fix a BPF selftest compilation error in cgroup-related tests with musl libc (Tony Ambardar) - Several fixes to BPF link info dumps to fill missing fields (Tyrone Wu) - Add BPF selftests for kfuncs from multiple modules, checking that the correct kfuncs are called (Simon Sundberg) - Ensure that internal and user-facing bpf_redirect flags don't overlap (Toke Høiland-Jørgensen) - Switch to use kvzmalloc to allocate BPF verifier environment (Rik van Riel) - Use raw_spinlock_t in BPF ringbuf to fix a sleep in atomic splat under RT (Wander Lairson Costa) * tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: (38 commits) lib/buildid: Handle memfd_secret() files in build_id_parse() selftests/bpf: Add test case for delta propagation bpf: Fix print_reg_state's constant scalar dump bpf: Fix incorrect delta propagation between linked registers bpf: Properly test iter/task tid filtering bpf: Fix iter/task tid filtering riscv, bpf: Make BPF_CMPXCHG fully ordered bpf, vsock: Drop static vsock_bpf_prot initialization vsock: Update msg_count on read_skb() vsock: Update rx_bytes on read_skb() bpf, sockmap: SK_DROP on attempted redirects of unsupported af_vsock selftests/bpf: Add asserts for netfilter link info bpf: Fix link info netfilter flags to populate defrag flag selftests/bpf: Add test for sign extension in coerce_subreg_to_size_sx() selftests/bpf: Add test for truncation after sign extension in coerce_reg_to_size_sx() bpf: Fix truncation bug in coerce_reg_to_size_sx() selftests/bpf: Assert link info uprobe_multi count & path_size if unset bpf: Fix unpopulated path_size when uprobe_multi fields unset selftests/bpf: Fix cross-compiling urandom_read selftests/bpf: Add test for kfunc module order ...

Linus Torvalds committed 2 years ago

Commit 3d5ad2d2 parents dbafedd 5ac9b4e42 files · +847 −132Browse files

Showing the changes to tools/include/uapi/linux (1 of 42 files). Show all

Unified · Split

tools/include/uapi/linux/bpf.h+10−12
@@ -5519,11 +5519,12 @@ union bpf_attr { · 5518 unmodified lines
5519 * **-EOPNOTSUPP** if the hash calculation failed or **-EINVAL** if5519 * **-EOPNOTSUPP** if the hash calculation failed or **-EINVAL** if
5520 * invalid arguments are passed.5520 * invalid arguments are passed.
5521 *5521 *
5522 * void *bpf_kptr_xchg(void *map_value, void *ptr)5522 * void *bpf_kptr_xchg(void *dst, void *ptr)
5523 * Description5523 * Description
5524 * Exchange kptr at pointer *map_value* with *ptr*, and return the5524 * Exchange kptr at pointer *dst* with *ptr*, and return the old value.
5525 * old value. *ptr* can be NULL, otherwise it must be a referenced5525 * *dst* can be map value or local kptr. *ptr* can be NULL, otherwise
5526 * pointer which will be released when this helper is called.5526 * it must be a referenced pointer which will be released when this helper
5527 * is called.
5527 * Return5528 * Return
5528 * The old value of kptr (which can be NULL). The returned pointer5529 * The old value of kptr (which can be NULL). The returned pointer
5529 * if not NULL, is a reference which must be released using its5530 * if not NULL, is a reference which must be released using its
@@ -6046,11 +6047,6 @@ enum { · 516 unmodified lines
6046 BPF_F_MARK_ENFORCE = (1ULL << 6),6047 BPF_F_MARK_ENFORCE = (1ULL << 6),
6047};6048};
6048 6049
6049/* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */
6050enum {
6051 BPF_F_INGRESS = (1ULL << 0),
6052};
6053
6054/* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */6050/* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */
6055enum {6051enum {
6056 BPF_F_TUNINFO_IPV6 = (1ULL << 0),6052 BPF_F_TUNINFO_IPV6 = (1ULL << 0),
@@ -6197,10 +6193,12 @@ enum { · 140 unmodified lines
6197 BPF_F_BPRM_SECUREEXEC = (1ULL << 0),6193 BPF_F_BPRM_SECUREEXEC = (1ULL << 0),
6198};6194};
6199 6195
6200/* Flags for bpf_redirect_map helper */6196/* Flags for bpf_redirect and bpf_redirect_map helpers */
6201enum {6197enum {
6202 BPF_F_BROADCAST = (1ULL << 3),6198 BPF_F_INGRESS = (1ULL << 0), /* used for skb path */
6203 BPF_F_EXCLUDE_INGRESS = (1ULL << 4),6199 BPF_F_BROADCAST = (1ULL << 3), /* used for XDP path */
6200 BPF_F_EXCLUDE_INGRESS = (1ULL << 4), /* used for XDP path */
6201#define BPF_F_REDIRECT_FLAGS (BPF_F_INGRESS | BPF_F_BROADCAST | BPF_F_EXCLUDE_INGRESS)
6204};6202};
6205 6203
6206#define __bpf_md_ptr(type, name) \6204#define __bpf_md_ptr(type, name) \

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