Skip to content

KFunc bpf_task_under_cgroup

v6.5

Wrap task_under_cgroup_hierarchy() as a kfunc, test task's membership of cGroup ancestry.

Definition

Tests whether task's default cgroup hierarchy is a descendant of ancestor. It follows all the same rules as cgroup_is_descendant, and only applies to the default hierarchy.

long int bpf_task_under_cgroup(struct task_struct *task, struct cgroup *ancestor)

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Program types

The following program types can make use of this kfunc:

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome