OSDN Git Service

bpf: add new BPF_BTF_GET_NEXT_ID syscall command
authorQuentin Monnet <quentin.monnet@netronome.com>
Tue, 20 Aug 2019 09:31:50 +0000 (10:31 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 20 Aug 2019 16:51:06 +0000 (09:51 -0700)
commit1b9ed84ecf268904d89edf2908426a8eb3b5a4ba
tree66b002286c9a5a1ff26dcb800c4230f7c5213f63
parent098454362a06029c1abc175b74409bf7d6e6604b
bpf: add new BPF_BTF_GET_NEXT_ID syscall command

Add a new command for the bpf() system call: BPF_BTF_GET_NEXT_ID is used
to cycle through all BTF objects loaded on the system.

The motivation is to be able to inspect (list) all BTF objects presents
on the system.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf.h
include/uapi/linux/bpf.h
kernel/bpf/btf.c
kernel/bpf/syscall.c