KFunc bpf_task_under_cgroup
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:
BPF_PROG_TYPE_LSM
BPF_PROG_TYPE_SCHED_CLS
BPF_PROG_TYPE_STRUCT_OPS
BPF_PROG_TYPE_TRACING
BPF_PROG_TYPE_XDP
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome