aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/prog.c
diff options
context:
space:
mode:
authorMilan Landaverde <[email protected]>2022-03-31 15:45:53 +0000
committerAndrii Nakryiko <[email protected]>2022-04-04 21:52:54 +0000
commit380341637ebb41f56031a0fd0779e85413a1da59 (patch)
tree68b979b3342ab7158366a2638910ecb8e5eace73 /tools/bpf/bpftool/prog.c
parentselftests/bpf: Fix parsing of prog types in UAPI hdr for bpftool sync (diff)
downloadkernel-380341637ebb41f56031a0fd0779e85413a1da59.tar.gz
kernel-380341637ebb41f56031a0fd0779e85413a1da59.zip
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 <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Reviewed-by: Quentin Monnet <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
-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);