[PATCH bpf-next 0/2] Document some recent core kfunc additions

From: David Vernet
Date: Fri Dec 02 2022 - 17:07:49 EST


A series of recent patch sets introduced kfuncs that allowed struct
task_struct and struct cgroup objects to be used as kptrs. These were
introduced in [0], [1], and [2].

[0]: https://lore.kernel.org/lkml/20221120051004.3605026-1-void@xxxxxxxxxxxxx/
[1]: https://lore.kernel.org/lkml/20221122145300.251210-2-void@xxxxxxxxxxxxx/T/
[2]: https://lore.kernel.org/lkml/20221122055458.173143-1-void@xxxxxxxxxxxxx/

These are "core" kfuncs, in that they may be used by a wide variety of
possible BPF tracepoint or struct_ops programs, and are defined in
kernel/bpf/helpers.c. Even though as kfuncs they have no ABI stability
guarantees, they should still be properly documented. This patch set
adds that documentation.

Some other kfuncs were added recently as well, such as
bpf_rcu_read_lock() and bpf_rcu_read_unlock(). Those could and should be
added to this "Core kfuncs" section as well in other patch sets.

David Vernet (2):
bpf/docs: Document struct task_struct * kfuncs
bpf/docs: Document struct cgroup * kfuncs

Documentation/bpf/kfuncs.rst | 198 +++++++++++++++++++++++++++++++++++
kernel/bpf/helpers.c | 10 +-
2 files changed, 203 insertions(+), 5 deletions(-)

--
2.38.1