/security/tomoyo/ |
D | memory.c | 46 bool tomoyo_memory_ok(void *ptr) in tomoyo_memory_ok() argument 48 if (ptr) { in tomoyo_memory_ok() 49 const size_t s = ksize(ptr); in tomoyo_memory_ok() 74 void *ptr = kzalloc(size, GFP_NOFS); in tomoyo_commit_ok() local 75 if (tomoyo_memory_ok(ptr)) { in tomoyo_commit_ok() 76 memmove(ptr, data, size); in tomoyo_commit_ok() 78 return ptr; in tomoyo_commit_ok() 80 kfree(ptr); in tomoyo_commit_ok() 149 struct tomoyo_name *ptr; in tomoyo_get_name() local 161 list_for_each_entry(ptr, head, head.list) { in tomoyo_get_name() [all …]
|
D | common.c | 382 const struct tomoyo_name_union *ptr) in tomoyo_print_name_union() argument 385 if (ptr->group) { in tomoyo_print_name_union() 387 tomoyo_set_string(head, ptr->group->group_name->name); in tomoyo_print_name_union() 389 tomoyo_set_string(head, ptr->filename->name); in tomoyo_print_name_union() 402 const struct tomoyo_name_union *ptr) in tomoyo_print_name_union_quoted() argument 404 if (ptr->group) { in tomoyo_print_name_union_quoted() 406 tomoyo_set_string(head, ptr->group->group_name->name); in tomoyo_print_name_union_quoted() 409 tomoyo_set_string(head, ptr->filename->name); in tomoyo_print_name_union_quoted() 423 (struct tomoyo_io_buffer *head, const struct tomoyo_number_union *ptr) in tomoyo_print_number_union_nospace() argument 425 if (ptr->group) { in tomoyo_print_number_union_nospace() [all …]
|
D | util.c | 258 struct tomoyo_name_union *ptr) in tomoyo_parse_name_union() argument 263 ptr->group = tomoyo_get_group(param, TOMOYO_PATH_GROUP); in tomoyo_parse_name_union() 264 return ptr->group != NULL; in tomoyo_parse_name_union() 269 ptr->filename = tomoyo_get_name(filename); in tomoyo_parse_name_union() 270 return ptr->filename != NULL; in tomoyo_parse_name_union() 282 struct tomoyo_number_union *ptr) in tomoyo_parse_number_union() argument 287 memset(ptr, 0, sizeof(*ptr)); in tomoyo_parse_number_union() 290 ptr->group = tomoyo_get_group(param, TOMOYO_NUMBER_GROUP); in tomoyo_parse_number_union() 291 return ptr->group != NULL; in tomoyo_parse_number_union() 297 ptr->values[0] = v; in tomoyo_parse_number_union() [all …]
|
D | gc.c | 20 static inline void tomoyo_memory_free(void *ptr) in tomoyo_memory_free() argument 22 tomoyo_memory_used[TOMOYO_MEMORY_POLICY] -= ksize(ptr); in tomoyo_memory_free() 23 kfree(ptr); in tomoyo_memory_free() 108 struct tomoyo_transition_control *ptr = in tomoyo_del_transition_control() local 109 container_of(element, typeof(*ptr), head.list); in tomoyo_del_transition_control() 110 tomoyo_put_name(ptr->domainname); in tomoyo_del_transition_control() 111 tomoyo_put_name(ptr->program); in tomoyo_del_transition_control() 123 struct tomoyo_aggregator *ptr = in tomoyo_del_aggregator() local 124 container_of(element, typeof(*ptr), head.list); in tomoyo_del_aggregator() 125 tomoyo_put_name(ptr->original_name); in tomoyo_del_aggregator() [all …]
|
D | domain.c | 161 struct tomoyo_acl_info *ptr; in tomoyo_check_acl() local 166 list_for_each_entry_rcu(ptr, list, list) { in tomoyo_check_acl() 167 if (ptr->is_deleted || ptr->type != r->param_type) in tomoyo_check_acl() 169 if (!check_entry(r, ptr)) in tomoyo_check_acl() 171 if (!tomoyo_condition(r, ptr->cond)) in tomoyo_check_acl() 173 r->matched_acl = ptr; in tomoyo_check_acl() 292 const struct tomoyo_transition_control *ptr; in tomoyo_scan_transition() local 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() 296 if (ptr->domainname) { in tomoyo_scan_transition() [all …]
|
D | condition.c | 226 const struct tomoyo_name_union *ptr, in tomoyo_scan_exec_realpath() argument 237 result = tomoyo_compare_name_union(&exe, ptr); in tomoyo_scan_exec_realpath() 269 struct tomoyo_name_union *ptr) in tomoyo_parse_name_union_quoted() argument 273 return tomoyo_parse_name_union(param, ptr); in tomoyo_parse_name_union_quoted() 274 ptr->filename = tomoyo_get_dqword(filename); in tomoyo_parse_name_union_quoted() 275 return ptr->filename != NULL; in tomoyo_parse_name_union_quoted() 395 struct tomoyo_condition *ptr; in tomoyo_commit_condition() local 399 ptr = NULL; in tomoyo_commit_condition() 403 list_for_each_entry(ptr, &tomoyo_condition_list, head.list) { in tomoyo_commit_condition() 404 if (!tomoyo_same_condition(ptr, entry) || in tomoyo_commit_condition() [all …]
|
D | file.c | 66 void tomoyo_put_name_union(struct tomoyo_name_union *ptr) in tomoyo_put_name_union() argument 68 tomoyo_put_group(ptr->group); in tomoyo_put_name_union() 69 tomoyo_put_name(ptr->filename); in tomoyo_put_name_union() 82 const struct tomoyo_name_union *ptr) in tomoyo_compare_name_union() argument 84 if (ptr->group) in tomoyo_compare_name_union() 85 return tomoyo_path_matches_group(name, ptr->group); in tomoyo_compare_name_union() 86 if (tomoyo_path_matches_pattern(name, ptr->filename)) in tomoyo_compare_name_union() 87 return ptr->filename; in tomoyo_compare_name_union() 98 void tomoyo_put_number_union(struct tomoyo_number_union *ptr) in tomoyo_put_number_union() argument 100 tomoyo_put_group(ptr->group); in tomoyo_put_number_union() [all …]
|
D | network.c | 50 struct tomoyo_ipaddr_union *ptr) in tomoyo_parse_ipaddr_union() argument 52 u8 * const min = ptr->ip[0].in6_u.u6_addr8; in tomoyo_parse_ipaddr_union() 53 u8 * const max = ptr->ip[1].in6_u.u6_addr8; in tomoyo_parse_ipaddr_union() 59 ptr->is_ipv6 = false; in tomoyo_parse_ipaddr_union() 61 ptr->ip[1].s6_addr32[0] = ptr->ip[0].s6_addr32[0]; in tomoyo_parse_ipaddr_union() 68 ptr->is_ipv6 = true; in tomoyo_parse_ipaddr_union() 124 const struct tomoyo_ipaddr_union *ptr) in tomoyo_print_ip() argument 126 if (ptr->is_ipv6) in tomoyo_print_ip() 127 tomoyo_print_ipv6(buf, size, &ptr->ip[0], &ptr->ip[1]); in tomoyo_print_ip() 129 tomoyo_print_ipv4(buf, size, &ptr->ip[0].s6_addr32[0], in tomoyo_print_ip() [all …]
|
D | audit.c | 432 struct tomoyo_log *ptr = NULL; in tomoyo_read_log() local 439 ptr = list_entry(tomoyo_log.next, typeof(*ptr), list); in tomoyo_read_log() 440 list_del(&ptr->list); in tomoyo_read_log() 442 tomoyo_memory_used[TOMOYO_MEMORY_AUDIT] -= ptr->size; in tomoyo_read_log() 445 if (ptr) { in tomoyo_read_log() 446 head->read_buf = ptr->log; in tomoyo_read_log() 448 kfree(ptr); in tomoyo_read_log()
|
D | common.h | 919 const struct tomoyo_number_union *ptr); 929 bool tomoyo_memory_ok(void *ptr); 934 struct tomoyo_ipaddr_union *ptr); 936 struct tomoyo_name_union *ptr); 938 struct tomoyo_number_union *ptr); 953 (const struct tomoyo_path_info *name, const struct tomoyo_name_union *ptr); 1041 void tomoyo_fill_path_info(struct tomoyo_path_info *ptr); 1048 const struct tomoyo_ipaddr_union *ptr); 1051 void tomoyo_put_name_union(struct tomoyo_name_union *ptr); 1052 void tomoyo_put_number_union(struct tomoyo_number_union *ptr); [all …]
|
D | environ.c | 18 const struct tomoyo_acl_info *ptr) in tomoyo_check_env_acl() argument 21 container_of(ptr, typeof(*acl), head); in tomoyo_check_env_acl()
|
D | securityfs_if.c | 19 const struct tomoyo_acl_info *ptr) in tomoyo_check_task_acl() argument 21 const struct tomoyo_task_acl *acl = container_of(ptr, typeof(*acl), in tomoyo_check_task_acl()
|
D | mount.c | 46 const struct tomoyo_acl_info *ptr) in tomoyo_check_mount_acl() argument 49 container_of(ptr, typeof(*acl), head); in tomoyo_check_mount_acl()
|
/security/keys/ |
D | keyring.c | 618 struct assoc_array_ptr *ptr; in search_nested_keyrings() local 673 ptr = ACCESS_ONCE(keyring->keys.root); in search_nested_keyrings() 674 if (!ptr) in search_nested_keyrings() 677 if (assoc_array_ptr_is_shortcut(ptr)) { in search_nested_keyrings() 682 shortcut = assoc_array_ptr_to_shortcut(ptr); in search_nested_keyrings() 687 ptr = ACCESS_ONCE(shortcut->next_node); in search_nested_keyrings() 688 node = assoc_array_ptr_to_node(ptr); in search_nested_keyrings() 692 node = assoc_array_ptr_to_node(ptr); in search_nested_keyrings() 695 ptr = node->slots[0]; in search_nested_keyrings() 696 if (!assoc_array_ptr_is_meta(ptr)) in search_nested_keyrings() [all …]
|
/security/integrity/ima/ |
D | ima_crypto.c | 157 void *ptr; in ima_alloc_pages() local 165 ptr = (void *)__get_free_pages(gfp_mask, order); in ima_alloc_pages() 166 if (ptr) { in ima_alloc_pages() 168 return ptr; in ima_alloc_pages() 179 ptr = (void *)__get_free_pages(gfp_mask, 0); in ima_alloc_pages() 180 if (ptr) { in ima_alloc_pages() 182 return ptr; in ima_alloc_pages() 194 static void ima_free_pages(void *ptr, size_t size) in ima_free_pages() argument 196 if (!ptr) in ima_free_pages() 198 free_pages((unsigned long)ptr, get_order(size)); in ima_free_pages()
|
/security/selinux/ |
D | netif.c | 262 unsigned long event, void *ptr) in sel_netif_netdev_notifier_handler() argument 264 struct net_device *dev = netdev_notifier_info_to_dev(ptr); in sel_netif_netdev_notifier_handler()
|
D | selinuxfs.c | 918 char *con = NULL, *user = NULL, *ptr; in sel_write_user() local 952 ptr = buf + length; in sel_write_user() 964 memcpy(ptr, newcon, len); in sel_write_user() 966 ptr += len; in sel_write_user()
|
/security/selinux/ss/ |
D | conditional.h | 73 int cond_write_bool(void *key, void *datum, void *ptr);
|
D | policydb.c | 2575 static int sens_write(void *vkey, void *datum, void *ptr) in sens_write() argument 2579 struct policy_data *pd = ptr; in sens_write() 2603 static int cat_write(void *vkey, void *datum, void *ptr) in cat_write() argument 2607 struct policy_data *pd = ptr; in cat_write() 2738 static int common_write(void *vkey, void *datum, void *ptr) in common_write() argument 2742 struct policy_data *pd = ptr; in common_write() 2833 static int class_write(void *vkey, void *datum, void *ptr) in class_write() argument 2837 struct policy_data *pd = ptr; in class_write() 2921 static int role_write(void *vkey, void *datum, void *ptr) in role_write() argument 2925 struct policy_data *pd = ptr; in role_write() [all …]
|
D | conditional.c | 271 static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum *d, void *ptr) in cond_insertf() argument 273 struct cond_insertf_data *data = ptr; in cond_insertf() 493 int cond_write_bool(void *vkey, void *datum, void *ptr) in cond_write_bool() argument 497 struct policy_data *pd = ptr; in cond_write_bool()
|