History

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.

Jiri Olsa committed 8 years ago

Commit b85fab01 parent af487c52 files · +2 −0Browse files

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

Unified · Split

include/uapi/linux/bpf.h+1−0
@@ -1060,6 +1060,7 @@ struct bpf_prog_info { · 1059 unmodified lines
1060 __aligned_u64 map_ids;1060 __aligned_u64 map_ids;
1061 char name[BPF_OBJ_NAME_LEN];1061 char name[BPF_OBJ_NAME_LEN];
1062 __u32 ifindex;1062 __u32 ifindex;
1063 __u32 gpl_compatible:1;
1063 __u64 netns_dev;1064 __u64 netns_dev;
1064 __u64 netns_ino;1065 __u64 netns_ino;
1065} __attribute__((aligned(8)));1066} __attribute__((aligned(8)));