]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: include sub program tags in bpf_prog_info
authorSong Liu <songliubraving@fb.com>
Wed, 12 Dec 2018 17:37:46 +0000 (09:37 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 13 Dec 2018 11:22:28 +0000 (12:22 +0100)
commit71f2ea97ea579956dbf24226b19cee799513e983
treec1c80b2023415abfa68f19e8ac66d6f36f3a35bb
parent9bc15ebf0d816892db379d4a327e1b5801f12395
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>
include/uapi/linux/bpf.h
kernel/bpf/syscall.c