RFC bpf: freeze a task cgroup from bpf
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 19 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | cgroup: add cgroup_freeze_no_kn() to freeze a cgroup from bpfinclude/ kernel/ | +71 | 0 replies | |
| 2/3 | bpf: add bpf_task_freeze_cgroup() to freeze the cgroup of a taskkernel/ | +31 | 0 replies | |
| 3/3 | selftests/bpf: add selftest for bpf_task_freeze_cgrouptools/ tools/ | +275 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH bpf-next 0/3] bpf: freeze a task cgroup from bpf
This patch series adds support to freeze the task cgroup hierarchy that is on a default cgroup v2 without going through kernfs interface.
For some cases we want to freeze the cgroup of a task based on some signals, doing so from bpf is better than user space which could be too late.
Planned users of this feature are: tetragon and systemd when freezing a cgroup hierarchy that could be a K8s pod, container, system service or a user session.
Patch 1: cgroup: add cgroup_freeze_no_kn() to freeze a cgroup from bpf Patch 2: bpf: add bpf_task_freeze_cgroup() to freeze the cgroup of a task Patch 3: selftests/bpf: add selftest for bpf_task_freeze_cgroup
include/linux/cgroup.h | 2 ++ kernel/bpf/helpers.c | 31 ++++ kernel/cgroup/cgroup.c | 67 ++++++++ tools/testing/selftests/bpf/prog_tests/task_freeze_cgroup.c | 165 +++++++++++++++++++++ tools/testing/selftests/bpf/progs/test_task_freeze_cgroup.c | 110 ++++++++++++++ 5 files changed, 375 insertions(+) create mode 100644 tools/testing/selftests/bpf/prog_tests/task_freeze_cgroup.c create mode 100644 tools/testing/selftests/bpf/progs/test_task_freeze_cgroup.c
Signature · 1 line
2.34.1