Skip to content

bpf: enable some functions in cgroup programs

Matteo Croce bpf linux-trace-kernel lkml 5 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest2 patches 0 repliesApplied 2/2
  2. v52 patches 2 repliesSuperseded
  3. v42 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v32 patches2 repliesSuperseded
v22 patches2 repliesSuperseded

Changes in v6 from the cover letter

Called register_btf_kfunc_id_set() only once
Fixed build error with !CONFIG_CGROUPS

Patches in v6 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpf: enable generic kfuncs for BPF_CGROUP_* programskernel/bpf/btf.c kernel/bpf/helpers.c+7 -20 repliesApplied
2/2bpf: allow bpf_current_task_under_cgroup() with BPF_CGROUP_*include/linux/bpf.h kernel/bpf/cgroup.c kernel/bpf/helpers.c +1 more+28 -250 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [PATCH bpf-next v6 0/2] bpf: enable some functions in cgroup programs

From: Matteo Croce <[email protected]>

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.

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(-)
Signature · 1 line
2.46.0