History

bpf: include sub program tags in bpf_prog_info

Changes v2 -> v3: 1. remove check for bpf_dump_raw_ok(). Changes v1 -> v2: 1. Fix error path as Martin suggested. This patch adds nr_prog_tags and prog_tags to bpf_prog_info. This is a reliable way for user space to get tags of all sub programs. Before this patch, user space need to find sub program tags via kallsyms. This feature will be used in BPF introspection, where user space queries information about BPF programs via sys_bpf.

Song Liu committed 7 years ago

Commit c872bdb1 parent 0ad379f2 files · +24 −0Browse files

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

Unified · Split

include/uapi/linux/bpf.h+2−0
@@ -2717,6 +2717,8 @@ struct bpf_prog_info { · 2716 unmodified lines
2717 __u32 nr_jited_line_info;2717 __u32 nr_jited_line_info;
2718 __u32 line_info_rec_size;2718 __u32 line_info_rec_size;
2719 __u32 jited_line_info_rec_size;2719 __u32 jited_line_info_rec_size;
2720 __u32 nr_prog_tags;
2721 __aligned_u64 prog_tags;
2720} __attribute__((aligned(8)));2722} __attribute__((aligned(8)));
2721 2723
2722struct bpf_map_info {2724struct bpf_map_info {