summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
authorJiri Olsa2018-04-25 19:41:06 +0200
committerDaniel Borkmann2018-04-26 22:36:11 +0200
commitb85fab0e67b162014cd328cb4e2a8e8ae382cb8a (patch)
tree2a743c24543f955aab3c03370e779646c74fd95f /include/uapi/linux/bpf.h
parentMerge branch 'bpf-optimize-neg-sums' (diff)
downloadkernel-qcow2-linux-b85fab0e67b162014cd328cb4e2a8e8ae382cb8a.tar.gz
kernel-qcow2-linux-b85fab0e67b162014cd328cb4e2a8e8ae382cb8a.tar.xz
kernel-qcow2-linux-b85fab0e67b162014cd328cb4e2a8e8ae382cb8a.zip
bpf: Add gpl_compatible flag to struct bpf_prog_info
Adding gpl_compatible flag to struct bpf_prog_info so it can be dumped via bpf_prog_get_info_by_fd and displayed via bpftool progs dump. Alexei noticed 4-byte hole in struct bpf_prog_info, so we put the u32 flags field in there, and we can keep adding bit fields in there without breaking user space. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/uapi/linux/bpf.h')
-rw-r--r--include/uapi/linux/bpf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index e6679393b687..da8801860c7d 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -1060,6 +1060,7 @@ struct bpf_prog_info {
__aligned_u64 map_ids;
char name[BPF_OBJ_NAME_LEN];
__u32 ifindex;
+ __u32 gpl_compatible:1;
__u64 netns_dev;
__u64 netns_ino;
} __attribute__((aligned(8)));