/security/keys/ |
D | big_key.c | 58 struct path *path = (struct path *)&prep->payload.data[big_key_path]; in big_key_preparse() 66 if (datalen <= 0 || datalen > 1024 * 1024 || !prep->data) in big_key_preparse() 72 prep->payload.data[big_key_len] = (void *)(unsigned long)datalen; in big_key_preparse() 99 chacha20poly1305_encrypt(buf, prep->data, datalen, NULL, 0, in big_key_preparse() 120 prep->payload.data[big_key_data] = enckey; in big_key_preparse() 127 void *data = kmalloc(datalen, GFP_KERNEL); in big_key_preparse() local 129 if (!data) in big_key_preparse() 132 prep->payload.data[big_key_data] = data; in big_key_preparse() 133 memcpy(data, prep->data, prep->datalen); in big_key_preparse() 152 struct path *path = (struct path *)&prep->payload.data[big_key_path]; in big_key_free_preparse() [all …]
|
D | sysctl.c | 15 .data = &key_quota_maxkeys, 24 .data = &key_quota_maxbytes, 33 .data = &key_quota_root_maxkeys, 42 .data = &key_quota_root_maxbytes, 51 .data = &key_gc_delay, 61 .data = &persistent_keyring_expiry,
|
D | user_defined.c | 64 if (datalen <= 0 || datalen > 32767 || !prep->data) in user_preparse() 73 prep->payload.data[0] = upayload; in user_preparse() 75 memcpy(upayload->data, prep->data, datalen); in user_preparse() 85 kfree_sensitive(prep->payload.data[0]); in user_free_preparse() 115 rcu_assign_keypointer(key, prep->payload.data[0]); in user_update() 116 prep->payload.data[0] = NULL; in user_update() 148 struct user_key_payload *upayload = key->payload.data[0]; in user_destroy() 184 memcpy(buffer, upayload->data, buflen); in user_read()
|
/security/apparmor/include/ |
D | policy_unpack.h | 75 char *data; member 91 __aa_get_loaddata(struct aa_loaddata *data) in __aa_get_loaddata() argument 93 if (data && kref_get_unless_zero(&(data->count))) in __aa_get_loaddata() 94 return data; in __aa_get_loaddata() 108 aa_get_loaddata(struct aa_loaddata *data) in aa_get_loaddata() argument 110 struct aa_loaddata *tmp = __aa_get_loaddata(data); in aa_get_loaddata() 112 AA_BUG(data && !tmp); in aa_get_loaddata() 117 void __aa_loaddata_update(struct aa_loaddata *data, long revision); 121 static inline void aa_put_loaddata(struct aa_loaddata *data) in aa_put_loaddata() argument 123 if (data) in aa_put_loaddata() [all …]
|
/security/apparmor/ |
D | policy_unpack.c | 124 void __aa_loaddata_update(struct aa_loaddata *data, long revision) in __aa_loaddata_update() argument 126 AA_BUG(!data); in __aa_loaddata_update() 127 AA_BUG(!data->ns); in __aa_loaddata_update() 128 AA_BUG(!data->dents[AAFS_LOADDATA_REVISION]); in __aa_loaddata_update() 129 AA_BUG(!mutex_is_locked(&data->ns->lock)); in __aa_loaddata_update() 130 AA_BUG(data->revision > revision); in __aa_loaddata_update() 132 data->revision = revision; in __aa_loaddata_update() 133 d_inode(data->dents[AAFS_LOADDATA_DIR])->i_mtime = in __aa_loaddata_update() 134 current_time(d_inode(data->dents[AAFS_LOADDATA_DIR])); in __aa_loaddata_update() 135 d_inode(data->dents[AAFS_LOADDATA_REVISION])->i_mtime = in __aa_loaddata_update() [all …]
|
D | apparmorfs.c | 212 umode_t mode, void *data, char *link, in __aafs_setup_d_inode() argument 227 inode->i_private = data; in __aafs_setup_d_inode() 262 struct dentry *parent, void *data, void *link, in aafs_create() argument 294 error = __aafs_setup_d_inode(dir, dentry, mode, data, link, fops, iops); in aafs_create() 323 struct dentry *parent, void *data, in aafs_create_file() argument 326 return aafs_create(name, mode, parent, data, NULL, fops, NULL); in aafs_create_file() 389 struct aa_loaddata *data; in aa_simple_write_to_buffer() local 398 data = aa_loaddata_alloc(alloc_size); in aa_simple_write_to_buffer() 399 if (IS_ERR(data)) in aa_simple_write_to_buffer() 400 return data; in aa_simple_write_to_buffer() [all …]
|
D | mount.c | 107 if (aad(sa)->mnt.data) { in audit_cb() 109 audit_log_untrustedstring(ab, aad(sa)->mnt.data); in audit_cb() 133 unsigned long flags, const void *data, u32 request, in audit_mount() argument 173 if (data && (perms->audit & AA_AUDIT_DATA)) in audit_mount() 174 aad(&sa)->mnt.data = data; in audit_mount() 243 void *data, bool binary, struct aa_perms *perms) in do_match_mnt() argument 275 if (data && !binary && (perms->allow & AA_MNT_CONT_MATCH)) { in do_match_mnt() 280 state = aa_dfa_match(dfa, state, data); in do_match_mnt() 319 unsigned long flags, void *data, bool binary, in match_mnt_path_str() argument 347 mntpnt, devname, type, flags, data, binary, &perms); in match_mnt_path_str() [all …]
|
D | policy_unpack_test.c | 442 u32 data; in policy_unpack_test_unpack_u32_with_null_name() local 446 success = unpack_u32(puf->e, &data, NULL); in policy_unpack_test_unpack_u32_with_null_name() 449 KUNIT_EXPECT_EQ(test, data, TEST_U32_DATA); in policy_unpack_test_unpack_u32_with_null_name() 459 u32 data; in policy_unpack_test_unpack_u32_with_name() local 463 success = unpack_u32(puf->e, &data, name); in policy_unpack_test_unpack_u32_with_name() 466 KUNIT_EXPECT_EQ(test, data, TEST_U32_DATA); in policy_unpack_test_unpack_u32_with_name() 476 u32 data; in policy_unpack_test_unpack_u32_out_of_bounds() local 481 success = unpack_u32(puf->e, &data, name); in policy_unpack_test_unpack_u32_out_of_bounds() 492 u64 data; in policy_unpack_test_unpack_u64_with_null_name() local 496 success = unpack_u64(puf->e, &data, NULL); in policy_unpack_test_unpack_u64_with_null_name() [all …]
|
/security/integrity/platform_certs/ |
D | keyring_handler.c | 21 static __init void uefi_blacklist_hash(const char *source, const void *data, in uefi_blacklist_hash() argument 32 bin2hex(p, data, len); in uefi_blacklist_hash() 44 const void *data, size_t len) in uefi_blacklist_x509_tbs() argument 46 uefi_blacklist_hash(source, data, len, "tbs:", 4); in uefi_blacklist_x509_tbs() 53 const void *data, size_t len) in uefi_blacklist_binary() argument 55 uefi_blacklist_hash(source, data, len, "bin:", 4); in uefi_blacklist_binary() 62 const void *data, size_t len) in uefi_revocation_list_x509() argument 64 add_key_to_revocation_list(data, len); in uefi_revocation_list_x509()
|
D | efi_parser.c | 39 const void *data, size_t size, in parse_efi_signature_list() argument 55 memcpy(&list, data, sizeof(list)); in parse_efi_signature_list() 83 data += lsize; in parse_efi_signature_list() 89 data += sizeof(list) + hsize; in parse_efi_signature_list() 94 elem = data; in parse_efi_signature_list() 101 data += esize; in parse_efi_signature_list()
|
D | keyring_handler.h | 8 void blacklist_hash(const char *source, const void *data, 15 void blacklist_x509_tbs(const char *source, const void *data, size_t len); 20 void blacklist_binary(const char *source, const void *data, size_t len);
|
/security/smack/ |
D | smackfs.c | 367 static int smk_parse_rule(const char *data, struct smack_parsed_rule *rule, in smk_parse_rule() argument 372 rc = smk_fill_rule(data, data + SMK_LABELLEN, in smk_parse_rule() 373 data + SMK_LABELLEN + SMK_LABELLEN, NULL, rule, in smk_parse_rule() 387 static ssize_t smk_parse_long_rule(char *data, struct smack_parsed_rule *rule, in smk_parse_long_rule() argument 399 while (isspace(data[cnt])) in smk_parse_long_rule() 400 data[cnt++] = '\0'; in smk_parse_long_rule() 402 if (data[cnt] == '\0') in smk_parse_long_rule() 406 tok[i] = data + cnt; in smk_parse_long_rule() 408 while (data[cnt] && !isspace(data[cnt])) in smk_parse_long_rule() 411 while (isspace(data[cnt])) in smk_parse_long_rule() [all …]
|
/security/integrity/ |
D | digsig.c | 152 static int __init integrity_add_key(const unsigned int id, const void *data, in integrity_add_key() argument 162 NULL, data, size, perm, in integrity_add_key() 179 void *data = NULL; in integrity_load_x509() local 184 rc = kernel_read_file_from_path(path, 0, &data, INT_MAX, NULL, in integrity_load_x509() 195 rc = integrity_add_key(id, (const void *)data, size, perm); in integrity_load_x509() 197 vfree(data); in integrity_load_x509() 202 const void *data, size_t len, key_perm_t perm) in integrity_load_cert() argument 204 if (!data) in integrity_load_cert() 208 return integrity_add_key(id, data, len, perm); in integrity_load_cert()
|
D | integrity.h | 85 u8 data[]; member 90 struct evm_ima_xattr_data data; member 108 u8 data[2]; member 171 const void *data, size_t len, key_perm_t perm); 194 const void *data, size_t len, in integrity_load_cert() argument 203 int siglen, const char *data, int datalen); 206 int siglen, const char *data, int datalen) in asymmetric_verify() argument 280 void __init add_to_platform_keyring(const char *source, const void *data, 284 const void *data, size_t len) in add_to_platform_keyring() argument
|
/security/integrity/evm/ |
D | evm_crypto.c | 214 uint8_t type, struct evm_digest *data) in evm_calc_hmac_or_hash() argument 229 desc = init_desc(type, data->hdr.algo); in evm_calc_hmac_or_hash() 233 data->hdr.length = crypto_shash_digestsize(desc->tfm); in evm_calc_hmac_or_hash() 296 hmac_add_misc(desc, inode, type, data->digest); in evm_calc_hmac_or_hash() 309 struct evm_digest *data) in evm_calc_hmac() argument 312 req_xattr_value_len, EVM_XATTR_HMAC, data); in evm_calc_hmac() 317 char type, struct evm_digest *data) in evm_calc_hash() argument 320 req_xattr_value_len, type, data); in evm_calc_hash() 360 struct evm_digest data; in evm_update_evmxattr() local 373 data.hdr.algo = HASH_ALGO_SHA1; in evm_update_evmxattr() [all …]
|
/security/tomoyo/ |
D | securityfs_if.c | 44 char *data; in tomoyo_write_self() local 49 data = memdup_user_nul(buf, count); in tomoyo_write_self() 50 if (IS_ERR(data)) in tomoyo_write_self() 51 return PTR_ERR(data); in tomoyo_write_self() 52 tomoyo_normalize_line(data); in tomoyo_write_self() 53 if (tomoyo_correct_domain(data)) { in tomoyo_write_self() 58 name.name = data; in tomoyo_write_self() 69 tomoyo_assign_domain(data, true); in tomoyo_write_self() 86 kfree(data); in tomoyo_write_self()
|
D | environ.c | 98 const char *data = tomoyo_read_token(param); in tomoyo_write_env() local 100 if (!tomoyo_correct_word(data) || strchr(data, '=')) in tomoyo_write_env() 102 e.env = tomoyo_get_name(data); in tomoyo_write_env() 120 if (tomoyo_str_starts(¶m->data, "env ")) in tomoyo_write_misc()
|
D | common.c | 676 char *data = head->write_buf; in tomoyo_write_profile() local 681 if (sscanf(data, "PROFILE_VERSION=%u", &head->w.ns->profile_version) in tomoyo_write_profile() 684 i = simple_strtoul(data, &cp, 10); in tomoyo_write_profile() 687 data = cp + 1; in tomoyo_write_profile() 691 cp = strchr(data, '='); in tomoyo_write_profile() 695 if (!strcmp(data, "COMMENT")) { in tomoyo_write_profile() 710 if (!strcmp(data, "PREFERENCE")) { in tomoyo_write_profile() 716 return tomoyo_set_mode(data, cp, profile); in tomoyo_write_profile() 895 char *data = head->write_buf; in tomoyo_write_manager() local 897 if (!strcmp(data, "manage_by_non_root")) { in tomoyo_write_manager() [all …]
|
D | util.c | 135 char *pos = param->data; in tomoyo_read_token() 142 param->data = del; in tomoyo_read_token() 158 char *start = param->data; in tomoyo_get_domainname() 168 param->data = pos; in tomoyo_get_domainname() 252 if (param->data[0] == '@') { in tomoyo_parse_name_union() 253 param->data++; in tomoyo_parse_name_union() 275 char *data; in tomoyo_parse_number_union() local 280 if (param->data[0] == '@') { in tomoyo_parse_number_union() 281 param->data++; in tomoyo_parse_number_union() 285 data = tomoyo_read_token(param); in tomoyo_parse_number_union() [all …]
|
/security/keys/trusted-keys/ |
D | trusted_tpm1.c | 51 static int TSS_sha1(const unsigned char *data, unsigned int datalen, in TSS_sha1() argument 63 ret = crypto_shash_digest(&sdesc->shash, data, datalen, digest); in TSS_sha1() 74 unsigned char *data; in TSS_rawhmac() local 95 data = va_arg(argp, unsigned char *); in TSS_rawhmac() 96 if (data == NULL) { in TSS_rawhmac() 100 ret = crypto_shash_update(&sdesc->shash, data, dlen); in TSS_rawhmac() 122 unsigned char *data; in TSS_authhmac() local 145 data = va_arg(argp, unsigned char *); in TSS_authhmac() 146 if (!data) { in TSS_authhmac() 150 ret = crypto_shash_update(&sdesc->shash, data, dlen); in TSS_authhmac() [all …]
|
D | trusted_tpm2.c | 315 blob_len = be32_to_cpup((__be32 *) &buf.data[TPM_HEADER_SIZE]); in tpm2_seal_trusted() 326 &buf.data[TPM_HEADER_SIZE + 4], in tpm2_seal_trusted() 433 (__be32 *) &buf.data[TPM_HEADER_SIZE]); in tpm2_load_cmd() 465 u8 *data; in tpm2_unseal_cmd() local 487 (__be16 *) &buf.data[TPM_HEADER_SIZE + 4]); in tpm2_unseal_cmd() 497 data = &buf.data[TPM_HEADER_SIZE + 6]; in tpm2_unseal_cmd() 501 memcpy(payload->key, data, data_len - 1); in tpm2_unseal_cmd() 503 payload->migratable = data[data_len - 1]; in tpm2_unseal_cmd() 509 memcpy(payload->key, data, data_len); in tpm2_unseal_cmd()
|
/security/integrity/ima/ |
D | ima_fs.c | 113 void ima_putc(struct seq_file *m, void *data, int datalen) in ima_putc() argument 116 seq_putc(m, *(char *)data++); in ima_putc() 276 void *data = NULL; in ima_read_policy() local 287 rc = kernel_read_file_from_path(path, 0, &data, INT_MAX, NULL, in ima_read_policy() 296 datap = data; in ima_read_policy() 305 vfree(data); in ima_read_policy() 317 char *data; in ima_write_policy() local 328 data = memdup_user_nul(buf, datalen); in ima_write_policy() 329 if (IS_ERR(data)) { in ima_write_policy() 330 result = PTR_ERR(data); in ima_write_policy() [all …]
|
D | ima_template_lib.c | 32 static int ima_write_template_field_data(const void *data, const u32 datalen, in ima_write_template_field_data() argument 46 memcpy(buf, data, datalen); in ima_write_template_field_data() 61 field_data->data = buf; in ima_write_template_field_data() 71 u8 *buf_ptr = field_data->data; in ima_show_template_data_ascii() 76 buf_ptr = strnchr(field_data->data, buflen, ':'); in ima_show_template_data_ascii() 77 if (buf_ptr != field_data->data) in ima_show_template_data_ascii() 78 seq_printf(m, "%s", field_data->data); in ima_show_template_data_ascii() 82 buflen -= buf_ptr - field_data->data; in ima_show_template_data_ascii() 134 strlen(field_data->data) : field_data->len; in ima_show_template_data_binary() 146 ima_putc(m, field_data->data, len); in ima_show_template_data_binary() [all …]
|
D | ima_template.c | 388 u8 *data = field_data->data; in ima_restore_template_data() local 390 (*entry)->template_data[i].data = in ima_restore_template_data() 392 if (!(*entry)->template_data[i].data) { in ima_restore_template_data() 396 memcpy((*entry)->template_data[i].data, data, field_data->len); in ima_restore_template_data() 474 memcpy(template_name, hdr[HDR_TEMPLATE_NAME].data, in ima_restore_measurement_list() 507 hdr[HDR_TEMPLATE_DATA].data, in ima_restore_measurement_list() 513 if (memcmp(hdr[HDR_DIGEST].data, zero, sizeof(zero))) { in ima_restore_measurement_list() 524 entry->pcr = !ima_canonical_fmt ? *(u32 *)(hdr[HDR_PCR].data) : in ima_restore_measurement_list() 525 le32_to_cpu(*(__le32 *)(hdr[HDR_PCR].data)); in ima_restore_measurement_list()
|
/security/selinux/ |
D | netlink.c | 43 static void selnl_add_payload(struct nlmsghdr *nlh, int len, int msgtype, void *data) in selnl_add_payload() argument 50 msg->val = *((int *)data); in selnl_add_payload() 58 msg->seqno = *((u32 *)data); in selnl_add_payload() 67 static void selnl_notify(int msgtype, void *data) in selnl_notify() argument 84 selnl_add_payload(nlh, len, msgtype, data); in selnl_notify()
|