/security/tomoyo/ |
D | common.c | 211 static bool tomoyo_flush(struct tomoyo_io_buffer *head) in tomoyo_flush() argument 213 while (head->r.w_pos) { in tomoyo_flush() 214 const char *w = head->r.w[0]; in tomoyo_flush() 217 if (len > head->read_user_buf_avail) in tomoyo_flush() 218 len = head->read_user_buf_avail; in tomoyo_flush() 221 if (copy_to_user(head->read_user_buf, w, len)) in tomoyo_flush() 223 head->read_user_buf_avail -= len; in tomoyo_flush() 224 head->read_user_buf += len; in tomoyo_flush() 227 head->r.w[0] = w; in tomoyo_flush() 231 if (head->poll) { in tomoyo_flush() [all …]
|
D | gc.c | 41 struct tomoyo_io_buffer *head; in tomoyo_struct_used_by_io_buffer() local 45 list_for_each_entry(head, &tomoyo_io_buffer_list, list) { in tomoyo_struct_used_by_io_buffer() 46 head->users++; in tomoyo_struct_used_by_io_buffer() 48 mutex_lock(&head->io_sem); in tomoyo_struct_used_by_io_buffer() 49 if (head->r.domain == element || head->r.group == element || in tomoyo_struct_used_by_io_buffer() 50 head->r.acl == element || &head->w.domain->list == element) in tomoyo_struct_used_by_io_buffer() 52 mutex_unlock(&head->io_sem); in tomoyo_struct_used_by_io_buffer() 54 head->users--; in tomoyo_struct_used_by_io_buffer() 72 struct tomoyo_io_buffer *head; in tomoyo_name_used_by_io_buffer() local 77 list_for_each_entry(head, &tomoyo_io_buffer_list, list) { in tomoyo_name_used_by_io_buffer() [all …]
|
D | group.c | 21 return container_of(a, struct tomoyo_path_group, head)->member_name == in tomoyo_same_path_group() 22 container_of(b, struct tomoyo_path_group, head)->member_name; in tomoyo_same_path_group() 36 return !memcmp(&container_of(a, struct tomoyo_number_group, head) in tomoyo_same_number_group() 38 &container_of(b, struct tomoyo_number_group, head) in tomoyo_same_number_group() 40 sizeof(container_of(a, struct tomoyo_number_group, head) in tomoyo_same_number_group() 56 head); in tomoyo_same_address_group() 58 head); in tomoyo_same_address_group() 85 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_group() 93 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_group() 105 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_group() [all …]
|
D | memory.c | 108 list_for_each_entry(group, list, head.list) { in tomoyo_get_group() 110 atomic_read(&group->head.users) == TOMOYO_GC_IN_PROGRESS) in tomoyo_get_group() 112 atomic_inc(&group->head.users); in tomoyo_get_group() 120 atomic_set(&entry->head.users, 1); in tomoyo_get_group() 121 list_add_tail_rcu(&entry->head.list, list); in tomoyo_get_group() 152 struct list_head *head; in tomoyo_get_name() local 158 head = &tomoyo_name_list[hash_long(hash, TOMOYO_HASH_BITS)]; in tomoyo_get_name() 161 list_for_each_entry(ptr, head, head.list) { in tomoyo_get_name() 163 atomic_read(&ptr->head.users) == TOMOYO_GC_IN_PROGRESS) in tomoyo_get_name() 165 atomic_inc(&ptr->head.users); in tomoyo_get_name() [all …]
|
D | file.c | 254 head); in tomoyo_check_path_acl() 276 container_of(ptr, typeof(*acl), head); in tomoyo_check_path_number_acl() 296 container_of(ptr, typeof(*acl), head); in tomoyo_check_path2_acl() 315 container_of(ptr, typeof(*acl), head); in tomoyo_check_mkdev_acl() 338 const struct tomoyo_path_acl *p1 = container_of(a, typeof(*p1), head); in tomoyo_same_path_acl() 339 const struct tomoyo_path_acl *p2 = container_of(b, typeof(*p2), head); in tomoyo_same_path_acl() 356 u16 * const a_perm = &container_of(a, struct tomoyo_path_acl, head) in tomoyo_merge_path_acl() 359 const u16 b_perm = container_of(b, struct tomoyo_path_acl, head)->perm; in tomoyo_merge_path_acl() 382 .head.type = TOMOYO_TYPE_PATH_ACL, in tomoyo_update_path_acl() 389 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_update_path_acl() [all …]
|
D | common.h | 510 struct tomoyo_shared_acl_head head; member 538 struct tomoyo_shared_acl_head head; member 545 struct tomoyo_acl_head head; member 551 struct tomoyo_acl_head head; member 557 struct tomoyo_acl_head head; member 649 struct tomoyo_shared_acl_head head; member 694 struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_MANUAL_TASK_ACL */ member 705 struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_PATH_ACL */ member 715 struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_PATH_NUMBER_ACL */ member 724 struct tomoyo_acl_info head; /* type = TOMOYO_TYPE_MKDEV_ACL */ member [all …]
|
D | environ.c | 21 container_of(ptr, typeof(*acl), head); in tomoyo_check_env_acl() 78 const struct tomoyo_env_acl *p1 = container_of(a, typeof(*p1), head); in tomoyo_same_env_acl() 79 const struct tomoyo_env_acl *p2 = container_of(b, typeof(*p2), head); in tomoyo_same_env_acl() 95 struct tomoyo_env_acl e = { .head.type = TOMOYO_TYPE_ENV_ACL }; in tomoyo_write_env() 104 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_write_env()
|
D | network.c | 194 const struct tomoyo_inet_acl *p1 = container_of(a, typeof(*p1), head); in tomoyo_same_inet_acl() 195 const struct tomoyo_inet_acl *p2 = container_of(b, typeof(*p2), head); in tomoyo_same_inet_acl() 213 const struct tomoyo_unix_acl *p1 = container_of(a, typeof(*p1), head); in tomoyo_same_unix_acl() 214 const struct tomoyo_unix_acl *p2 = container_of(b, typeof(*p2), head); in tomoyo_same_unix_acl() 234 &container_of(a, struct tomoyo_inet_acl, head)->perm; in tomoyo_merge_inet_acl() 236 const u8 b_perm = container_of(b, struct tomoyo_inet_acl, head)->perm; in tomoyo_merge_inet_acl() 260 &container_of(a, struct tomoyo_unix_acl, head)->perm; in tomoyo_merge_unix_acl() 262 const u8 b_perm = container_of(b, struct tomoyo_unix_acl, head)->perm; in tomoyo_merge_unix_acl() 283 struct tomoyo_inet_acl e = { .head.type = TOMOYO_TYPE_INET_ACL }; in tomoyo_write_inet_network() 310 error = tomoyo_update_domain(&e.head, sizeof(e), param, in tomoyo_write_inet_network() [all …]
|
D | audit.c | 423 void tomoyo_read_log(struct tomoyo_io_buffer *head) in tomoyo_read_log() argument 426 if (head->r.w_pos) in tomoyo_read_log() 428 kfree(head->read_buf); in tomoyo_read_log() 429 head->read_buf = NULL; in tomoyo_read_log() 439 head->read_buf = ptr->log; in tomoyo_read_log() 440 head->r.w[head->r.w_pos++] = head->read_buf; in tomoyo_read_log()
|
D | domain.c | 113 container_of(new_entry, struct tomoyo_path_acl, head) in tomoyo_update_domain() 216 head); in tomoyo_same_transition_control() 219 head); in tomoyo_same_transition_control() 266 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_transition_control() 293 list_for_each_entry_rcu(ptr, list, head.list) { in tomoyo_scan_transition() 294 if (ptr->head.is_deleted || ptr->type != type) in tomoyo_scan_transition() 372 head); in tomoyo_same_aggregator() 374 head); in tomoyo_same_aggregator() 403 error = tomoyo_update_policy(&e.head, sizeof(e), param, in tomoyo_write_aggregator() 714 list_for_each_entry_rcu(ptr, list, head.list) { in tomoyo_find_next_domain() [all …]
|
D | util.c | 1045 perm = container_of(ptr, struct tomoyo_path_acl, head) in tomoyo_domain_quota_is_ok() 1049 perm = container_of(ptr, struct tomoyo_path2_acl, head) in tomoyo_domain_quota_is_ok() 1054 head)->perm; in tomoyo_domain_quota_is_ok() 1058 head)->perm; in tomoyo_domain_quota_is_ok() 1062 head)->perm; in tomoyo_domain_quota_is_ok() 1066 head)->perm; in tomoyo_domain_quota_is_ok()
|
D | condition.c | 403 list_for_each_entry(ptr, &tomoyo_condition_list, head.list) { in tomoyo_commit_condition() 405 atomic_read(&ptr->head.users) == TOMOYO_GC_IN_PROGRESS) in tomoyo_commit_condition() 408 atomic_inc(&ptr->head.users); in tomoyo_commit_condition() 414 atomic_set(&entry->head.users, 1); in tomoyo_commit_condition() 415 list_add(&entry->head.list, &tomoyo_condition_list); in tomoyo_commit_condition() 424 tomoyo_del_condition(&entry->head.list); in tomoyo_commit_condition() 678 tomoyo_del_condition(&entry->head.list); in tomoyo_get_condition()
|
D | securityfs_if.c | 22 head); in tomoyo_check_task_acl()
|
D | mount.c | 49 container_of(ptr, typeof(*acl), head); in tomoyo_check_mount_acl()
|
/security/apparmor/ |
D | policy.c | 182 static struct aa_policy *__policy_find(struct list_head *head, const char *name) in __policy_find() argument 186 list_for_each_entry(policy, head, list) { in __policy_find() 206 static struct aa_policy *__policy_strn_find(struct list_head *head, in __policy_strn_find() argument 211 list_for_each_entry(policy, head, list) { in __policy_strn_find() 355 static struct aa_namespace *__aa_find_namespace(struct list_head *head, in __aa_find_namespace() argument 358 return (struct aa_namespace *)__policy_find(head, name); in __aa_find_namespace() 515 static void __profile_list_release(struct list_head *head); 538 static void __profile_list_release(struct list_head *head) in __profile_list_release() argument 541 list_for_each_entry_safe(profile, tmp, head, base.list) in __profile_list_release() 545 static void __ns_list_release(struct list_head *head); [all …]
|
D | domain.c | 146 struct list_head *head) in __attach_match() argument 151 list_for_each_entry(profile, head, base.list) { in __attach_match()
|
/security/selinux/ss/ |
D | mls.c | 37 int i, l, len, head, prev; in mls_compute_context_len() local 51 head = -2; in mls_compute_context_len() 57 if (head != prev) { in mls_compute_context_len() 63 head = i; in mls_compute_context_len() 67 if (prev != head) { in mls_compute_context_len() 92 int i, l, head, prev; in mls_sid_to_context() local 110 head = -2; in mls_sid_to_context() 116 if (prev != head) { in mls_sid_to_context() 117 if (prev - head > 1) in mls_sid_to_context() 132 head = i; in mls_sid_to_context() [all …]
|
D | conditional.c | 267 struct cond_av_list *head; member 339 if (!data->head) in cond_insertf() 340 data->head = list; in cond_insertf() 347 cond_av_list_destroy(data->head); in cond_insertf() 348 data->head = NULL; in cond_insertf() 372 data.head = NULL; in cond_read_av_list() 381 *ret_list = data.head; in cond_read_av_list()
|
D | policydb.h | 202 struct ocontext *head; member
|
D | policydb.c | 830 c = g->head; in policydb_destroy() 889 struct ocontext *head, *c; in policydb_load_isids() local 898 head = p->ocontexts[OCON_ISID]; in policydb_load_isids() 899 for (c = head; c; c = c->next) { in policydb_load_isids() 2106 for (l = NULL, c = genfs->head; c; in genfs_read() 2126 genfs->head = newc; in genfs_read() 3221 for (c = genfs->head; c; c = c->next) in genfs_write() 3227 for (c = genfs->head; c; c = c->next) { in genfs_write()
|
D | services.c | 2476 for (c = genfs->head; c; c = c->next) { in security_genfs_sid()
|
/security/selinux/ |
D | avc.c | 213 struct hlist_head *head; in avc_get_hash_stats() local 220 head = &avc_cache.slots[i]; in avc_get_hash_stats() 221 if (!hlist_empty(head)) { in avc_get_hash_stats() 226 hlist_for_each_entry_rcu(node, next, head, list) in avc_get_hash_stats() 511 struct hlist_head *head; in avc_reclaim_node() local 517 head = &avc_cache.slots[hvalue]; in avc_reclaim_node() 524 hlist_for_each_entry(node, next, head, list) { in avc_reclaim_node() 571 struct hlist_head *head; in avc_search_node() local 575 head = &avc_cache.slots[hvalue]; in avc_search_node() 576 hlist_for_each_entry_rcu(node, next, head, list) { in avc_search_node() [all …]
|
D | hooks.c | 220 static void inode_free_rcu(struct rcu_head *head) in inode_free_rcu() argument 224 isec = container_of(head, struct inode_security_struct, rcu); in inode_free_rcu()
|
/security/smack/ |
D | smackfs.c | 384 struct list_head *head) in smk_seq_start() argument 392 s->private = head; in smk_seq_start() 407 struct list_head *head) in smk_seq_next() argument 411 if (list_is_last(list, head)) { in smk_seq_next()
|