Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 80) sorted by relevance

1234

/security/apparmor/
A Dprocattr.c35 int len; in aa_getprocattr() local
42 len = aa_label_snxprint(NULL, 0, current_ns, label, in aa_getprocattr()
45 AA_BUG(len < 0); in aa_getprocattr()
47 *string = kmalloc(len + 2, GFP_KERNEL); in aa_getprocattr()
53 len = aa_label_snxprint(*string, len + 2, current_ns, label, in aa_getprocattr()
56 if (len < 0) { in aa_getprocattr()
58 return len; in aa_getprocattr()
62 (*string)[len++] = '\n'; in aa_getprocattr()
63 (*string)[len] = 0; in aa_getprocattr()
66 return len; in aa_getprocattr()
A Dsecid.c55 int len; in apparmor_label_to_secctx() local
64 len = aa_label_asxprint(&cp->context, root_ns, label, in apparmor_label_to_secctx()
67 len = aa_label_snxprint(NULL, 0, root_ns, label, flags); in apparmor_label_to_secctx()
69 if (len < 0) in apparmor_label_to_secctx()
73 cp->len = len; in apparmor_label_to_secctx()
77 return len; in apparmor_label_to_secctx()
A Dcrypto.c24 char *aa_calc_hash(void *data, size_t len) in aa_calc_hash() argument
32 sha256(data, len, hash); in aa_calc_hash()
37 size_t len) in aa_calc_profile_hash() argument
51 sha256_update(&sctx, (u8 *)start, len); in aa_calc_profile_hash()
A Dlabel.c874 if (len == 1) in vec_create_and_insert_label()
1620 ssize_t len; in aa_label_snxprint() local
1730 int len; in aa_label_xaudit() local
1738 if (len < 0) { in aa_label_xaudit()
1763 int len; in aa_label_seq_xprint() local
1766 if (len < 0) { in aa_label_seq_xprint()
1786 int len; in aa_label_xprintk() local
1881 len += stack; in aa_label_strn_parse()
1908 if (i < len) { in aa_label_strn_parse()
1913 if (len == 1) in aa_label_strn_parse()
[all …]
/security/ipe/
A Dfs.c30 size_t len, loff_t *offset) in setaudit() argument
38 rc = kstrtobool_from_user(data, len, &value); in setaudit()
44 return len; in setaudit()
57 size_t len, loff_t *offset) in getaudit() argument
78 size_t len, loff_t *offset) in setenforce() argument
96 return len; in setenforce()
109 size_t len, loff_t *offset) in getenforce() argument
137 size_t len, loff_t *offset) in new_policy() argument
148 copy = memdup_user_nul(data, len); in new_policy()
155 p = ipe_new_policy(NULL, 0, copy, len); in new_policy()
[all …]
A Dpolicy_fs.c48 size_t len, loff_t *offset) in read_pkcs7() argument
91 size_t len, loff_t *offset) in read_policy() argument
128 size_t len, loff_t *offset) in read_name() argument
166 size_t len, loff_t *offset) in read_version() argument
209 size_t len, loff_t *offset) in setactive() argument
239 return (rc < 0) ? rc : len; in setactive()
257 size_t len, loff_t *offset) in getactive() argument
299 size_t len, loff_t *offset) in update_policy() argument
310 copy = memdup_user(data, len); in update_policy()
329 return len; in update_policy()
[all …]
/security/selinux/ss/
A Dconditional.c29 if (expr->len == 0) in cond_evaluate_expr()
214 u32 len; in cond_read_bool() local
326 u32 i, len; in cond_read_av_list() local
334 if (len == 0) in cond_read_av_list()
354 list->len = len; in cond_read_av_list()
375 u32 i, len; in cond_read_node() local
390 node->expr.len = len; in cond_read_node()
415 u32 i, len; in cond_read_list() local
452 u32 len; in cond_write_bool() local
617 new->len++; in cond_dup_av_list()
[all …]
A Dpolicydb.h306 size_t len; member
319 size_t len; member
359 if (bytes > fp->len) in next_entry()
364 fp->len -= bytes; in next_entry()
371 size_t len; in put_entry() local
373 if (unlikely(check_mul_overflow(bytes, num, &len))) in put_entry()
376 if (len > fp->len) in put_entry()
378 memcpy(fp->data, buf, len); in put_entry()
379 fp->data += len; in put_entry()
380 fp->len -= len; in put_entry()
[all …]
A Dcontext.h32 u32 len; /* length of string in bytes */ member
167 dst->len = src->len; in context_cpy()
170 dst->len = 0; in context_cpy()
176 dst->len = 0; in context_cpy()
187 c->len = 0; in context_destroy()
194 if (c1->len && c2->len) in context_equal()
195 return (c1->len == c2->len && !strcmp(c1->str, c2->str)); in context_equal()
196 if (c1->len || c2->len) in context_equal()
A Dpolicydb.c1108 if ((len == 0) || (len == (u32)-1)) in str_read()
1132 u32 len; in perm_read() local
1428 u32 len; in role_read() local
1485 u32 len; in type_read() local
1559 u32 len; in user_read() local
1609 u32 len; in sens_read() local
1645 u32 len; in cat_read() local
3454 len = 0; in genfs_write()
3456 len++; in genfs_write()
3470 len = 0; in genfs_write()
[all …]
/security/tomoyo/
A Daudit.c29 int len; in tomoyo_print_bprm() local
39 cp = buffer + len; in tomoyo_print_bprm()
272 len += 18 + strlen(symlink); in tomoyo_init_log()
274 len = kmalloc_size_roundup(len); in tomoyo_init_log()
275 buf = kzalloc(len, GFP_NOFS); in tomoyo_init_log()
278 len--; in tomoyo_init_log()
279 pos = snprintf(buf, len, "%s", header); in tomoyo_init_log()
283 pos += snprintf(buf + pos, len - pos, in tomoyo_init_log()
423 int len; in tomoyo_write_log() local
426 len = vsnprintf(NULL, 0, fmt, args) + 1; in tomoyo_write_log()
[all …]
A Dutil.c391 tmp += len; in tomoyo_str_starts()
441 if (!len) in tomoyo_correct_word2()
454 if (!len-- || !len--) in tomoyo_correct_word2()
588 int len; in tomoyo_domain_def() local
644 len++; in tomoyo_const_part_length()
650 len += 2; in tomoyo_const_part_length()
662 len += 4; in tomoyo_const_part_length()
667 return len; in tomoyo_const_part_length()
683 ptr->is_dir = len && (name[len - 1] == '/'); in tomoyo_fill_path_info()
953 f += len; in tomoyo_path_matches_pattern()
[all …]
A Dsecurityfs_if.c104 loff_t len = strlen(domain); in tomoyo_read_self() local
107 if (pos >= len || !count) in tomoyo_read_self()
109 len -= pos; in tomoyo_read_self()
110 if (count < len) in tomoyo_read_self()
111 len = count; in tomoyo_read_self()
112 if (copy_to_user(buf, domain + pos, len)) in tomoyo_read_self()
114 *ppos += len; in tomoyo_read_self()
115 return len; in tomoyo_read_self()
A Dcommon.c211 if (len) { in tomoyo_flush()
214 if (!len) in tomoyo_flush()
220 w += len; in tomoyo_flush()
234 for (len = 0; len < head->r.w_pos; len++) in tomoyo_flush()
235 head->r.w[len] = head->r.w[len + 1]; in tomoyo_flush()
273 size_t len; in tomoyo_io_printf() local
608 name[len++] != ':' || name[len++] != ':') in tomoyo_set_mode()
2106 int len; in tomoyo_add_entry() local
2164 int len; in tomoyo_supervisor() local
2324 if (!len) { in tomoyo_read_query()
[all …]
/security/selinux/
A Dnetlink.c43 static void selnl_add_payload(struct nlmsghdr *nlh, int len, int msgtype, void *data) in selnl_add_payload() argument
49 memset(msg, 0, len); in selnl_add_payload()
57 memset(msg, 0, len); in selnl_add_payload()
69 int len; in selnl_notify() local
74 len = selnl_msglen(msgtype); in selnl_notify()
76 skb = nlmsg_new(len, GFP_USER); in selnl_notify()
81 nlh = nlmsg_put(skb, 0, 0, msgtype, len, 0); in selnl_notify()
84 selnl_add_payload(nlh, len, msgtype, data); in selnl_notify()
A Dgenheaders.c88 int len, l; in main() local
91 len = strlen(name); in main()
93 if (len >= l && memcmp(name + len - l, s, l) == 0) in main()
125 int len; in main() local
128 len = strlen(name); in main()
139 39-len, permname, 1U<<j); in main()
A Dselinuxfs.c359 size_t len; member
637 u32 sid, len; in sel_write_context() local
661 length = len; in sel_write_context()
912 u32 len; in sel_write_create() local
996 length = len; in sel_write_create()
1012 u32 len; in sel_write_relabel() local
1055 length = len; in sel_write_relabel()
1120 ptr += len; in sel_write_user()
1137 u32 len; in sel_write_member() local
1183 length = len; in sel_write_member()
[all …]
/security/integrity/platform_certs/
A 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()
A Dload_ipl_s390.c21 unsigned int len; in load_ipl_certs() local
29 len = *(unsigned int *) ptr; in load_ipl_certs()
31 add_to_platform_keyring("IPL:db", ptr, len); in load_ipl_certs()
32 ptr += len; in load_ipl_certs()
/security/integrity/ima/
A Dima_template.c215 int i, len; in template_desc_init_fields() local
229 i++, template_fmt_ptr += len + 1) { in template_desc_init_fields()
233 if (len == 0 || len > IMA_TEMPLATE_FIELD_ID_MAX_LEN) { in template_desc_init_fields()
234 pr_err("Invalid field with length %d\n", len); in template_desc_init_fields()
238 memcpy(tmp_field_id, template_fmt_ptr, len); in template_desc_init_fields()
239 tmp_field_id[len] = '\0'; in template_desc_init_fields()
395 kzalloc(field_data->len + 1, GFP_KERNEL); in ima_restore_template_data()
421 [HDR_PCR] = {.len = sizeof(u32)}, in ima_restore_measurement_list()
422 [HDR_DIGEST] = {.len = TPM_DIGEST_SIZE}, in ima_restore_measurement_list()
479 hdr[HDR_TEMPLATE_NAME].len); in ima_restore_measurement_list()
[all …]
A Dima_crypto.c596 u32 datalen = field_data[i].len; in ima_calc_field_array_hash_tfm()
682 sg_init_one(&sg, buf, len); in calc_buffer_ahash_atfm()
683 ahash_request_set_crypt(req, &sg, NULL, len); in calc_buffer_ahash_atfm()
720 unsigned int len; in calc_buffer_shash_tfm() local
732 len = size < PAGE_SIZE ? size : PAGE_SIZE; in calc_buffer_shash_tfm()
733 rc = crypto_shash_update(shash, buf, len); in calc_buffer_shash_tfm()
736 buf += len; in calc_buffer_shash_tfm()
737 size -= len; in calc_buffer_shash_tfm()
755 rc = calc_buffer_shash_tfm(buf, len, hash, tfm); in calc_buffer_shash()
767 rc = calc_buffer_ahash(buf, len, hash); in ima_calc_buffer_hash()
[all …]
/security/safesetid/
A Dsecurityfs.c146 if (len >= KMALLOC_MAX_SIZE) in handle_policy_update()
156 p = buf = memdup_user_nul(ubuf, len); in handle_policy_update()
228 err = len; in handle_policy_update()
240 size_t len, in safesetid_uid_file_write() argument
249 return handle_policy_update(file, buf, len, UID); in safesetid_uid_file_write()
254 size_t len, in safesetid_gid_file_write() argument
277 res = simple_read_from_buffer(buf, len, ppos, in safesetid_file_read()
286 size_t len, loff_t *ppos) in safesetid_uid_file_read() argument
288 return safesetid_file_read(file, buf, len, ppos, in safesetid_uid_file_read()
293 size_t len, loff_t *ppos) in safesetid_gid_file_read() argument
[all …]
/security/apparmor/include/
A Dcrypto.h17 char *aa_calc_hash(void *data, size_t len);
19 size_t len);
21 static inline char *aa_calc_hash(void *data, size_t len) in aa_calc_hash() argument
26 void *start, size_t len) in aa_calc_profile_hash() argument
/security/lockdown/
A Dlockdown.c126 int i, len, err = -EINVAL; in lockdown_write() local
132 len = strlen(state); in lockdown_write()
133 if (len && state[len-1] == '\n') { in lockdown_write()
134 state[len-1] = '\0'; in lockdown_write()
135 len--; in lockdown_write()
/security/integrity/
A Dintegrity.h137 const void *data, size_t len, key_perm_t perm);
160 const void *data, size_t len, in integrity_load_cert() argument
247 size_t len);
250 const void *data, size_t len) in add_to_platform_keyring() argument
256 void __init add_to_machine_keyring(const char *source, const void *data, size_t len);
260 const void *data, size_t len) in add_to_machine_keyring() argument

Completed in 51 milliseconds

1234