| /security/apparmor/ |
| A D | policy_unpack.c | 103 if (l->size != r->size) in aa_rawdata_eq() 189 return size; in aa_unpack_u16_chunk() 355 u32 size; in aa_unpack_blob() local 381 if (size) { in aa_unpack_str() 432 if (size) { in unpack_dfa() 467 u16 size; in unpack_trans_table() local 483 strs->size = size; in unpack_trans_table() 540 u16 size; in unpack_xattrs() local 569 u16 size; in unpack_secmark() local 618 u16 size; in unpack_rlimits() local [all …]
|
| A D | label.c | 413 label->size = size; /* doesn't include null */ in aa_label_init() 479 return vec_cmp(a->vec, a->size, b->vec, b->size); in label_cmp() 517 while (I->j < sub->size && I->i < set->size) { in __aa_label_next_not_in_set() 1057 AA_BUG(new->size < a->size + b->size); in label_merge_insert() 1077 new->size -= aa_vec_unique(&new->vec[0], new->size, in label_merge_insert() 1234 new = aa_label_alloc(a->size + b->size, NULL, gfp); in aa_label_merge() 1680 int size; in aa_label_asxprint() local 1686 if (size < 0) in aa_label_asxprint() 1687 return size; in aa_label_asxprint() 1709 int size; in aa_label_acntsxprint() local [all …]
|
| A D | policy_unpack_test.c | 189 size_t size; in policy_unpack_test_unpack_blob_with_null_name() local 203 size_t size; in policy_unpack_test_unpack_blob_with_name() local 218 int size; in policy_unpack_test_unpack_blob_out_of_bounds() local 235 size_t size; in policy_unpack_test_unpack_str_with_null_name() local 248 size_t size; in policy_unpack_test_unpack_str_with_name() local 261 int size; in policy_unpack_test_unpack_str_out_of_bounds() local 276 size_t size; in policy_unpack_test_unpack_strdup_with_null_name() local 294 size_t size; in policy_unpack_test_unpack_strdup_with_name() local 312 int size; in policy_unpack_test_unpack_strdup_out_of_bounds() local 388 size_t size; in policy_unpack_test_unpack_u16_chunk_basic() local [all …]
|
| A D | lib.c | 91 static int val_mask_to_str(char *str, size_t size, in val_mask_to_str() argument 101 size -= len; in val_mask_to_str() 124 if (t->size == newsize) in aa_resize_str_table() 129 for (i = 0; i < min(t->size, newsize); i++) in aa_resize_str_table() 131 for (; i < t->size; i++) in aa_resize_str_table() 133 if (newsize > t->size) in aa_resize_str_table() 134 memset(&n[t->size], 0, (newsize-t->size)*sizeof(*n)); in aa_resize_str_table() 137 t->size = newsize; in aa_resize_str_table() 154 for (i = 0; i < t->size; i++) in aa_free_str_table() 158 t->size = 0; in aa_free_str_table() [all …]
|
| A D | policy_compat.c | 151 u32 *size) in compute_fperms() argument 164 *size = state_count * 2; in compute_fperms() 175 u32 *size) in compute_xmatch_perms() argument 188 *size = state_count; in compute_xmatch_perms() 250 u32 *size) in compute_perms() argument 263 *size = state_count; in compute_perms() 298 policy->perms = compute_xmatch_perms(policy->dfa, &policy->size); in aa_compat_map_xmatch() 309 policy->perms = compute_perms(policy->dfa, version, &policy->size); in aa_compat_map_policy() 320 policy->perms = compute_fperms(policy->dfa, &policy->size); in aa_compat_map_file()
|
| A D | apparmorfs.c | 405 data->size = copy_size; in aa_simple_write_to_buffer() 430 data = aa_simple_write_to_buffer(buf, size, size, pos); in policy_update() 498 data = aa_simple_write_to_buffer(buf, size + 1, size, pos); in profile_remove() 502 data->data[size] = 0; in profile_remove() 730 out += data->size; in query_data() 823 ssize_t size; member 860 new->size = n; in multi_transaction_set() 902 ret = simple_read_from_buffer(buf, size, pos, t->data, t->size); in multi_transaction_read() 1178 if (label->size > 1) { in seq_ns_nsstacked_show() 1400 loaddata->size); in rawdata_open() [all …]
|
| /security/selinux/ss/ |
| A D | hashtab.c | 35 u32 size = hashtab_compute_size(nel_hint); in hashtab_init() local 39 h->size = 0; in hashtab_init() 42 if (size) { in hashtab_init() 43 h->htable = kcalloc(size, sizeof(*h->htable), in hashtab_init() 47 h->size = size; in hashtab_init() 74 for (i = 0; i < h->size; i++) { in hashtab_destroy() 95 for (i = 0; i < h->size; i++) { in hashtab_map() 117 for (i = 0; i < h->size; i++) { in hashtab_stat() 156 new->size = orig->size; in hashtab_duplicate() 158 for (i = 0; i < orig->size; i++) { in hashtab_duplicate() [all …]
|
| A D | hashtab.h | 34 u32 size; /* number of slots in hash table */ member 70 if (!h->size || h->nel == HASHTAB_MAX_NODES) in hashtab_insert() 73 hvalue = key_params.hash(key) & (h->size - 1); in hashtab_insert() 103 if (!h->size) in hashtab_search() 106 hvalue = key_params.hash(key) & (h->size - 1); in hashtab_search()
|
| /security/integrity/platform_certs/ |
| A D | efi_parser.c | 39 const void *data, size_t size, in parse_efi_signature_list() argument 45 pr_devel("-->%s(,%zu)\n", __func__, size); in parse_efi_signature_list() 47 while (size > 0) { in parse_efi_signature_list() 52 if (size < sizeof(list)) in parse_efi_signature_list() 66 if (lsize > size) { in parse_efi_signature_list() 84 size -= lsize; in parse_efi_signature_list() 90 size -= sizeof(list) + hsize; in parse_efi_signature_list() 102 size -= esize; in parse_efi_signature_list()
|
| A D | load_powerpc.c | 18 #define extract_esl(db, data, size, offset) \ argument 19 do { db = data + offset; size = size - offset; } while (0) 29 static __init void *get_cert_list(u8 *key, unsigned long keylen, u64 *size) in get_cert_list() argument 34 rc = secvar_ops->get(key, keylen, NULL, size); in get_cert_list() 41 db = kmalloc(*size, GFP_KERNEL); in get_cert_list() 45 rc = secvar_ops->get(key, keylen, db, size); in get_cert_list()
|
| A D | load_uefi.c | 55 unsigned long size = sizeof(db); in uefi_check_ignore_db() local 58 status = efi.get_variable(L"MokIgnoreDB", &guid, NULL, &size, &db); in uefi_check_ignore_db() 66 unsigned long *size, efi_status_t *status) in get_cert_list() argument 92 *size = lsize; in get_cert_list()
|
| /security/ |
| A D | lsm_syscalls.c | 56 ctx, u32, size, u32, flags) in SYSCALL_DEFINE4() argument 58 return security_setselfattr(attr, ctx, size, flags); in SYSCALL_DEFINE4() 78 ctx, u32 __user *, size, u32, flags) in SYSCALL_DEFINE4() argument 80 return security_getselfattr(attr, ctx, size, flags); in SYSCALL_DEFINE4() 96 SYSCALL_DEFINE3(lsm_list_modules, u64 __user *, ids, u32 __user *, size, in SYSCALL_DEFINE3() argument 106 if (get_user(usize, size)) in SYSCALL_DEFINE3() 109 if (put_user(total_size, size) != 0) in SYSCALL_DEFINE3()
|
| A D | commoncap.c | 414 int size; in cap_inode_getsecurity() local 446 size = -EINVAL; in cap_inode_getsecurity() 465 size = -ENOMEM; in cap_inode_getsecurity() 496 size = -ENOMEM; in cap_inode_getsecurity() 513 return size; in cap_inode_getsecurity() 537 return is_v2header(size, cap) || is_v3header(size, cap); in validheader() 582 return size; in cap_convert_nscap() 671 int size; in get_vfs_caps_from_disk() local 686 if (size == -ENODATA || size == -EOPNOTSUPP) in get_vfs_caps_from_disk() 690 if (size < 0) in get_vfs_caps_from_disk() [all …]
|
| /security/integrity/ima/ |
| A D | ima_queue.c | 83 int size = 0; in get_binary_runtime_size() local 85 size += sizeof(u32); /* pcr */ in get_binary_runtime_size() 86 size += TPM_DIGEST_SIZE; in get_binary_runtime_size() 87 size += sizeof(int); /* template name size field */ in get_binary_runtime_size() 88 size += strlen(entry->template_desc->name); in get_binary_runtime_size() 89 size += sizeof(entry->template_data_len); in get_binary_runtime_size() 90 size += entry->template_data_len; in get_binary_runtime_size() 91 return size; in get_binary_runtime_size() 123 int size; in ima_add_digest_entry() local 125 size = get_binary_runtime_size(entry); in ima_add_digest_entry() [all …]
|
| A D | ima_main.c | 237 struct lsm_prop *prop, char *buf, loff_t size, in process_measurement() argument 395 rc = ima_read_modsig(func, buf, size, &modsig); in process_measurement() 888 if (!file || !buf || size == 0) { /* should never happen */ in ima_post_read_file() 966 static int ima_post_load_data(char *buf, loff_t size, in ima_post_load_data() argument 984 buf, size, true, NULL, 0); in ima_post_load_data() 1010 struct inode *inode, const void *buf, int size, in process_buffer_measurement() argument 1022 .buf_len = size}; in process_buffer_measurement() 1069 ret = ima_calc_buffer_hash(buf, size, iint.ima_hash); in process_buffer_measurement() 1124 void ima_kexec_cmdline(int kernel_fd, const void *buf, int size) in ima_kexec_cmdline() argument 1126 if (!buf || !size) in ima_kexec_cmdline() [all …]
|
| /security/ipe/ |
| A D | hooks.c | 213 size_t size) in ipe_set_dmverity_signature() argument 215 blob->dm_verity_signed = size > 0 && value; in ipe_set_dmverity_signature() 220 size_t size) in ipe_set_dmverity_signature() argument 239 const void *value, size_t size) in ipe_bdev_setintegrity() argument 246 ipe_set_dmverity_signature(blob, value, size); in ipe_bdev_setintegrity() 303 const void *value, size_t size) in ipe_inode_setintegrity() argument 308 inode_sec->fs_verity_signed = size > 0 && value; in ipe_inode_setintegrity()
|
| /security/apparmor/include/ |
| A D | lib.h | 123 int size; member 141 char *aa_str_alloc(int size, gfp_t gfp); 259 if ((L)->size > 1) { \ 265 if (vec_setup(label, __lvec, (L)->size, (GFP))) { \ 277 for (__j = __count = 0; __j < (L)->size; __j++) \ 278 __count += __lvec[__j]->size; \ 280 for (__j = __k = 0; __j < (L)->size; __j++) { \ 297 vec_cleanup(label, __lvec, (L)->size); \
|
| A D | policy_unpack.h | 106 size_t size; /* the original size of the payload */ member 161 struct aa_loaddata *aa_loaddata_alloc(size_t size); 169 bool aa_inbounds(struct aa_ext *e, size_t size); 175 bool aa_unpack_array(struct aa_ext *e, const char *name, u16 *size);
|
| /security/keys/trusted-keys/ |
| A D | trusted_tee.c | 86 param[0].u.memref.size = p->key_len; in trusted_tee_seal() 90 param[1].u.memref.size = sizeof(p->blob); in trusted_tee_seal() 99 p->blob_len = param[1].u.memref.size; in trusted_tee_seal() 133 param[0].u.memref.size = p->blob_len; in trusted_tee_unseal() 137 param[1].u.memref.size = sizeof(p->key); in trusted_tee_unseal() 146 p->key_len = param[1].u.memref.size; in trusted_tee_unseal() 179 param[0].u.memref.size = key_len; in trusted_tee_get_random() 188 ret = param[0].u.memref.size; in trusted_tee_get_random()
|
| /security/selinux/ |
| A D | netport.c | 39 int size; member 106 if (sel_netport_hash[idx].size == SEL_NETPORT_HASH_BKT_LIMIT) { in sel_netport_insert() 116 sel_netport_hash[idx].size++; in sel_netport_insert() 216 sel_netport_hash[idx].size = 0; in sel_netport_flush() 230 sel_netport_hash[iter].size = 0; in sel_netport_init()
|
| A D | ibpkey.c | 33 int size; member 102 if (sel_ib_pkey_hash[idx].size == SEL_PKEY_HASH_BKT_LIMIT) { in sel_ib_pkey_insert() 113 sel_ib_pkey_hash[idx].size++; in sel_ib_pkey_insert() 216 sel_ib_pkey_hash[idx].size = 0; in sel_ib_pkey_flush() 230 sel_ib_pkey_hash[iter].size = 0; in sel_ib_pkey_init()
|
| A D | netnode.c | 40 unsigned int size; member 164 if (sel_netnode_hash[idx].size == SEL_NETNODE_HASH_BKT_LIMIT) { in sel_netnode_insert() 174 sel_netnode_hash[idx].size++; in sel_netnode_insert() 288 sel_netnode_hash[idx].size = 0; in sel_netnode_flush() 302 sel_netnode_hash[iter].size = 0; in sel_netnode_init()
|
| /security/integrity/ |
| A D | digsig.c | 169 off_t size, key_perm_t perm) in integrity_add_key() argument 178 NULL, data, size, perm, in integrity_add_key() 197 size_t size; in integrity_load_x509() local 207 size = rc; in integrity_load_x509() 212 rc = integrity_add_key(id, (const void *)data, size, perm); in integrity_load_x509()
|
| /security/integrity/evm/ |
| A D | evm_crypto.c | 233 int size, user_space_size; in evm_calc_hmac_or_hash() local 274 size = vfs_getxattr_alloc(&nop_mnt_idmap, dentry, xattr->name, in evm_calc_hmac_or_hash() 276 if (size == -ENOMEM) { in evm_calc_hmac_or_hash() 280 if (size < 0) in evm_calc_hmac_or_hash() 285 if (user_space_size != size) in evm_calc_hmac_or_hash() 287 dentry->d_name.name, xattr->name, size, in evm_calc_hmac_or_hash() 290 xattr_size = size; in evm_calc_hmac_or_hash()
|
| /security/tomoyo/ |
| A D | memory.c | 74 void *tomoyo_commit_ok(void *data, const unsigned int size) in tomoyo_commit_ok() argument 76 void *ptr = kzalloc(size, GFP_NOFS | __GFP_NOWARN); in tomoyo_commit_ok() 79 memmove(ptr, data, size); in tomoyo_commit_ok() 80 memset(data, 0, size); in tomoyo_commit_ok()
|