diff options
author | Christian Brauner <brauner@kernel.org> | 2025-06-23 13:01:26 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-06-23 13:03:12 +0200 |
commit | 13b0cce9e294f8ddf228b9db3e01d76ac29872f2 (patch) | |
tree | a060d85acc208787e367437ae821c95943f2e898 /kernel/bpf/helpers.c | |
parent | 19272b37aa4f83ca52bdf9c16d5d81bdd1354494 (diff) | |
parent | f4fba2d6d2822efd2733949c0831435dcd96cbd3 (diff) |
Merge patch series "Introduce bpf_cgroup_read_xattr"
Song Liu <song@kernel.org> says:
Introduce a new kfunc bpf_cgroup_read_xattr, which can read xattr from
cgroupfs nodes. The primary users are LSMs, cgroup programs, and sched_ext.
* patches from https://lore.kernel.org/20250623063854.1896364-1-song@kernel.org:
selftests/bpf: Add tests for bpf_cgroup_read_xattr
bpf: Mark cgroup_subsys_state->cgroup RCU safe
bpf: Introduce bpf_cgroup_read_xattr to read xattr of cgroup's node
kernfs: remove iattr_mutex
Link: https://lore.kernel.org/20250623063854.1896364-1-song@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'kernel/bpf/helpers.c')
-rw-r--r-- | kernel/bpf/helpers.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index b71e428ad936..9ff1b4090289 100644 --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c @@ -3397,6 +3397,9 @@ BTF_ID_FLAGS(func, bpf_iter_dmabuf_next, KF_ITER_NEXT | KF_RET_NULL | KF_SLEEPAB BTF_ID_FLAGS(func, bpf_iter_dmabuf_destroy, KF_ITER_DESTROY | KF_SLEEPABLE) #endif BTF_ID_FLAGS(func, __bpf_trap) +#ifdef CONFIG_CGROUPS +BTF_ID_FLAGS(func, bpf_cgroup_read_xattr, KF_RCU) +#endif BTF_KFUNCS_END(common_btf_ids) static const struct btf_kfunc_id_set common_kfunc_set = { |