aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bpf.h
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2020-07-01 18:10:18 -0700
committerAlexei Starovoitov <ast@kernel.org>2020-07-25 20:16:32 -0700
commita228a64fc1e4428e2b96dc68e9ad3c447095c9e7 (patch)
tree60f1dbabaaabc43cd02535c1ff0bbe6aeba481a5 /include/linux/bpf.h
parentbpf: Fix pos computation for bpf_iter seq_ops->start() (diff)
downloadlinux-dev-a228a64fc1e4428e2b96dc68e9ad3c447095c9e7.tar.xz
linux-dev-a228a64fc1e4428e2b96dc68e9ad3c447095c9e7.zip
bpf: Add bpf_prog iterator
It's mostly a copy paste of commit 6086d29def80 ("bpf: Add bpf_map iterator") that is use to implement bpf_seq_file opreations to traverse all bpf programs. v1->v2: Tweak to use build time btf_id Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r--include/linux/bpf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index bae557ff2da8..72221aea1c60 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -1117,6 +1117,7 @@ int generic_map_delete_batch(struct bpf_map *map,
const union bpf_attr *attr,
union bpf_attr __user *uattr);
struct bpf_map *bpf_map_get_curr_or_next(u32 *id);
+struct bpf_prog *bpf_prog_get_curr_or_next(u32 *id);
extern int sysctl_unprivileged_bpf_disabled;