diff options
author | Quentin Monnet <quentin.monnet@netronome.com> | 2019-08-20 10:31:50 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-08-20 09:51:06 -0700 |
commit | 1b9ed84ecf268904d89edf2908426a8eb3b5a4ba (patch) | |
tree | 66b002286c9a5a1ff26dcb800c4230f7c5213f63 /include/linux/bpf.h | |
parent | 098454362a06029c1abc175b74409bf7d6e6604b (diff) | |
download | lwn-1b9ed84ecf268904d89edf2908426a8eb3b5a4ba.tar.gz lwn-1b9ed84ecf268904d89edf2908426a8eb3b5a4ba.zip |
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>
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r-- | include/linux/bpf.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 15ae49862b82..5b9d22338606 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -24,6 +24,9 @@ struct seq_file; struct btf; struct btf_type; +extern struct idr btf_idr; +extern spinlock_t btf_idr_lock; + /* map is generic key/value storage optionally accesible by eBPF programs */ struct bpf_map_ops { /* funcs callable from userspace (via syscall) */ |