bpf: Parameterize task iterators.
authorKui-Feng Lee <kuifeng@fb.com>
Mon, 26 Sep 2022 18:49:53 +0000 (11:49 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 28 Sep 2022 23:29:47 +0000 (16:29 -0700)
commitf0d74c4da1f060d2a66976193712a5e6abd361f5
tree968e615de60ff19f172e71fc17d96131d48548cc
parent87dbdc230d162bf9ee1ac77c8ade178b6b1e199e
bpf: Parameterize task iterators.

Allow creating an iterator that loops through resources of one
thread/process.

People could only create iterators to loop through all resources of
files, vma, and tasks in the system, even though they were interested
in only the resources of a specific task or process.  Passing the
additional parameters, people can now create an iterator to go
through all resources or only the resources of a task.

Signed-off-by: Kui-Feng Lee <kuifeng@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/bpf/20220926184957.208194-2-kuifeng@fb.com
include/linux/bpf.h
include/uapi/linux/bpf.h
kernel/bpf/task_iter.c
tools/include/uapi/linux/bpf.h