linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v6 0/2] bpf: enable some functions in cgroup programs
@ 2024-08-19 16:28 Matteo Croce
  2024-08-19 16:28 ` [PATCH bpf-next v6 1/2] bpf: enable generic kfuncs for BPF_CGROUP_* programs Matteo Croce
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Matteo Croce @ 2024-08-19 16:28 UTC (permalink / raw)
  To: Andrii Nakryiko, Alexei Starovoitov, Daniel Borkmann,
	Steven Rostedt, Masami Hiramatsu, bpf, linux-trace-kernel
  Cc: linux-kernel, Matteo Croce

From: Matteo Croce <teknoraver@meta.com>

Enable some BPF kfuncs and the helper bpf_current_task_under_cgroup()
for program types BPF_CGROUP_*.
These will be used by systemd-networkd:
https://github.com/systemd/systemd/pull/32212

v5->v6:
Called register_btf_kfunc_id_set() only once
Fixed build error with !CONFIG_CGROUPS

v4->v5:
Same code, but v4 had an old cover letter

v3->v4:
Reset all the acked-by tags because the code changed a bit.

Signed-off-by: Matteo Croce <teknoraver@meta.com>

Matteo Croce (2):
  bpf: enable generic kfuncs for BPF_CGROUP_* programs
  bpf: allow bpf_current_task_under_cgroup() with BPF_CGROUP_*

 include/linux/bpf.h      |  1 +
 kernel/bpf/btf.c         |  8 ++++++--
 kernel/bpf/cgroup.c      |  2 ++
 kernel/bpf/helpers.c     | 24 ++++++++++++++++++++++++
 kernel/trace/bpf_trace.c | 27 ++-------------------------
 5 files changed, 35 insertions(+), 27 deletions(-)

-- 
2.46.0


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

end of thread, other threads:[~2024-08-19 22:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-19 16:28 [PATCH bpf-next v6 0/2] bpf: enable some functions in cgroup programs Matteo Croce
2024-08-19 16:28 ` [PATCH bpf-next v6 1/2] bpf: enable generic kfuncs for BPF_CGROUP_* programs Matteo Croce
2024-08-19 16:28 ` [PATCH bpf-next v6 2/2] bpf: allow bpf_current_task_under_cgroup() with BPF_CGROUP_* Matteo Croce
2024-08-19 22:50 ` [PATCH bpf-next v6 0/2] bpf: enable some functions in cgroup programs patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).