diff options
author | David Vernet <void@manifault.com> | 2022-12-07 14:49:10 -0600 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-12-07 17:09:13 -0800 |
commit | 25c5e92d197bd721e706444c5910fd386c330456 (patch) | |
tree | 9ed83275e69de08ce336e308ef53f2d1e422406f /kernel/bpf | |
parent | 26c386ecf0212affb50f02dabcb0152995b99b07 (diff) | |
download | linux-stable-25c5e92d197bd721e706444c5910fd386c330456.tar.gz linux-stable-25c5e92d197bd721e706444c5910fd386c330456.tar.bz2 linux-stable-25c5e92d197bd721e706444c5910fd386c330456.zip |
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>
Diffstat (limited to 'kernel/bpf')
-rw-r--r-- | kernel/bpf/helpers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index 284b3ffdbe48..1e4bf466b08f 100644 --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c @@ -1904,7 +1904,7 @@ struct task_struct *bpf_task_kptr_get(struct task_struct **pp) } /** - * bpf_task_release - Release the reference acquired on a struct task_struct *. + * bpf_task_release - Release the reference acquired on a task. * @p: The task on which a reference is being released. */ void bpf_task_release(struct task_struct *p) |