/security/apparmor/include/ |
D | policy_unpack.h | 69 char *data; member 85 __aa_get_loaddata(struct aa_loaddata *data) in __aa_get_loaddata() argument 87 if (data && kref_get_unless_zero(&(data->count))) in __aa_get_loaddata() 88 return data; in __aa_get_loaddata() 102 aa_get_loaddata(struct aa_loaddata *data) in aa_get_loaddata() argument 104 struct aa_loaddata *tmp = __aa_get_loaddata(data); in aa_get_loaddata() 106 AA_BUG(data && !tmp); in aa_get_loaddata() 111 void __aa_loaddata_update(struct aa_loaddata *data, long revision); 115 static inline void aa_put_loaddata(struct aa_loaddata *data) in aa_put_loaddata() argument 117 if (data) in aa_put_loaddata() [all …]
|
/security/apparmor/ |
D | policy_unpack.c | 123 void __aa_loaddata_update(struct aa_loaddata *data, long revision) in __aa_loaddata_update() argument 125 AA_BUG(!data); in __aa_loaddata_update() 126 AA_BUG(!data->ns); in __aa_loaddata_update() 127 AA_BUG(!data->dents[AAFS_LOADDATA_REVISION]); in __aa_loaddata_update() 128 AA_BUG(!mutex_is_locked(&data->ns->lock)); in __aa_loaddata_update() 129 AA_BUG(data->revision > revision); in __aa_loaddata_update() 131 data->revision = revision; in __aa_loaddata_update() 132 d_inode(data->dents[AAFS_LOADDATA_DIR])->i_mtime = in __aa_loaddata_update() 133 current_time(d_inode(data->dents[AAFS_LOADDATA_DIR])); in __aa_loaddata_update() 134 d_inode(data->dents[AAFS_LOADDATA_REVISION])->i_mtime = in __aa_loaddata_update() [all …]
|
D | apparmorfs.c | 182 umode_t mode, void *data, char *link, in __aafs_setup_d_inode() argument 197 inode->i_private = data; in __aafs_setup_d_inode() 232 struct dentry *parent, void *data, void *link, in aafs_create() argument 264 error = __aafs_setup_d_inode(dir, dentry, mode, data, link, fops, iops); in aafs_create() 293 struct dentry *parent, void *data, in aafs_create_file() argument 296 return aafs_create(name, mode, parent, data, NULL, fops, NULL); in aafs_create_file() 391 struct aa_loaddata *data; in aa_simple_write_to_buffer() local 400 data = aa_loaddata_alloc(alloc_size); in aa_simple_write_to_buffer() 401 if (IS_ERR(data)) in aa_simple_write_to_buffer() 402 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() 242 void *data, bool binary, struct aa_perms *perms) in do_match_mnt() argument 274 if (data && !binary && (perms->allow & AA_MNT_CONT_MATCH)) { in do_match_mnt() 279 state = aa_dfa_match(dfa, state, data); in do_match_mnt() 318 unsigned long flags, void *data, bool binary, in match_mnt_path_str() argument 346 mntpnt, devname, type, flags, data, binary, &perms); in match_mnt_path_str() [all …]
|
/security/keys/ |
D | big_key.c | 203 struct path *path = (struct path *)&prep->payload.data[big_key_path]; in big_key_preparse() 210 if (datalen <= 0 || datalen > 1024 * 1024 || !prep->data) in big_key_preparse() 216 prep->payload.data[big_key_len] = (void *)(unsigned long)datalen; in big_key_preparse() 229 memcpy(buf->virt, prep->data, datalen); in big_key_preparse() 264 prep->payload.data[big_key_data] = enckey; in big_key_preparse() 271 void *data = kmalloc(datalen, GFP_KERNEL); in big_key_preparse() local 273 if (!data) in big_key_preparse() 276 prep->payload.data[big_key_data] = data; in big_key_preparse() 277 memcpy(data, prep->data, prep->datalen); in big_key_preparse() 296 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 kzfree(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 if (copy_to_user(buffer, upayload->data, buflen) != 0) in user_read()
|
D | trusted.c | 58 static int TSS_sha1(const unsigned char *data, unsigned int datalen, in TSS_sha1() argument 70 ret = crypto_shash_digest(&sdesc->shash, data, datalen, digest); in TSS_sha1() 81 unsigned char *data; in TSS_rawhmac() local 102 data = va_arg(argp, unsigned char *); in TSS_rawhmac() 103 if (data == NULL) { in TSS_rawhmac() 107 ret = crypto_shash_update(&sdesc->shash, data, dlen); in TSS_rawhmac() 129 unsigned char *data; in TSS_authhmac() local 152 data = va_arg(argp, unsigned char *); in TSS_authhmac() 153 if (!data) { in TSS_authhmac() 157 ret = crypto_shash_update(&sdesc->shash, data, dlen); in TSS_authhmac() [all …]
|
D | key.c | 495 const void *data, in key_instantiate_and_link() argument 505 prep.data = data; in key_instantiate_and_link() 852 prep.data = payload; in key_create_or_update() 1003 prep.data = payload; in key_update() 1105 rcu_assign_keypointer(key, prep->payload.data[0]); in generic_key_instantiate() 1106 key->payload.data[1] = prep->payload.data[1]; in generic_key_instantiate() 1107 key->payload.data[2] = prep->payload.data[2]; in generic_key_instantiate() 1108 key->payload.data[3] = prep->payload.data[3]; in generic_key_instantiate() 1109 prep->payload.data[0] = NULL; in generic_key_instantiate() 1110 prep->payload.data[1] = NULL; in generic_key_instantiate() [all …]
|
/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/evm/ |
D | evm_crypto.c | 190 uint8_t type, struct evm_digest *data) in evm_calc_hmac_or_hash() argument 205 desc = init_desc(type, data->hdr.algo); in evm_calc_hmac_or_hash() 209 data->hdr.length = crypto_shash_digestsize(desc->tfm); in evm_calc_hmac_or_hash() 242 hmac_add_misc(desc, inode, type, data->digest); in evm_calc_hmac_or_hash() 255 struct evm_digest *data) in evm_calc_hmac() argument 258 req_xattr_value_len, EVM_XATTR_HMAC, data); in evm_calc_hmac() 263 char type, struct evm_digest *data) in evm_calc_hash() argument 266 req_xattr_value_len, type, data); in evm_calc_hash() 306 struct evm_digest data; in evm_update_evmxattr() local 319 data.hdr.algo = HASH_ALGO_SHA1; in evm_update_evmxattr() [all …]
|
/security/integrity/ |
D | digsig.c | 147 int __init integrity_add_key(const unsigned int id, const void *data, in integrity_add_key() argument 157 NULL, data, size, perm, in integrity_add_key() 174 void *data; in integrity_load_x509() local 179 rc = kernel_read_file_from_path(path, &data, &size, 0, in integrity_load_x509() 189 rc = integrity_add_key(id, (const void *)data, size, perm); in integrity_load_x509() 191 vfree(data); in integrity_load_x509() 196 const void *data, size_t len, key_perm_t perm) in integrity_load_cert() argument 198 if (!data) in integrity_load_cert() 202 return integrity_add_key(id, data, len, perm); in integrity_load_cert()
|
D | integrity.h | 78 u8 data[]; member 83 struct evm_ima_xattr_data data; member 101 u8 data[2]; member 162 const void *data, size_t len, key_perm_t perm); 185 const void *data, size_t len, in integrity_load_cert() argument 194 int siglen, const char *data, int datalen); 197 int siglen, const char *data, int datalen) in asymmetric_verify() argument 258 void __init add_to_platform_keyring(const char *source, const void *data, 262 const void *data, size_t len) in add_to_platform_keyring() argument
|
/security/integrity/platform_certs/ |
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 | load_uefi.c | 73 static __init void uefi_blacklist_hash(const char *source, const void *data, in uefi_blacklist_hash() argument 84 bin2hex(p, data, len); in uefi_blacklist_hash() 96 const void *data, size_t len) in uefi_blacklist_x509_tbs() argument 98 uefi_blacklist_hash(source, data, len, "tbs:", 4); in uefi_blacklist_x509_tbs() 105 const void *data, size_t len) in uefi_blacklist_binary() argument 107 uefi_blacklist_hash(source, data, len, "bin:", 4); in uefi_blacklist_binary()
|
/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() 156 char *start = param->data; in tomoyo_get_domainname() 166 param->data = pos; in tomoyo_get_domainname() 250 if (param->data[0] == '@') { in tomoyo_parse_name_union() 251 param->data++; in tomoyo_parse_name_union() 273 char *data; in tomoyo_parse_number_union() local 278 if (param->data[0] == '@') { in tomoyo_parse_number_union() 279 param->data++; in tomoyo_parse_number_union() 283 data = tomoyo_read_token(param); in tomoyo_parse_number_union() [all …]
|
/security/integrity/ima/ |
D | ima_template_lib.c | 31 static int ima_write_template_field_data(const void *data, const u32 datalen, in ima_write_template_field_data() argument 45 memcpy(buf, data, datalen); in ima_write_template_field_data() 60 field_data->data = buf; in ima_write_template_field_data() 70 u8 *buf_ptr = field_data->data; in ima_show_template_data_ascii() 75 buf_ptr = strnchr(field_data->data, buflen, ':'); in ima_show_template_data_ascii() 76 if (buf_ptr != field_data->data) in ima_show_template_data_ascii() 77 seq_printf(m, "%s", field_data->data); in ima_show_template_data_ascii() 81 buflen -= buf_ptr - field_data->data; in ima_show_template_data_ascii() 103 strlen(field_data->data) : field_data->len; in ima_show_template_data_binary() 114 ima_putc(m, field_data->data, len); in ima_show_template_data_binary() [all …]
|
D | ima_fs.c | 114 void ima_putc(struct seq_file *m, void *data, int datalen) in ima_putc() argument 117 seq_putc(m, *(char *)data++); in ima_putc() 277 void *data; in ima_read_policy() local 288 rc = kernel_read_file_from_path(path, &data, &size, 0, READING_POLICY); in ima_read_policy() 294 datap = data; in ima_read_policy() 303 vfree(data); in ima_read_policy() 315 char *data; in ima_write_policy() local 326 data = memdup_user_nul(buf, datalen); in ima_write_policy() 327 if (IS_ERR(data)) { in ima_write_policy() 328 result = PTR_ERR(data); in ima_write_policy() [all …]
|
D | ima_template.c | 326 u8 *data = field_data->data; in ima_restore_template_data() local 328 (*entry)->template_data[i].data = in ima_restore_template_data() 330 if (!(*entry)->template_data[i].data) { in ima_restore_template_data() 334 memcpy((*entry)->template_data[i].data, data, field_data->len); in ima_restore_template_data() 411 memcpy(template_name, hdr[HDR_TEMPLATE_NAME].data, in ima_restore_measurement_list() 444 hdr[HDR_TEMPLATE_DATA].data, in ima_restore_measurement_list() 450 memcpy(entry->digest, hdr[HDR_DIGEST].data, in ima_restore_measurement_list() 452 entry->pcr = !ima_canonical_fmt ? *(hdr[HDR_PCR].data) : in ima_restore_measurement_list() 453 le32_to_cpu(*(hdr[HDR_PCR].data)); in ima_restore_measurement_list()
|
/security/selinux/ss/ |
D | conditional.c | 270 struct cond_insertf_data *data = ptr; in cond_insertf() local 271 struct policydb *p = data->p; in cond_insertf() 272 struct cond_av_list *other = data->other, *list, *cur; in cond_insertf() 336 if (!data->head) in cond_insertf() 337 data->head = list; in cond_insertf() 339 data->tail->next = list; in cond_insertf() 340 data->tail = list; in cond_insertf() 344 cond_av_list_destroy(data->head); in cond_insertf() 345 data->head = NULL; in cond_insertf() 354 struct cond_insertf_data data; in cond_read_av_list() local [all …]
|
/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()
|
/security/ |
D | inode.c | 108 struct dentry *parent, void *data, in securityfs_create_dentry() argument 149 inode->i_private = data; in securityfs_create_dentry() 157 inode->i_link = data; in securityfs_create_dentry() 201 struct dentry *parent, void *data, in securityfs_create_file() argument 204 return securityfs_create_dentry(name, mode, parent, data, fops, NULL); in securityfs_create_file()
|