diff options
author | Alexei Starovoitov <ast@kernel.org> | 2025-06-26 18:59:07 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2025-06-26 19:01:04 -0700 |
commit | 48d998af99f9e78ac8a8e405c50a7af64a5325a6 (patch) | |
tree | bbd59da07f7b3ad54addb16b6c47c7c854c9c022 /kernel/bpf | |
parent | 6def0822d211df4bfb3276eac42f541dc9cc9fb8 (diff) | |
parent | 13b0cce9e294f8ddf228b9db3e01d76ac29872f2 (diff) |
Merge branch 'vfs-6.17.bpf' of https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Merge branch 'vfs-6.17.bpf' from vfs tree into bpf-next/master
and resolve conflicts.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf')
-rw-r--r-- | kernel/bpf/helpers.c | 3 | ||||
-rw-r--r-- | kernel/bpf/verifier.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index 2cdcf7b2c91e..6d051416c184 100644 --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c @@ -3779,6 +3779,9 @@ BTF_ID_FLAGS(func, bpf_strspn); BTF_ID_FLAGS(func, bpf_strcspn); BTF_ID_FLAGS(func, bpf_strstr); BTF_ID_FLAGS(func, bpf_strnstr); +#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 = { diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index dd670ba41667..90e688f81a48 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -7063,6 +7063,10 @@ BTF_TYPE_SAFE_RCU(struct css_set) { struct cgroup *dfl_cgrp; }; +BTF_TYPE_SAFE_RCU(struct cgroup_subsys_state) { + struct cgroup *cgroup; +}; + /* RCU trusted: these fields are trusted in RCU CS and can be NULL */ BTF_TYPE_SAFE_RCU_OR_NULL(struct mm_struct) { struct file __rcu *exe_file; @@ -7112,6 +7116,7 @@ static bool type_is_rcu(struct bpf_verifier_env *env, BTF_TYPE_EMIT(BTF_TYPE_SAFE_RCU(struct task_struct)); BTF_TYPE_EMIT(BTF_TYPE_SAFE_RCU(struct cgroup)); BTF_TYPE_EMIT(BTF_TYPE_SAFE_RCU(struct css_set)); + BTF_TYPE_EMIT(BTF_TYPE_SAFE_RCU(struct cgroup_subsys_state)); return btf_nested_type_is_trusted(&env->log, reg, field_name, btf_id, "__safe_rcu"); } |