History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf

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

Alexei Starovoitov committed 2 years ago

Commit bfa7b5c2 parents c6fb803 ae90f6a1167 files · +15425 −10300Browse files

Showing the changes to tools/include/uapi (2 of 1167 files). Show all

Unified · Split

2 files
  1. tools/include/uapi/linux/bpf.h +13 −12
  2. tools/include/uapi/linux/in.h +1 −1
tools/include/uapi/linux/bpf.h+13−12
@@ -1121,6 +1121,9 @@ enum bpf_attach_type { · 1120 unmodified lines
11211121
11221122 #define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE
11231123
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+ */
11241127 enum bpf_link_type {
11251128 BPF_LINK_TYPE_UNSPEC = 0,
11261129 BPF_LINK_TYPE_RAW_TRACEPOINT = 1,
@@ -5517,11 +5520,12 @@ union bpf_attr { · 4390 unmodified lines
55175520 * **-EOPNOTSUPP** if the hash calculation failed or **-EINVAL** if
55185521 * invalid arguments are passed.
55195522 *
5520− * void *bpf_kptr_xchg(void *map_value, void *ptr)
5523+ * void *bpf_kptr_xchg(void *dst, void *ptr)
55215524 * Description
5522− * Exchange kptr at pointer *map_value* with *ptr*, and return the
5523− * old value. *ptr* can be NULL, otherwise it must be a referenced
5524− * pointer which will be released when this helper is called.
5525+ * Exchange kptr at pointer *dst* with *ptr*, and return the old value.
5526+ * *dst* can be map value or local kptr. *ptr* can be NULL, otherwise
5527+ * it must be a referenced pointer which will be released when this helper
5528+ * is called.
55255529 * Return
55265530 * The old value of kptr (which can be NULL). The returned pointer
55275531 * if not NULL, is a reference which must be released using its
@@ -6044,11 +6048,6 @@ enum { · 516 unmodified lines
60446048 BPF_F_MARK_ENFORCE = (1ULL << 6),
60456049 };
60466050
6047−/* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */
6048−enum {
6049− BPF_F_INGRESS = (1ULL << 0),
6050−};
6051−
60526051 /* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */
60536052 enum {
60546053 BPF_F_TUNINFO_IPV6 = (1ULL << 0),
@@ -6195,10 +6194,12 @@ enum { · 140 unmodified lines
61956194 BPF_F_BPRM_SECUREEXEC = (1ULL << 0),
61966195 };
61976196
6198−/* Flags for bpf_redirect_map helper */
6197+/* Flags for bpf_redirect and bpf_redirect_map helpers */
61996198 enum {
6200− BPF_F_BROADCAST = (1ULL << 3),
6201− BPF_F_EXCLUDE_INGRESS = (1ULL << 4),
6199+ BPF_F_INGRESS = (1ULL << 0), /* used for skb path */
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)
62026203 };
62036204
62046205 #define __bpf_md_ptr(type, name) \
tools/include/uapi/linux/in.h+1−1
@@ -141,7 +141,7 @@ struct in_addr { · 140 unmodified lines
141141 */
142142 #define IP_PMTUDISC_INTERFACE 4
143143 /* 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
145145 */
146146 #define IP_PMTUDISC_OMIT 5
147147