Re: [PATCH bpf-next 0/4] Support storing struct cgroup * objects as kptrs

From: Tejun Heo
Date: Tue Nov 22 2022 - 17:44:21 EST


On Mon, Nov 21, 2022 at 11:54:54PM -0600, David Vernet wrote:
> In [0], we added support for storing struct task_struct * objects as
> kptrs. This patch set extends this effort to also include storing struct
> cgroup * object as kptrs.
>
> As with tasks, there are many possible use cases for storing cgroups in
> maps. During tracing, for example, it could be useful to query cgroup
> statistics such as PSI averages, or tracking which tasks are migrating
> to and from the cgroup.
>
> [0]: https://lore.kernel.org/all/20221120051004.3605026-1-void@xxxxxxxxxxxxx/
>
> David Vernet (4):
> bpf: Enable cgroups to be used as kptrs
> selftests/bpf: Add cgroup kfunc / kptr selftests
> bpf: Add bpf_cgroup_ancestor() kfunc
> selftests/bpf: Add selftests for bpf_cgroup_ancestor() kfunc

>From cgroup POV:

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

Thanks.

--
tejun