Home
last modified time | relevance | path

Searched refs:data (Results 1 – 25 of 84) sorted by relevance

1234

/security/apparmor/include/
Dpolicy_unpack.h114 char *data; member
130 __aa_get_loaddata(struct aa_loaddata *data) in __aa_get_loaddata() argument
132 if (data && kref_get_unless_zero(&(data->count))) in __aa_get_loaddata()
133 return data; in __aa_get_loaddata()
147 aa_get_loaddata(struct aa_loaddata *data) in aa_get_loaddata() argument
149 struct aa_loaddata *tmp = __aa_get_loaddata(data); in aa_get_loaddata()
151 AA_BUG(data && !tmp); in aa_get_loaddata()
156 void __aa_loaddata_update(struct aa_loaddata *data, long revision);
160 static inline void aa_put_loaddata(struct aa_loaddata *data) in aa_put_loaddata() argument
162 if (data) in aa_put_loaddata()
[all …]
/security/apparmor/
Dpolicy_unpack.c88 void __aa_loaddata_update(struct aa_loaddata *data, long revision) in __aa_loaddata_update() argument
90 AA_BUG(!data); in __aa_loaddata_update()
91 AA_BUG(!data->ns); in __aa_loaddata_update()
92 AA_BUG(!mutex_is_locked(&data->ns->lock)); in __aa_loaddata_update()
93 AA_BUG(data->revision > revision); in __aa_loaddata_update()
95 data->revision = revision; in __aa_loaddata_update()
96 if ((data->dents[AAFS_LOADDATA_REVISION])) { in __aa_loaddata_update()
97 d_inode(data->dents[AAFS_LOADDATA_DIR])->i_mtime = in __aa_loaddata_update()
98 current_time(d_inode(data->dents[AAFS_LOADDATA_DIR])); in __aa_loaddata_update()
99 d_inode(data->dents[AAFS_LOADDATA_REVISION])->i_mtime = in __aa_loaddata_update()
[all …]
Dapparmorfs.c215 umode_t mode, void *data, char *link, in __aafs_setup_d_inode() argument
230 inode->i_private = data; in __aafs_setup_d_inode()
265 struct dentry *parent, void *data, void *link, in aafs_create() argument
297 error = __aafs_setup_d_inode(dir, dentry, mode, data, link, fops, iops); in aafs_create()
326 struct dentry *parent, void *data, in aafs_create_file() argument
329 return aafs_create(name, mode, parent, data, NULL, fops, NULL); in aafs_create_file()
392 struct aa_loaddata *data; in aa_simple_write_to_buffer() local
401 data = aa_loaddata_alloc(alloc_size); in aa_simple_write_to_buffer()
402 if (IS_ERR(data)) in aa_simple_write_to_buffer()
403 return data; in aa_simple_write_to_buffer()
[all …]
Dmount.c107 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/
Dbig_key.c24 u8 *data; member
29 (struct big_key_payload *)((payload).data)
67 BUILD_BUG_ON(sizeof(*payload) != sizeof(prep->payload.data)); in big_key_preparse()
69 if (datalen <= 0 || datalen > 1024 * 1024 || !prep->data) in big_key_preparse()
102 chacha20poly1305_encrypt(buf, prep->data, datalen, NULL, 0, in big_key_preparse()
123 payload->data = enckey; in big_key_preparse()
130 void *data = kmalloc(datalen, GFP_KERNEL); in big_key_preparse() local
132 if (!data) in big_key_preparse()
135 payload->data = data; in big_key_preparse()
136 memcpy(data, prep->data, prep->datalen); in big_key_preparse()
[all …]
Dsysctl.c15 .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,
Duser_defined.c64 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/smack/
Dsmackfs.c368 static int smk_parse_rule(const char *data, struct smack_parsed_rule *rule, in smk_parse_rule() argument
373 rc = smk_fill_rule(data, data + SMK_LABELLEN, in smk_parse_rule()
374 data + SMK_LABELLEN + SMK_LABELLEN, NULL, rule, in smk_parse_rule()
388 static ssize_t smk_parse_long_rule(char *data, struct smack_parsed_rule *rule, in smk_parse_long_rule() argument
400 while (isspace(data[cnt])) in smk_parse_long_rule()
401 data[cnt++] = '\0'; in smk_parse_long_rule()
403 if (data[cnt] == '\0') in smk_parse_long_rule()
407 tok[i] = data + cnt; in smk_parse_long_rule()
409 while (data[cnt] && !isspace(data[cnt])) in smk_parse_long_rule()
412 while (isspace(data[cnt])) in smk_parse_long_rule()
[all …]
/security/integrity/platform_certs/
Dkeyring_handler.c23 const void *data, size_t len) in uefi_blacklist_x509_tbs() argument
25 mark_hash_blacklisted(data, len, BLACKLIST_HASH_X509_TBS); in uefi_blacklist_x509_tbs()
32 const void *data, size_t len) in uefi_blacklist_binary() argument
34 mark_hash_blacklisted(data, len, BLACKLIST_HASH_BINARY); in uefi_blacklist_binary()
41 const void *data, size_t len) in uefi_revocation_list_x509() argument
43 add_key_to_revocation_list(data, len); in uefi_revocation_list_x509()
Defi_parser.c39 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()
Dkeyring_handler.h8 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);
Dmachine_keyring.c26 void __init add_to_machine_keyring(const char *source, const void *data, size_t len) in add_to_machine_keyring() argument
32 rc = integrity_load_cert(INTEGRITY_KEYRING_MACHINE, source, data, len, perm); in add_to_machine_keyring()
41 data, len, perm); in add_to_machine_keyring()
/security/integrity/
Dintegrity.h88 u8 data[]; member
93 struct evm_ima_xattr_data data; member
111 u8 data[2]; member
205 const void *data, size_t len, key_perm_t perm);
228 const void *data, size_t len, in integrity_load_cert() argument
237 int siglen, const char *data, int datalen);
240 int siglen, const char *data, int datalen) in asymmetric_verify() argument
314 void __init add_to_platform_keyring(const char *source, const void *data,
318 const void *data, size_t len) in add_to_platform_keyring() argument
324 void __init add_to_machine_keyring(const char *source, const void *data, size_t len);
[all …]
Ddigsig.c164 static int __init integrity_add_key(const unsigned int id, const void *data, in integrity_add_key() argument
174 NULL, data, size, perm, in integrity_add_key()
191 void *data = NULL; in integrity_load_x509() local
196 rc = kernel_read_file_from_path(path, 0, &data, INT_MAX, NULL, in integrity_load_x509()
207 rc = integrity_add_key(id, (const void *)data, size, perm); in integrity_load_x509()
209 vfree(data); in integrity_load_x509()
214 const void *data, size_t len, key_perm_t perm) in integrity_load_cert() argument
216 if (!data) in integrity_load_cert()
220 return integrity_add_key(id, data, len, perm); in integrity_load_cert()
/security/integrity/evm/
Devm_crypto.c214 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/loadpin/
Dloadpin.c65 .data = &enforce,
272 void *data; in read_trusted_verity_root_digests() local
287 data = kzalloc(SZ_4K, GFP_KERNEL); in read_trusted_verity_root_digests()
288 if (!data) { in read_trusted_verity_root_digests()
293 rc = kernel_read_file(f.file, 0, (void **)&data, SZ_4K - 1, NULL, READING_POLICY); in read_trusted_verity_root_digests()
297 p = data; in read_trusted_verity_root_digests()
301 p = strim(data); in read_trusted_verity_root_digests()
306 if (d == data) { in read_trusted_verity_root_digests()
325 trd = kzalloc(struct_size(trd, data, len), GFP_KERNEL); in read_trusted_verity_root_digests()
331 if (hex2bin(trd->data, d, len)) { in read_trusted_verity_root_digests()
[all …]
/security/tomoyo/
Dsecurityfs_if.c44 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()
Denviron.c98 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(&param->data, "env ")) in tomoyo_write_misc()
Dcommon.c667 char *data = head->write_buf; in tomoyo_write_profile() local
672 if (sscanf(data, "PROFILE_VERSION=%u", &head->w.ns->profile_version) in tomoyo_write_profile()
675 i = simple_strtoul(data, &cp, 10); in tomoyo_write_profile()
678 data = cp + 1; in tomoyo_write_profile()
682 cp = strchr(data, '='); in tomoyo_write_profile()
686 if (!strcmp(data, "COMMENT")) { in tomoyo_write_profile()
701 if (!strcmp(data, "PREFERENCE")) { in tomoyo_write_profile()
707 return tomoyo_set_mode(data, cp, profile); in tomoyo_write_profile()
886 char *data = head->write_buf; in tomoyo_write_manager() local
888 if (!strcmp(data, "manage_by_non_root")) { in tomoyo_write_manager()
[all …]
Dutil.c135 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/
Dtrusted_tpm1.c51 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 …]
/security/integrity/ima/
Dima_fs.c113 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 …]
Dima_template.c392 u8 *data = field_data->data; in ima_restore_template_data() local
394 (*entry)->template_data[i].data = in ima_restore_template_data()
396 if (!(*entry)->template_data[i].data) { in ima_restore_template_data()
400 memcpy((*entry)->template_data[i].data, data, field_data->len); in ima_restore_template_data()
478 memcpy(template_name, hdr[HDR_TEMPLATE_NAME].data, in ima_restore_measurement_list()
511 hdr[HDR_TEMPLATE_DATA].data, in ima_restore_measurement_list()
517 if (memcmp(hdr[HDR_DIGEST].data, zero, sizeof(zero))) { in ima_restore_measurement_list()
528 entry->pcr = !ima_canonical_fmt ? *(u32 *)(hdr[HDR_PCR].data) : in ima_restore_measurement_list()
529 le32_to_cpu(*(__le32 *)(hdr[HDR_PCR].data)); in ima_restore_measurement_list()
Dima_template_lib.c45 static int ima_write_template_field_data(const void *data, const u32 datalen, in ima_write_template_field_data() argument
59 memcpy(buf, data, datalen); in ima_write_template_field_data()
74 field_data->data = buf; in ima_write_template_field_data()
84 u8 *buf_ptr = field_data->data; in ima_show_template_data_ascii()
90 buf_ptr = strrchr(field_data->data, ':'); in ima_show_template_data_ascii()
91 if (buf_ptr != field_data->data) in ima_show_template_data_ascii()
92 seq_printf(m, "%s", field_data->data); in ima_show_template_data_ascii()
96 buflen -= buf_ptr - field_data->data; in ima_show_template_data_ascii()
148 strlen(field_data->data) : field_data->len; in ima_show_template_data_binary()
160 ima_putc(m, field_data->data, len); in ima_show_template_data_binary()
[all …]
/security/selinux/
Dnetlink.c43 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()

1234