diff options
Diffstat (limited to 'tools/include/uapi/linux/bpf.h')
-rw-r--r-- | tools/include/uapi/linux/bpf.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index e553529929f6..94dfa9def355 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h | |||
@@ -132,6 +132,13 @@ enum bpf_attach_type { | |||
132 | */ | 132 | */ |
133 | #define BPF_F_ALLOW_OVERRIDE (1U << 0) | 133 | #define BPF_F_ALLOW_OVERRIDE (1U << 0) |
134 | 134 | ||
135 | /* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the | ||
136 | * verifier will perform strict alignment checking as if the kernel | ||
137 | * has been built with CONFIG_EFFICIENT_UNALIGNED_ACCESS not set, | ||
138 | * and NET_IP_ALIGN defined to 2. | ||
139 | */ | ||
140 | #define BPF_F_STRICT_ALIGNMENT (1U << 0) | ||
141 | |||
135 | #define BPF_PSEUDO_MAP_FD 1 | 142 | #define BPF_PSEUDO_MAP_FD 1 |
136 | 143 | ||
137 | /* flags for BPF_MAP_UPDATE_ELEM command */ | 144 | /* flags for BPF_MAP_UPDATE_ELEM command */ |
@@ -177,6 +184,7 @@ union bpf_attr { | |||
177 | __u32 log_size; /* size of user buffer */ | 184 | __u32 log_size; /* size of user buffer */ |
178 | __aligned_u64 log_buf; /* user supplied buffer */ | 185 | __aligned_u64 log_buf; /* user supplied buffer */ |
179 | __u32 kern_version; /* checked when prog_type=kprobe */ | 186 | __u32 kern_version; /* checked when prog_type=kprobe */ |
187 | __u32 prog_flags; | ||
180 | }; | 188 | }; |
181 | 189 | ||
182 | struct { /* anonymous struct used by BPF_OBJ_* commands */ | 190 | struct { /* anonymous struct used by BPF_OBJ_* commands */ |
@@ -481,8 +489,7 @@ union bpf_attr { | |||
481 | * u32 bpf_get_socket_uid(skb) | 489 | * u32 bpf_get_socket_uid(skb) |
482 | * Get the owner uid of the socket stored inside sk_buff. | 490 | * Get the owner uid of the socket stored inside sk_buff. |
483 | * @skb: pointer to skb | 491 | * @skb: pointer to skb |
484 | * Return: uid of the socket owner on success or 0 if the socket pointer | 492 | * Return: uid of the socket owner on success or overflowuid if failed. |
485 | * inside sk_buff is NULL | ||
486 | */ | 493 | */ |
487 | #define __BPF_FUNC_MAPPER(FN) \ | 494 | #define __BPF_FUNC_MAPPER(FN) \ |
488 | FN(unspec), \ | 495 | FN(unspec), \ |