public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] Document some recent core kfunc additions
@ 2022-12-02 22:07 David Vernet
  2022-12-02 22:07 ` [PATCH bpf-next 1/2] bpf/docs: Document struct task_struct * kfuncs David Vernet
  2022-12-02 22:07 ` [PATCH bpf-next 2/2] bpf/docs: Document struct cgroup " David Vernet
  0 siblings, 2 replies; 6+ messages in thread
From: David Vernet @ 2022-12-02 22:07 UTC (permalink / raw)
  To: bpf
  Cc: ast, daniel, andrii, martin.lau, song, yhs, john.fastabend,
	kpsingh, sdf, haoluo, jolsa, linux-kernel, kernel-team

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@manifault.com/
[1]: https://lore.kernel.org/lkml/20221122145300.251210-2-void@manifault.com/T/
[2]: https://lore.kernel.org/lkml/20221122055458.173143-1-void@manifault.com/

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-12-05 20:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-02 22:07 [PATCH bpf-next 0/2] Document some recent core kfunc additions David Vernet
2022-12-02 22:07 ` [PATCH bpf-next 1/2] bpf/docs: Document struct task_struct * kfuncs David Vernet
2022-12-03  2:15   ` Alexei Starovoitov
2022-12-05 16:10     ` David Vernet
2022-12-05 20:58       ` David Vernet
2022-12-02 22:07 ` [PATCH bpf-next 2/2] bpf/docs: Document struct cgroup " David Vernet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox