diff options
author | Song Liu <songliubraving@fb.com> | 2018-12-12 18:37:46 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-12-13 12:22:28 +0100 |
commit | c872bdb38febb4c31ece3599c52cf1f833b89f4e (patch) | |
tree | c1c80b2023415abfa68f19e8ac66d6f36f3a35bb /include/uapi | |
parent | Merge branch 'bpf-fix-kptr-checks' (diff) | |
download | linux-c872bdb38febb4c31ece3599c52cf1f833b89f4e.tar.xz linux-c872bdb38febb4c31ece3599c52cf1f833b89f4e.zip |
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.
Signed-off-by: Song Liu <songliubraving@fb.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/bpf.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index aa582cd5bfcf..e7d57e89f25f 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -2717,6 +2717,8 @@ struct bpf_prog_info { __u32 nr_jited_line_info; __u32 line_info_rec_size; __u32 jited_line_info_rec_size; + __u32 nr_prog_tags; + __aligned_u64 prog_tags; } __attribute__((aligned(8))); struct bpf_map_info { |