/security/tomoyo/ |
D | common.c | 213 static bool tomoyo_flush(struct tomoyo_io_buffer *head) in tomoyo_flush() argument 215 while (head->r.w_pos) { in tomoyo_flush() 216 const char *w = head->r.w[0]; in tomoyo_flush() 220 if (len > head->read_user_buf_avail) in tomoyo_flush() 221 len = head->read_user_buf_avail; in tomoyo_flush() 224 if (copy_to_user(head->read_user_buf, w, len)) in tomoyo_flush() 226 head->read_user_buf_avail -= len; in tomoyo_flush() 227 head->read_user_buf += len; in tomoyo_flush() 230 head->r.w[0] = w; in tomoyo_flush() 234 if (head->poll) { in tomoyo_flush() [all …]
|
D | gc.c | 42 struct tomoyo_io_buffer *head; in tomoyo_struct_used_by_io_buffer() local 46 list_for_each_entry(head, &tomoyo_io_buffer_list, list) { in tomoyo_struct_used_by_io_buffer() 47 head->users++; in tomoyo_struct_used_by_io_buffer() 49 mutex_lock(&head->io_sem); in tomoyo_struct_used_by_io_buffer() 50 if (head->r.domain == element || head->r.group == element || in tomoyo_struct_used_by_io_buffer() 51 head->r.acl == element || &head->w.domain->list == element) in tomoyo_struct_used_by_io_buffer() 53 mutex_unlock(&head->io_sem); in tomoyo_struct_used_by_io_buffer() 55 head->users--; in tomoyo_struct_used_by_io_buffer() 73 struct tomoyo_io_buffer *head; in tomoyo_name_used_by_io_buffer() local 78 list_for_each_entry(head, &tomoyo_io_buffer_list, list) { in tomoyo_name_used_by_io_buffer() [all …]
|
D | group.c | 24 return container_of(a, struct tomoyo_path_group, head)->member_name == in tomoyo_same_path_group() 25 container_of(b, struct tomoyo_path_group, head)->member_name; in tomoyo_same_path_group() 39 return !memcmp(&container_of(a, struct tomoyo_number_group, head) in tomoyo_same_number_group() 41 &container_of(b, struct tomoyo_number_group, head) in tomoyo_same_number_group() 43 sizeof(container_of(a, struct tomoyo_number_group, head) in tomoyo_same_number_group() 59 head); in tomoyo_same_address_group() 61 head); in tomoyo_same_address_group() 90 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_group() 99 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_group() 111 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_group() [all …]
|
D | memory.c | 112 list_for_each_entry(group, list, head.list) { in tomoyo_get_group() 114 atomic_read(&group->head.users) == TOMOYO_GC_IN_PROGRESS) in tomoyo_get_group() 116 atomic_inc(&group->head.users); in tomoyo_get_group() 125 atomic_set(&entry->head.users, 1); in tomoyo_get_group() 126 list_add_tail_rcu(&entry->head.list, list); in tomoyo_get_group() 157 struct list_head *head; in tomoyo_get_name() local 163 head = &tomoyo_name_list[hash_long(hash, TOMOYO_HASH_BITS)]; in tomoyo_get_name() 166 list_for_each_entry(ptr, head, head.list) { in tomoyo_get_name() 168 atomic_read(&ptr->head.users) == TOMOYO_GC_IN_PROGRESS) in tomoyo_get_name() 170 atomic_inc(&ptr->head.users); in tomoyo_get_name() [all …]
|
D | common.h | 514 struct tomoyo_shared_acl_head head; member 542 struct tomoyo_shared_acl_head head; member 549 struct tomoyo_acl_head head; member 555 struct tomoyo_acl_head head; member 561 struct tomoyo_acl_head head; member 653 struct tomoyo_shared_acl_head head; member 699 struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_MANUAL_TASK_ACL */ member 710 struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_PATH_ACL */ member 720 struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_PATH_NUMBER_ACL */ member 729 struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_MKDEV_ACL */ member [all …]
|
D | file.c | 256 head); in tomoyo_check_path_acl() 279 container_of(ptr, typeof(*acl), head); in tomoyo_check_path_number_acl() 300 container_of(ptr, typeof(*acl), head); in tomoyo_check_path2_acl() 320 container_of(ptr, typeof(*acl), head); in tomoyo_check_mkdev_acl() 344 const struct tomoyo_path_acl *p1 = container_of(a, typeof(*p1), head); in tomoyo_same_path_acl() 345 const struct tomoyo_path_acl *p2 = container_of(b, typeof(*p2), head); in tomoyo_same_path_acl() 363 u16 * const a_perm = &container_of(a, struct tomoyo_path_acl, head) in tomoyo_merge_path_acl() 366 const u16 b_perm = container_of(b, struct tomoyo_path_acl, head)->perm; in tomoyo_merge_path_acl() 390 .head.type = TOMOYO_TYPE_PATH_ACL, in tomoyo_update_path_acl() 398 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_update_path_acl() [all …]
|
D | environ.c | 22 container_of(ptr, typeof(*acl), head); in tomoyo_check_env_acl() 79 const struct tomoyo_env_acl *p1 = container_of(a, typeof(*p1), head); in tomoyo_same_env_acl() 80 const struct tomoyo_env_acl *p2 = container_of(b, typeof(*p2), head); in tomoyo_same_env_acl() 96 struct tomoyo_env_acl e = { .head.type = TOMOYO_TYPE_ENV_ACL }; in tomoyo_write_env() 105 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_write_env()
|
D | network.c | 195 const struct tomoyo_inet_acl *p1 = container_of(a, typeof(*p1), head); in tomoyo_same_inet_acl() 196 const struct tomoyo_inet_acl *p2 = container_of(b, typeof(*p2), head); in tomoyo_same_inet_acl() 214 const struct tomoyo_unix_acl *p1 = container_of(a, typeof(*p1), head); in tomoyo_same_unix_acl() 215 const struct tomoyo_unix_acl *p2 = container_of(b, typeof(*p2), head); in tomoyo_same_unix_acl() 235 &container_of(a, struct tomoyo_inet_acl, head)->perm; in tomoyo_merge_inet_acl() 237 const u8 b_perm = container_of(b, struct tomoyo_inet_acl, head)->perm; in tomoyo_merge_inet_acl() 261 &container_of(a, struct tomoyo_unix_acl, head)->perm; in tomoyo_merge_unix_acl() 263 const u8 b_perm = container_of(b, struct tomoyo_unix_acl, head)->perm; in tomoyo_merge_unix_acl() 284 struct tomoyo_inet_acl e = { .head.type = TOMOYO_TYPE_INET_ACL }; in tomoyo_write_inet_network() 311 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_write_inet_network() [all …]
|
D | audit.c | 439 void tomoyo_read_log(struct tomoyo_io_buffer *head) in tomoyo_read_log() argument 443 if (head->r.w_pos) in tomoyo_read_log() 445 kfree(head->read_buf); in tomoyo_read_log() 446 head->read_buf = NULL; in tomoyo_read_log() 456 head->read_buf = ptr->log; in tomoyo_read_log() 457 head->r.w[head->r.w_pos++] = head->read_buf; in tomoyo_read_log()
|
D | domain.c | 117 container_of(new_entry, struct tomoyo_path_acl, head) in tomoyo_update_domain() 224 head); in tomoyo_same_transition_control() 227 head); in tomoyo_same_transition_control() 276 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_transition_control() 304 list_for_each_entry_rcu(ptr, list, head.list, in tomoyo_scan_transition() 306 if (ptr->head.is_deleted || ptr->type != type) in tomoyo_scan_transition() 386 head); in tomoyo_same_aggregator() 388 head); in tomoyo_same_aggregator() 419 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_aggregator() 742 list_for_each_entry_rcu(ptr, list, head.list, in tomoyo_find_next_domain() [all …]
|
D | util.c | 1064 perm = data_race(container_of(ptr, struct tomoyo_path_acl, head)->perm); in tomoyo_domain_quota_is_ok() 1067 perm = data_race(container_of(ptr, struct tomoyo_path2_acl, head)->perm); in tomoyo_domain_quota_is_ok() 1070 perm = data_race(container_of(ptr, struct tomoyo_path_number_acl, head) in tomoyo_domain_quota_is_ok() 1074 perm = data_race(container_of(ptr, struct tomoyo_mkdev_acl, head)->perm); in tomoyo_domain_quota_is_ok() 1077 perm = data_race(container_of(ptr, struct tomoyo_inet_acl, head)->perm); in tomoyo_domain_quota_is_ok() 1080 perm = data_race(container_of(ptr, struct tomoyo_unix_acl, head)->perm); in tomoyo_domain_quota_is_ok()
|
D | condition.c | 418 list_for_each_entry(ptr, &tomoyo_condition_list, head.list) { in tomoyo_commit_condition() 420 atomic_read(&ptr->head.users) == TOMOYO_GC_IN_PROGRESS) in tomoyo_commit_condition() 423 atomic_inc(&ptr->head.users); in tomoyo_commit_condition() 429 atomic_set(&entry->head.users, 1); in tomoyo_commit_condition() 430 list_add(&entry->head.list, &tomoyo_condition_list); in tomoyo_commit_condition() 439 tomoyo_del_condition(&entry->head.list); in tomoyo_commit_condition() 698 tomoyo_del_condition(&entry->head.list); in tomoyo_get_condition()
|
D | securityfs_if.c | 23 head); in tomoyo_check_task_acl()
|
D | mount.c | 51 container_of(ptr, typeof(*acl), head); in tomoyo_check_mount_acl()
|
/security/selinux/ss/ |
D | mls.c | 38 int i, l, len, head, prev; in mls_compute_context_len() local 52 head = -2; in mls_compute_context_len() 58 if (head != prev) { in mls_compute_context_len() 64 head = i; in mls_compute_context_len() 68 if (prev != head) { in mls_compute_context_len() 94 int i, l, head, prev; in mls_sid_to_context() local 112 head = -2; in mls_sid_to_context() 118 if (prev != head) { in mls_sid_to_context() 119 if (prev - head > 1) in mls_sid_to_context() 134 head = i; in mls_sid_to_context() [all …]
|
D | policydb.h | 211 struct ocontext *head; member
|
/security/apparmor/include/ |
D | policy_ns.h | 141 static inline struct aa_ns *__aa_findn_ns(struct list_head *head, in __aa_findn_ns() argument 144 return (struct aa_ns *)__policy_strn_find(head, name, n); in __aa_findn_ns() 147 static inline struct aa_ns *__aa_find_ns(struct list_head *head, in __aa_find_ns() argument 150 return __aa_findn_ns(head, name, strlen(name)); in __aa_find_ns()
|
D | lib.h | 166 static inline struct aa_policy *__policy_find(struct list_head *head, in __policy_find() argument 171 list_for_each_entry_rcu(policy, head, list) { in __policy_find() 191 static inline struct aa_policy *__policy_strn_find(struct list_head *head, in __policy_strn_find() argument 196 list_for_each_entry_rcu(policy, head, list) { in __policy_strn_find()
|
D | policy.h | 90 struct rhash_head head; member 196 void __aa_profile_list_release(struct list_head *head);
|
/security/selinux/ |
D | avc.c | 160 struct hlist_head *head; in avc_get_hash_stats() local 167 head = &avc->avc_cache.slots[i]; in avc_get_hash_stats() 168 if (!hlist_empty(head)) { in avc_get_hash_stats() 171 hlist_for_each_entry_rcu(node, head, list) in avc_get_hash_stats() 475 struct hlist_head *head; in avc_reclaim_node() local 481 head = &avc->avc_cache.slots[hvalue]; in avc_reclaim_node() 488 hlist_for_each_entry(node, head, list) { in avc_reclaim_node() 537 struct hlist_head *head; in avc_search_node() local 540 head = &avc->avc_cache.slots[hvalue]; in avc_search_node() 541 hlist_for_each_entry_rcu(node, head, list) { in avc_search_node() [all …]
|
/security/smack/ |
D | smack_access.c | 404 struct hlist_head *head; in smk_insert_entry() local 407 head = &smack_known_hash[hash & (SMACK_HASH_SLOTS - 1)]; in smk_insert_entry() 409 hlist_add_head_rcu(&skp->smk_hashed, head); in smk_insert_entry() 423 struct hlist_head *head; in smk_find_entry() local 427 head = &smack_known_hash[hash & (SMACK_HASH_SLOTS - 1)]; in smk_find_entry() 429 hlist_for_each_entry_rcu(skp, head, smk_hashed) in smk_find_entry()
|
/security/apparmor/ |
D | policy_ns.c | 324 static void __ns_list_release(struct list_head *head); 374 static void __ns_list_release(struct list_head *head) in __ns_list_release() argument 378 list_for_each_entry_safe(ns, tmp, head, base.list) in __ns_list_release()
|
D | policy.c | 174 void __aa_profile_list_release(struct list_head *head) in __aa_profile_list_release() argument 177 list_for_each_entry_safe(profile, tmp, head, base.list) in __aa_profile_list_release() 307 static struct aa_profile *__strn_find_child(struct list_head *head, in __strn_find_child() argument 310 return (struct aa_profile *)__policy_strn_find(head, name, len); in __strn_find_child() 322 static struct aa_profile *__find_child(struct list_head *head, const char *name) in __find_child() argument 324 return __strn_find_child(head, name, strlen(name)); in __find_child()
|
D | domain.c | 387 struct aa_ns *ns, struct list_head *head, in find_attach() argument 395 AA_BUG(!head); in find_attach() 399 list_for_each_entry_rcu(profile, head, base.list) { in find_attach()
|
/security/keys/ |
D | user_defined.c | 89 static void user_free_payload_rcu(struct rcu_head *head) in user_free_payload_rcu() argument 93 payload = container_of(head, struct user_key_payload, rcu); in user_free_payload_rcu()
|