diff options
author | David Vernet <void@manifault.com> | 2022-11-22 08:54:55 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-11-23 01:45:41 +0300 |
commit | fda01efc61605af7c6fa03c4109f14d59c9228b7 (patch) | |
tree | 0585ef30327f74e1803a0bbaccbaa2022736c31b /kernel/profile.c | |
parent | dc79f035b2062e4ff4f6432eda18f461f82b1333 (diff) | |
download | linux-fda01efc61605af7c6fa03c4109f14d59c9228b7.tar.xz |
bpf: Enable cgroups to be used as kptrs
Now that tasks can be used as kfuncs, and the PTR_TRUSTED flag is
available for us to easily add basic acquire / get / release kfuncs, we
can do the same for cgroups. This patch set adds the following kfuncs
which enable using cgroups as kptrs:
struct cgroup *bpf_cgroup_acquire(struct cgroup *cgrp);
struct cgroup *bpf_cgroup_kptr_get(struct cgroup **cgrpp);
void bpf_cgroup_release(struct cgroup *cgrp);
A follow-on patch will add a selftest suite which validates these
kfuncs.
Signed-off-by: David Vernet <void@manifault.com>
Link: https://lore.kernel.org/r/20221122055458.173143-2-void@manifault.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/profile.c')
0 files changed, 0 insertions, 0 deletions