/security/landlock/ |
D | ptrace.c | 32 static bool domain_scope_le(const struct landlock_ruleset *const parent, in domain_scope_le() argument 37 if (!parent) in domain_scope_le() 41 for (walker = child->hierarchy; walker; walker = walker->parent) { in domain_scope_le() 42 if (walker == parent->hierarchy) in domain_scope_le() 50 static bool task_is_scoped(const struct task_struct *const parent, in task_is_scoped() argument 57 dom_parent = landlock_get_task_domain(parent); in task_is_scoped() 64 static int task_ptrace(const struct task_struct *const parent, in task_ptrace() argument 68 if (!landlocked(parent)) in task_ptrace() 70 if (task_is_scoped(parent, child)) in task_ptrace() 106 static int hook_ptrace_traceme(struct task_struct *const parent) in hook_ptrace_traceme() argument [all …]
|
D | ruleset.c | 256 hierarchy = hierarchy->parent; in put_hierarchy() 314 static int inherit_ruleset(struct landlock_ruleset *const parent, in inherit_ruleset() argument 321 if (!parent) in inherit_ruleset() 326 mutex_lock_nested(&parent->lock, SINGLE_DEPTH_NESTING); in inherit_ruleset() 330 &parent->root, node) { in inherit_ruleset() 338 if (WARN_ON_ONCE(child->num_layers <= parent->num_layers)) { in inherit_ruleset() 343 memcpy(child->fs_access_masks, parent->fs_access_masks, in inherit_ruleset() 344 flex_array_size(parent, fs_access_masks, parent->num_layers)); in inherit_ruleset() 346 if (WARN_ON_ONCE(!parent->hierarchy)) { in inherit_ruleset() 350 get_hierarchy(parent->hierarchy); in inherit_ruleset() [all …]
|
D | ruleset.h | 81 struct landlock_hierarchy *parent; member 167 landlock_merge_ruleset(struct landlock_ruleset *const parent,
|
/security/apparmor/ |
D | policy_ns.c | 45 for ( ; view; view = view->parent) { in aa_ns_visible() 46 if (view->parent == curr) in aa_ns_visible() 144 aa_put_ns(ns->parent); in aa_free_ns() 242 static struct aa_ns *__aa_create_ns(struct aa_ns *parent, const char *name, in __aa_create_ns() argument 248 AA_BUG(!parent); in __aa_create_ns() 250 AA_BUG(!mutex_is_locked(&parent->lock)); in __aa_create_ns() 252 ns = alloc_ns(parent->base.hname, name); in __aa_create_ns() 255 ns->level = parent->level + 1; in __aa_create_ns() 257 error = __aafs_ns_mkdir(ns, ns_subns_dir(parent), name, dir); in __aa_create_ns() 265 ns->parent = aa_get_ns(parent); in __aa_create_ns() [all …]
|
D | policy.c | 217 aa_put_profile(rcu_access_pointer(profile->parent)); in aa_free_profile() 334 struct aa_profile *aa_find_child(struct aa_profile *parent, const char *name) in aa_find_child() argument 340 profile = __find_child(&parent->base.profiles, name); in aa_find_child() 503 struct aa_profile *aa_new_null_profile(struct aa_profile *parent, bool hat, in aa_new_null_profile() argument 510 AA_BUG(!parent); in aa_new_null_profile() 513 name = kmalloc(strlen(parent->base.hname) + 8 + strlen(base), in aa_new_null_profile() 516 sprintf(name, "%s//null-%s", parent->base.hname, base); in aa_new_null_profile() 522 name = kmalloc(strlen(parent->base.hname) + 2 + 7 + 8, gfp); in aa_new_null_profile() 525 sprintf(name, "%s//null-%x", parent->base.hname, in aa_new_null_profile() 526 atomic_inc_return(&parent->ns->uniq_null)); in aa_new_null_profile() [all …]
|
D | apparmorfs.c | 262 struct dentry *parent, void *data, void *link, in aafs_create() argument 271 AA_BUG(!parent); in aafs_create() 280 dir = d_inode(parent); in aafs_create() 283 dentry = lookup_one_len(name, parent, strlen(name)); in aafs_create() 323 struct dentry *parent, void *data, in aafs_create_file() argument 326 return aafs_create(name, mode, parent, data, NULL, fops, NULL); in aafs_create_file() 337 static struct dentry *aafs_create_dir(const char *name, struct dentry *parent) in aafs_create_dir() argument 339 return aafs_create(name, S_IFDIR | 0755, parent, NULL, NULL, NULL, in aafs_create_dir() 1568 for (depth = 0; profile; profile = rcu_access_pointer(profile->parent)) in profile_depth() 1669 int __aafs_profile_mkdir(struct aa_profile *profile, struct dentry *parent) in __aafs_profile_mkdir() argument [all …]
|
D | label.c | 666 struct rb_node **new, *parent = NULL; in __label_insert() local 680 parent = *new; in __label_insert() 701 rb_link_node(&label->node, parent, new); in __label_insert() 1994 ns_unconfined(labels_ns(this)->parent)); in aa_labelset_destroy()
|
D | lsm.c | 132 static int apparmor_ptrace_traceme(struct task_struct *parent) in apparmor_ptrace_traceme() argument 138 tracer = aa_get_task_label(parent); in apparmor_ptrace_traceme() 1150 static void apparmor_sock_graft(struct sock *sk, struct socket *parent) in apparmor_sock_graft() argument
|
D | domain.c | 996 root = aa_get_profile_rcu(&profile->parent); in build_change_hat() 1058 root = aa_get_profile_rcu(&profile->parent); in change_hat()
|
/security/yama/ |
D | yama_lsm.c | 272 static int task_is_descendant(struct task_struct *parent, in task_is_descendant() argument 278 if (!parent || !child) in task_is_descendant() 282 if (!thread_group_leader(parent)) in task_is_descendant() 283 parent = rcu_dereference(parent->group_leader); in task_is_descendant() 287 if (walker == parent) { in task_is_descendant() 310 struct task_struct *parent = NULL; in ptracer_exception_found() local 319 parent = ptrace_parent(tracee); in ptracer_exception_found() 320 if (parent != NULL && same_thread_group(parent, tracer)) { in ptracer_exception_found() 332 parent = relation->tracer; in ptracer_exception_found() 338 if (found && (parent == NULL || task_is_descendant(parent, tracer))) in ptracer_exception_found() [all …]
|
/security/ |
D | inode.c | 108 struct dentry *parent, void *data, in securityfs_create_dentry() argument 125 if (!parent) in securityfs_create_dentry() 126 parent = mount->mnt_root; in securityfs_create_dentry() 128 dir = d_inode(parent); in securityfs_create_dentry() 131 dentry = lookup_one_len(name, parent, strlen(name)); in securityfs_create_dentry() 201 struct dentry *parent, void *data, in securityfs_create_file() argument 204 return securityfs_create_dentry(name, mode, parent, data, fops, NULL); in securityfs_create_file() 228 struct dentry *securityfs_create_dir(const char *name, struct dentry *parent) in securityfs_create_dir() argument 230 return securityfs_create_file(name, S_IFDIR | 0755, parent, NULL, NULL); in securityfs_create_dir() 261 struct dentry *parent, in securityfs_create_symlink() argument [all …]
|
D | device_cgroup.c | 190 struct dev_cgroup *parent_dev_cgroup = css_to_devcgroup(css->parent); in devcgroup_online() 464 struct dev_cgroup *parent = css_to_devcgroup(childcg->css.parent); in parent_has_perm() local 466 if (!parent) in parent_has_perm() 468 return verify_new_ex(parent, ex, childcg->behavior); in parent_has_perm() 485 struct dev_cgroup *parent = css_to_devcgroup(childcg->css.parent); in parent_allows_removal() local 487 if (!parent) in parent_allows_removal() 498 return !match_exception_partial(&parent->exceptions, ex->type, in parent_allows_removal() 508 static inline int may_allow_all(struct dev_cgroup *parent) in may_allow_all() argument 510 if (!parent) in may_allow_all() 512 return parent->behavior == DEVCG_DEFAULT_ALLOW; in may_allow_all() [all …]
|
D | commoncap.c | 91 if ((ns->parent == cred->user_ns) && uid_eq(ns->owner, cred->euid)) in cap_capable() 98 ns = ns->parent; in cap_capable() 171 int cap_ptrace_traceme(struct task_struct *parent) in cap_ptrace_traceme() argument 177 cred = __task_cred(parent); in cap_ptrace_traceme() 182 if (has_ns_capability(parent, child_cred->user_ns, CAP_SYS_PTRACE)) in cap_ptrace_traceme() 338 for (ns = current_user_ns(); ; ns = ns->parent) { in rootid_owns_currentns()
|
D | security.c | 780 int security_ptrace_traceme(struct task_struct *parent) in security_ptrace_traceme() argument 782 return call_int_hook(ptrace_traceme, 0, parent); in security_ptrace_traceme() 2335 void security_sock_graft(struct sock *sk, struct socket *parent) in security_sock_graft() argument 2337 call_void_hook(sock_graft, sk, parent); in security_sock_graft()
|
/security/tomoyo/ |
D | tomoyo.c | 145 static int tomoyo_path_unlink(const struct path *parent, struct dentry *dentry) in tomoyo_path_unlink() argument 147 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_unlink() 161 static int tomoyo_path_mkdir(const struct path *parent, struct dentry *dentry, in tomoyo_path_mkdir() argument 164 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mkdir() 178 static int tomoyo_path_rmdir(const struct path *parent, struct dentry *dentry) in tomoyo_path_rmdir() argument 180 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_rmdir() 194 static int tomoyo_path_symlink(const struct path *parent, struct dentry *dentry, in tomoyo_path_symlink() argument 197 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_symlink() 212 static int tomoyo_path_mknod(const struct path *parent, struct dentry *dentry, in tomoyo_path_mknod() argument 215 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mknod()
|
D | securityfs_if.c | 225 struct dentry *parent, const u8 key) in tomoyo_create_entry() argument 227 securityfs_create_file(name, mode, parent, (void *) (uintptr_t) key, in tomoyo_create_entry()
|
/security/apparmor/include/ |
D | policy_ns.h | 60 struct aa_ns *parent; member 84 const char *aa_ns_name(struct aa_ns *parent, struct aa_ns *child, bool subns); 94 struct aa_ns *__aa_find_or_create_ns(struct aa_ns *parent, const char *name, 101 return rcu_dereference_protected(p->parent, in aa_deref_parent()
|
D | policy.h | 131 struct aa_profile __rcu *parent; member 180 struct aa_profile *aa_new_null_profile(struct aa_profile *parent, bool hat, 184 struct aa_profile *aa_find_child(struct aa_profile *parent, const char *name);
|
D | apparmorfs.h | 111 int __aafs_profile_mkdir(struct aa_profile *profile, struct dentry *parent); 113 int __aafs_ns_mkdir(struct aa_ns *ns, struct dentry *parent, const char *name,
|
/security/integrity/ |
D | iint.c | 127 struct rb_node *node, *parent = NULL; in integrity_inode_get() local 152 parent = *p; in integrity_inode_get() 153 test_iint = rb_entry(parent, struct integrity_iint_cache, in integrity_inode_get() 169 rb_link_node(node, parent, p); in integrity_inode_get()
|
/security/keys/ |
D | key.c | 54 struct rb_node *parent, **p; in key_user_lookup() local 57 parent = NULL; in key_user_lookup() 63 parent = *p; in key_user_lookup() 64 user = rb_entry(parent, struct key_user, node); in key_user_lookup() 102 rb_link_node(&candidate->node, parent, p); in key_user_lookup() 136 struct rb_node *parent, **p; in key_alloc_serial() local 150 parent = NULL; in key_alloc_serial() 154 parent = *p; in key_alloc_serial() 155 xkey = rb_entry(parent, struct key, serial_node); in key_alloc_serial() 166 rb_link_node(&key->serial_node, parent, p); in key_alloc_serial() [all …]
|
D | keyctl.c | 1628 struct task_struct *me, *parent; in keyctl_session_to_parent() local 1659 parent = rcu_dereference_protected(me->real_parent, in keyctl_session_to_parent() 1663 if (parent->pid <= 1 || !parent->mm) in keyctl_session_to_parent() 1667 if (!thread_group_empty(parent)) in keyctl_session_to_parent() 1673 pcred = __task_cred(parent); in keyctl_session_to_parent() 1697 oldwork = task_work_cancel(parent, key_change_session_keyring); in keyctl_session_to_parent() 1701 ret = task_work_add(parent, newwork, TWA_RESUME); in keyctl_session_to_parent()
|
/security/keys/trusted-keys/ |
D | trusted_tpm2.c | 89 u32 parent; member 119 options->keyhandle = ctx.parent; in tpm2_key_decode() 137 ctx->parent = 0; in tpm2_key_parent() 139 ctx->parent <<= 8; in tpm2_key_parent() 140 ctx->parent |= v[i]; in tpm2_key_parent()
|
D | tpm2key.asn1 | 8 parent INTEGER ({tpm2_key_parent}),
|
/security/selinux/ss/ |
D | sidtab.c | 25 struct sidtab_entry *parent; member 582 rcu_assign_pointer(victim->parent->cache, NULL); in sidtab_sid2str_put() 586 cache->parent = entry; in sidtab_sid2str_put()
|