Cross-merge bpf fixes after downstream PR. No conflicts. Adjacent changes in: include/linux/bpf.h include/uapi/linux/bpf.h kernel/bpf/btf.c kernel/bpf/helpers.c kernel/bpf/syscall.c kernel/bpf/verifier.c kernel/trace/bpf_trace.c mm/slab_common.c tools/include/uapi/linux/bpf.h tools/testing/selftests/bpf/Makefile
Showing the changes to tools/include/uapi (2 of 1167 files). Show all
Unified · Split
| @@ -1121,6 +1121,9 @@ enum bpf_attach_type { · 1120 unmodified lines | |||
| 1121 | 1121 | ||
| 1122 | #define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE | 1122 | #define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE |
| 1123 | 1123 | ||
| 1124 | /* Add BPF_LINK_TYPE(type, name) in bpf_types.h to keep bpf_link_type_strs[] | ||
| 1125 | * in sync with the definitions below. | ||
| 1126 | */ | ||
| 1124 | enum bpf_link_type { | 1127 | enum bpf_link_type { |
| 1125 | BPF_LINK_TYPE_UNSPEC = 0, | 1128 | BPF_LINK_TYPE_UNSPEC = 0, |
| 1126 | BPF_LINK_TYPE_RAW_TRACEPOINT = 1, | 1129 | BPF_LINK_TYPE_RAW_TRACEPOINT = 1, |
| @@ -5517,11 +5520,12 @@ union bpf_attr { · 4390 unmodified lines | |||
| 5517 | * **-EOPNOTSUPP** if the hash calculation failed or **-EINVAL** if | 5520 | * **-EOPNOTSUPP** if the hash calculation failed or **-EINVAL** if |
| 5518 | * invalid arguments are passed. | 5521 | * invalid arguments are passed. |
| 5519 | * | 5522 | * |
| 5520 | * void *bpf_kptr_xchg(void *map_value, void *ptr) | 5523 | * void *bpf_kptr_xchg(void *dst, void *ptr) |
| 5521 | * Description | 5524 | * Description |
| 5522 | * Exchange kptr at pointer *map_value* with *ptr*, and return the | 5525 | * Exchange kptr at pointer *dst* with *ptr*, and return the old value. |
| 5523 | * old value. *ptr* can be NULL, otherwise it must be a referenced | 5526 | * *dst* can be map value or local kptr. *ptr* can be NULL, otherwise |
| 5524 | * pointer which will be released when this helper is called. | 5527 | * it must be a referenced pointer which will be released when this helper |
| 5528 | * is called. | ||
| 5525 | * Return | 5529 | * Return |
| 5526 | * The old value of kptr (which can be NULL). The returned pointer | 5530 | * The old value of kptr (which can be NULL). The returned pointer |
| 5527 | * if not NULL, is a reference which must be released using its | 5531 | * if not NULL, is a reference which must be released using its |
| @@ -6044,11 +6048,6 @@ enum { · 516 unmodified lines | |||
| 6044 | BPF_F_MARK_ENFORCE = (1ULL << 6), | 6048 | BPF_F_MARK_ENFORCE = (1ULL << 6), |
| 6045 | }; | 6049 | }; |
| 6046 | 6050 | ||
| 6047 | /* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */ | ||
| 6048 | enum { | ||
| 6049 | BPF_F_INGRESS = (1ULL << 0), | ||
| 6050 | }; | ||
| 6051 | |||
| 6052 | /* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */ | 6051 | /* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */ |
| 6053 | enum { | 6052 | enum { |
| 6054 | BPF_F_TUNINFO_IPV6 = (1ULL << 0), | 6053 | BPF_F_TUNINFO_IPV6 = (1ULL << 0), |
| @@ -6195,10 +6194,12 @@ enum { · 140 unmodified lines | |||
| 6195 | BPF_F_BPRM_SECUREEXEC = (1ULL << 0), | 6194 | BPF_F_BPRM_SECUREEXEC = (1ULL << 0), |
| 6196 | }; | 6195 | }; |
| 6197 | 6196 | ||
| 6198 | /* Flags for bpf_redirect_map helper */ | 6197 | /* Flags for bpf_redirect and bpf_redirect_map helpers */ |
| 6199 | enum { | 6198 | enum { |
| 6200 | BPF_F_BROADCAST = (1ULL << 3), | 6199 | BPF_F_INGRESS = (1ULL << 0), /* used for skb path */ |
| 6201 | BPF_F_EXCLUDE_INGRESS = (1ULL << 4), | 6200 | BPF_F_BROADCAST = (1ULL << 3), /* used for XDP path */ |
| 6201 | BPF_F_EXCLUDE_INGRESS = (1ULL << 4), /* used for XDP path */ | ||
| 6202 | #define BPF_F_REDIRECT_FLAGS (BPF_F_INGRESS | BPF_F_BROADCAST | BPF_F_EXCLUDE_INGRESS) | ||
| 6202 | }; | 6203 | }; |
| 6203 | 6204 | ||
| 6204 | #define __bpf_md_ptr(type, name) \ | 6205 | #define __bpf_md_ptr(type, name) \ |
| @@ -141,7 +141,7 @@ struct in_addr { · 140 unmodified lines | |||
| 141 | */ | 141 | */ |
| 142 | #define IP_PMTUDISC_INTERFACE 4 | 142 | #define IP_PMTUDISC_INTERFACE 4 |
| 143 | /* weaker version of IP_PMTUDISC_INTERFACE, which allows packets to get | 143 | /* weaker version of IP_PMTUDISC_INTERFACE, which allows packets to get |
| 144 | * fragmented if they exeed the interface mtu | 144 | * fragmented if they exceed the interface mtu |
| 145 | */ | 145 | */ |
| 146 | #define IP_PMTUDISC_OMIT 5 | 146 | #define IP_PMTUDISC_OMIT 5 |
| 147 | 147 | ||