bpf/docs: Document struct task_struct * kfuncs
authorDavid Vernet <void@manifault.com>
Wed, 7 Dec 2022 20:49:10 +0000 (14:49 -0600)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 8 Dec 2022 01:09:13 +0000 (17:09 -0800)
commit25c5e92d197bd721e706444c5910fd386c330456
tree9ed83275e69de08ce336e308ef53f2d1e422406f
parent26c386ecf0212affb50f02dabcb0152995b99b07
bpf/docs: Document struct task_struct * kfuncs

bpf_task_acquire(), bpf_task_release(), and bpf_task_from_pid() are
kfuncs that were recently added to kernel/bpf/helpers.c. These are
"core" kfuncs in that they're available for use for any tracepoint or
struct_ops BPF program. Though they have no ABI stability guarantees, we
should still document them. This patch adds a new Core kfuncs section to
the BPF kfuncs doc, and adds entries for all of these task kfuncs.

Note that bpf_task_kptr_get() is not documented, as it still returns
NULL while we're working to resolve how it can use RCU to ensure struct
task_struct * lifetime.

Signed-off-by: David Vernet <void@manifault.com>
Link: https://lore.kernel.org/r/20221207204911.873646-2-void@manifault.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Documentation/bpf/kfuncs.rst
kernel/bpf/helpers.c