summaryrefslogtreecommitdiff
path: root/tools/bpf
diff options
context:
space:
mode:
authorMilan Landaverde <milan@mdaverde.com>2022-03-31 11:45:53 -0400
committerAndrii Nakryiko <andrii@kernel.org>2022-04-04 14:52:54 -0700
commit380341637ebb41f56031a0fd0779e85413a1da59 (patch)
tree68b979b3342ab7158366a2638910ecb8e5eace73 /tools/bpf
parent4eeebce6ac4ad80ee8243bb847c98e0e55848d47 (diff)
bpftool: Add syscall prog type
In addition to displaying the program type in bpftool prog show this enables us to be able to query bpf_prog_type_syscall availability through feature probe as well as see which helpers are available in those programs (such as bpf_sys_bpf and bpf_sys_close) Signed-off-by: Milan Landaverde <milan@mdaverde.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Reviewed-by: Quentin Monnet <quentin@isovalent.com> Link: https://lore.kernel.org/bpf/20220331154555.422506-2-milan@mdaverde.com
Diffstat (limited to 'tools/bpf')
-rw-r--r--tools/bpf/bpftool/prog.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index bc4e05542c2b..8643b37d4e43 100644
--- a/tools/bpf/bpftool/prog.c
+++ b/tools/bpf/bpftool/prog.c
@@ -68,6 +68,7 @@ const char * const prog_type_name[] = {
[BPF_PROG_TYPE_EXT] = "ext",
[BPF_PROG_TYPE_LSM] = "lsm",
[BPF_PROG_TYPE_SK_LOOKUP] = "sk_lookup",
+ [BPF_PROG_TYPE_SYSCALL] = "syscall",
};
const size_t prog_type_name_size = ARRAY_SIZE(prog_type_name);