/security/tomoyo/ |
D | memory.c | 47 bool tomoyo_memory_ok(void *ptr) in tomoyo_memory_ok() argument 49 if (ptr) { in tomoyo_memory_ok() 50 const size_t s = ksize(ptr); in tomoyo_memory_ok() 76 void *ptr = kzalloc(size, GFP_NOFS); in tomoyo_commit_ok() local 78 if (tomoyo_memory_ok(ptr)) { in tomoyo_commit_ok() 79 memmove(ptr, data, size); in tomoyo_commit_ok() 81 return ptr; in tomoyo_commit_ok() 83 kfree(ptr); in tomoyo_commit_ok() 154 struct tomoyo_name *ptr; in tomoyo_get_name() local 166 list_for_each_entry(ptr, head, head.list) { in tomoyo_get_name() [all …]
|
D | common.c | 387 const struct tomoyo_name_union *ptr) in tomoyo_print_name_union() argument 390 if (ptr->group) { in tomoyo_print_name_union() 392 tomoyo_set_string(head, ptr->group->group_name->name); in tomoyo_print_name_union() 394 tomoyo_set_string(head, ptr->filename->name); in tomoyo_print_name_union() 407 const struct tomoyo_name_union *ptr) in tomoyo_print_name_union_quoted() argument 409 if (ptr->group) { in tomoyo_print_name_union_quoted() 411 tomoyo_set_string(head, ptr->group->group_name->name); in tomoyo_print_name_union_quoted() 414 tomoyo_set_string(head, ptr->filename->name); in tomoyo_print_name_union_quoted() 428 (struct tomoyo_io_buffer *head, const struct tomoyo_number_union *ptr) in tomoyo_print_number_union_nospace() argument 430 if (ptr->group) { in tomoyo_print_number_union_nospace() [all …]
|
D | util.c | 246 struct tomoyo_name_union *ptr) in tomoyo_parse_name_union() argument 252 ptr->group = tomoyo_get_group(param, TOMOYO_PATH_GROUP); in tomoyo_parse_name_union() 253 return ptr->group != NULL; in tomoyo_parse_name_union() 258 ptr->filename = tomoyo_get_name(filename); in tomoyo_parse_name_union() 259 return ptr->filename != NULL; in tomoyo_parse_name_union() 271 struct tomoyo_number_union *ptr) in tomoyo_parse_number_union() argument 277 memset(ptr, 0, sizeof(*ptr)); in tomoyo_parse_number_union() 280 ptr->group = tomoyo_get_group(param, TOMOYO_NUMBER_GROUP); in tomoyo_parse_number_union() 281 return ptr->group != NULL; in tomoyo_parse_number_union() 287 ptr->values[0] = v; in tomoyo_parse_number_union() [all …]
|
D | gc.c | 21 static inline void tomoyo_memory_free(void *ptr) in tomoyo_memory_free() argument 23 tomoyo_memory_used[TOMOYO_MEMORY_POLICY] -= ksize(ptr); in tomoyo_memory_free() 24 kfree(ptr); in tomoyo_memory_free() 111 struct tomoyo_transition_control *ptr = in tomoyo_del_transition_control() local 112 container_of(element, typeof(*ptr), head.list); in tomoyo_del_transition_control() 114 tomoyo_put_name(ptr->domainname); in tomoyo_del_transition_control() 115 tomoyo_put_name(ptr->program); in tomoyo_del_transition_control() 127 struct tomoyo_aggregator *ptr = in tomoyo_del_aggregator() local 128 container_of(element, typeof(*ptr), head.list); in tomoyo_del_aggregator() 130 tomoyo_put_name(ptr->original_name); in tomoyo_del_aggregator() [all …]
|
D | domain.c | 166 struct tomoyo_acl_info *ptr; in tomoyo_check_acl() local 171 list_for_each_entry_rcu(ptr, list, list, in tomoyo_check_acl() 173 if (ptr->is_deleted || ptr->type != r->param_type) in tomoyo_check_acl() 175 if (!check_entry(r, ptr)) in tomoyo_check_acl() 177 if (!tomoyo_condition(r, ptr->cond)) in tomoyo_check_acl() 179 r->matched_acl = ptr; in tomoyo_check_acl() 302 const struct tomoyo_transition_control *ptr; in tomoyo_scan_transition() local 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() 308 if (ptr->domainname) { in tomoyo_scan_transition() [all …]
|
D | condition.c | 235 const struct tomoyo_name_union *ptr, in tomoyo_scan_exec_realpath() argument 247 result = tomoyo_compare_name_union(&exe, ptr); in tomoyo_scan_exec_realpath() 280 struct tomoyo_name_union *ptr) in tomoyo_parse_name_union_quoted() argument 285 return tomoyo_parse_name_union(param, ptr); in tomoyo_parse_name_union_quoted() 286 ptr->filename = tomoyo_get_dqword(filename); in tomoyo_parse_name_union_quoted() 287 return ptr->filename != NULL; in tomoyo_parse_name_union_quoted() 409 struct tomoyo_condition *ptr; in tomoyo_commit_condition() local 414 ptr = NULL; in tomoyo_commit_condition() 418 list_for_each_entry(ptr, &tomoyo_condition_list, head.list) { in tomoyo_commit_condition() 419 if (!tomoyo_same_condition(ptr, entry) || in tomoyo_commit_condition() [all …]
|
D | file.c | 67 void tomoyo_put_name_union(struct tomoyo_name_union *ptr) in tomoyo_put_name_union() argument 69 tomoyo_put_group(ptr->group); in tomoyo_put_name_union() 70 tomoyo_put_name(ptr->filename); in tomoyo_put_name_union() 83 const struct tomoyo_name_union *ptr) in tomoyo_compare_name_union() argument 85 if (ptr->group) in tomoyo_compare_name_union() 86 return tomoyo_path_matches_group(name, ptr->group); in tomoyo_compare_name_union() 87 if (tomoyo_path_matches_pattern(name, ptr->filename)) in tomoyo_compare_name_union() 88 return ptr->filename; in tomoyo_compare_name_union() 99 void tomoyo_put_number_union(struct tomoyo_number_union *ptr) in tomoyo_put_number_union() argument 101 tomoyo_put_group(ptr->group); in tomoyo_put_number_union() [all …]
|
D | network.c | 51 struct tomoyo_ipaddr_union *ptr) in tomoyo_parse_ipaddr_union() argument 53 u8 * const min = ptr->ip[0].in6_u.u6_addr8; in tomoyo_parse_ipaddr_union() 54 u8 * const max = ptr->ip[1].in6_u.u6_addr8; in tomoyo_parse_ipaddr_union() 60 ptr->is_ipv6 = false; in tomoyo_parse_ipaddr_union() 62 ptr->ip[1].s6_addr32[0] = ptr->ip[0].s6_addr32[0]; in tomoyo_parse_ipaddr_union() 69 ptr->is_ipv6 = true; in tomoyo_parse_ipaddr_union() 125 const struct tomoyo_ipaddr_union *ptr) in tomoyo_print_ip() argument 127 if (ptr->is_ipv6) in tomoyo_print_ip() 128 tomoyo_print_ipv6(buf, size, &ptr->ip[0], &ptr->ip[1]); in tomoyo_print_ip() 130 tomoyo_print_ipv4(buf, size, &ptr->ip[0].s6_addr32[0], in tomoyo_print_ip() [all …]
|
D | audit.c | 441 struct tomoyo_log *ptr = NULL; in tomoyo_read_log() local 449 ptr = list_entry(tomoyo_log.next, typeof(*ptr), list); in tomoyo_read_log() 450 list_del(&ptr->list); in tomoyo_read_log() 452 tomoyo_memory_used[TOMOYO_MEMORY_AUDIT] -= ptr->size; in tomoyo_read_log() 455 if (ptr) { in tomoyo_read_log() 456 head->read_buf = ptr->log; in tomoyo_read_log() 458 kfree(ptr); in tomoyo_read_log()
|
D | common.h | 930 const struct tomoyo_number_union *ptr); 940 bool tomoyo_memory_ok(void *ptr); 945 struct tomoyo_ipaddr_union *ptr); 947 struct tomoyo_name_union *ptr); 949 struct tomoyo_number_union *ptr); 964 (const struct tomoyo_path_info *name, const struct tomoyo_name_union *ptr); 1053 void tomoyo_fill_path_info(struct tomoyo_path_info *ptr); 1060 const struct tomoyo_ipaddr_union *ptr); 1063 void tomoyo_put_name_union(struct tomoyo_name_union *ptr); 1064 void tomoyo_put_number_union(struct tomoyo_number_union *ptr); [all …]
|
D | environ.c | 19 const struct tomoyo_acl_info *ptr) in tomoyo_check_env_acl() argument 22 container_of(ptr, typeof(*acl), head); in tomoyo_check_env_acl()
|
D | securityfs_if.c | 20 const struct tomoyo_acl_info *ptr) in tomoyo_check_task_acl() argument 22 const struct tomoyo_task_acl *acl = container_of(ptr, typeof(*acl), in tomoyo_check_task_acl()
|
D | mount.c | 48 const struct tomoyo_acl_info *ptr) in tomoyo_check_mount_acl() argument 51 container_of(ptr, typeof(*acl), head); in tomoyo_check_mount_acl()
|
/security/integrity/platform_certs/ |
D | load_ipl_s390.c | 20 void *ptr, *end; in load_ipl_certs() local 26 ptr = (void *) ipl_cert_list_addr; in load_ipl_certs() 27 end = ptr + ipl_cert_list_size; in load_ipl_certs() 28 while ((void *) ptr < end) { in load_ipl_certs() 29 len = *(unsigned int *) ptr; in load_ipl_certs() 30 ptr += sizeof(unsigned int); in load_ipl_certs() 31 add_to_platform_keyring("IPL:db", ptr, len); in load_ipl_certs() 32 ptr += len; in load_ipl_certs()
|
/security/keys/ |
D | keyring.c | 674 struct assoc_array_ptr *ptr; in search_nested_keyrings() local 732 ptr = READ_ONCE(keyring->keys.root); in search_nested_keyrings() 733 if (!ptr) in search_nested_keyrings() 736 if (assoc_array_ptr_is_shortcut(ptr)) { in search_nested_keyrings() 741 shortcut = assoc_array_ptr_to_shortcut(ptr); in search_nested_keyrings() 745 ptr = READ_ONCE(shortcut->next_node); in search_nested_keyrings() 746 node = assoc_array_ptr_to_node(ptr); in search_nested_keyrings() 750 node = assoc_array_ptr_to_node(ptr); in search_nested_keyrings() 751 ptr = node->slots[0]; in search_nested_keyrings() 752 if (!assoc_array_ptr_is_meta(ptr)) in search_nested_keyrings() [all …]
|
/security/integrity/ima/ |
D | ima_crypto.c | 121 void *ptr; in ima_alloc_pages() local 129 ptr = (void *)__get_free_pages(gfp_mask, order); in ima_alloc_pages() 130 if (ptr) { in ima_alloc_pages() 132 return ptr; in ima_alloc_pages() 143 ptr = (void *)__get_free_pages(gfp_mask, 0); in ima_alloc_pages() 144 if (ptr) { in ima_alloc_pages() 146 return ptr; in ima_alloc_pages() 158 static void ima_free_pages(void *ptr, size_t size) in ima_free_pages() argument 160 if (!ptr) in ima_free_pages() 162 free_pages((unsigned long)ptr, get_order(size)); in ima_free_pages()
|
/security/selinux/ |
D | netif.c | 251 unsigned long event, void *ptr) in sel_netif_netdev_notifier_handler() argument 253 struct net_device *dev = netdev_notifier_info_to_dev(ptr); in sel_netif_netdev_notifier_handler()
|
D | selinuxfs.c | 1032 char *con = NULL, *user = NULL, *ptr; in sel_write_user() local 1069 ptr = buf + length; in sel_write_user() 1081 memcpy(ptr, newcon, len); in sel_write_user() 1083 ptr += len; in sel_write_user()
|
/security/selinux/ss/ |
D | policydb.c | 2609 static int sens_write(void *vkey, void *datum, void *ptr) in sens_write() argument 2613 struct policy_data *pd = ptr; in sens_write() 2637 static int cat_write(void *vkey, void *datum, void *ptr) in cat_write() argument 2641 struct policy_data *pd = ptr; in cat_write() 2772 static int common_write(void *vkey, void *datum, void *ptr) in common_write() argument 2776 struct policy_data *pd = ptr; in common_write() 2867 static int class_write(void *vkey, void *datum, void *ptr) in class_write() argument 2871 struct policy_data *pd = ptr; in class_write() 2955 static int role_write(void *vkey, void *datum, void *ptr) in role_write() argument 2959 struct policy_data *pd = ptr; in role_write() [all …]
|
D | conditional.h | 71 int cond_write_bool(void *key, void *datum, void *ptr);
|
D | conditional.c | 268 static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum *d, void *ptr) in cond_insertf() argument 270 struct cond_insertf_data *data = ptr; in cond_insertf() 489 int cond_write_bool(void *vkey, void *datum, void *ptr) in cond_write_bool() argument 493 struct policy_data *pd = ptr; in cond_write_bool()
|
/security/apparmor/ |
D | policy.c | 186 static void aa_free_data(void *ptr, void *arg) in aa_free_data() argument 188 struct aa_data *data = ptr; in aa_free_data()
|