Home
last modified time | relevance | path

Searched refs:count (Results 1 – 25 of 39) sorted by relevance

12

/security/smack/
A Dsmackfs.c467 if (count < SMK_OLOADLEN || count > SMK_LOADLEN) in smk_write_rules_list()
485 while (count > 0 && (data[count - 1] != '\n')) in smk_write_rules_list()
486 --count; in smk_write_rules_list()
1589 if (count >= sizeof(temp) || count == 0) in smk_write_doi()
1656 if (count >= sizeof(temp) || count == 0) in smk_write_direct()
1734 if (count >= sizeof(temp) || count == 0) in smk_write_mapped()
1827 if (count == 0 || count > PAGE_SIZE) in smk_write_ambient()
2171 if (count >= sizeof(temp) || count == 0) in smk_write_logging()
2522 if (count == 0 || count > SMK_LONGLABEL) in smk_write_revoke_subj()
2653 if (count == 0 || count > PAGE_SIZE) in smk_write_syslog()
[all …]
/security/selinux/ss/
A Dsidtab.c45 s->count = 0; in sidtab_init()
156 while (count > capacity) { in sidtab_level_from_count()
228 u32 count = smp_load_acquire(&s->count); in sidtab_lookup() local
230 if (index >= count) in sidtab_lookup()
297 count = s->count; in sidtab_context_to_sid()
301 if (count >= SIDTAB_MAX) in sidtab_context_to_sid()
341 target->count = count + 1; in sidtab_context_to_sid()
354 smp_store_release(&s->count, count + 1); in sidtab_context_to_sid()
429 u32 count, level, pos; in sidtab_convert() local
440 count = s->count; in sidtab_convert()
[all …]
A Debitmap.c366 u32 mapunit, count, startbit, index, i; in ebitmap_read() local
381 count = le32_to_cpu(buf[2]); in ebitmap_read()
399 if (e->highbit && !count) in ebitmap_read()
402 for (i = 0; i < count; i++) { in ebitmap_read()
484 u32 bit, count, last_bit, last_startbit; in ebitmap_write() local
491 count = 0; in ebitmap_write()
498 count++; in ebitmap_write()
504 buf[2] = cpu_to_le32(count); in ebitmap_write()
/security/tomoyo/
A Dsecurityfs_if.c42 size_t count, loff_t *ppos) in tomoyo_write_self() argument
47 if (!count || count >= TOMOYO_EXEC_TMPSIZE - 10) in tomoyo_write_self()
49 data = memdup_user_nul(buf, count); in tomoyo_write_self()
87 return error ? error : count; in tomoyo_write_self()
101 size_t count, loff_t *ppos) in tomoyo_read_self() argument
107 if (pos >= len || !count) in tomoyo_read_self()
110 if (count < len) in tomoyo_read_self()
111 len = count; in tomoyo_read_self()
179 return tomoyo_read_control(file->private_data, buf, count); in tomoyo_read()
193 size_t count, loff_t *ppos) in tomoyo_write() argument
[all …]
/security/apparmor/
A Dprocattr.c106 int count = 0; in aa_setprocattr_changehat() local
125 for (count = 0; (hat < end) && count < 16; ++count) { in aa_setprocattr_changehat()
127 hats[count] = hat; in aa_setprocattr_changehat()
130 , __func__, current->pid, token, count, hat); in aa_setprocattr_changehat()
136 __func__, current->pid, token, count, "<NULL>"); in aa_setprocattr_changehat()
138 return aa_change_hat(hats, count, token, flags); in aa_setprocattr_changehat()
A Dmatch.c308 kref_init(&dfa->count); in aa_dfa_unpack()
715 unsigned int *count) in leftmatch_fb() argument
726 AA_BUG(!count); in leftmatch_fb()
728 *count = 0; in leftmatch_fb()
748 *count -= adjust; in leftmatch_fb()
752 (*count)++; in leftmatch_fb()
767 *count -= adjust; in leftmatch_fb()
771 (*count)++; in leftmatch_fb()
777 *count = 0; in leftmatch_fb()
795 const char *str, unsigned int *count) in aa_dfa_leftmatch() argument
[all …]
A Dapparmorfs.c822 struct kref count; member
841 kref_get(&(t->count)); in get_multi_transaction()
880 kref_init(&t->count); in multi_transaction_new()
946 size_t count, loff_t *ppos) in aa_write_access() argument
958 if (count > QUERY_CMD_PROFILE_LEN && in aa_write_access()
978 count - QUERY_CMD_DATA_LEN); in aa_write_access()
989 return count; in aa_write_access()
1174 int count = 1; in seq_ns_nsstacked_show() local
1181 count++; in seq_ns_nsstacked_show()
2564 int count = 0; in aa_mk_null_file() local
[all …]
A Ddomain.c421 unsigned int count; in find_attach() local
427 name, &count); in find_attach()
433 if (count < candidate_len) in find_attach()
463 if (count == candidate_len && in find_attach()
475 candidate_len = max(count, attach->xmatch_len); in find_attach()
1107 int count, int flags) in change_hat() argument
1118 AA_BUG(count < 1); in change_hat()
1124 for (i = 0; i < count && !hat; i++) { in change_hat()
1181 if (count > 1 || COMPLAIN_MODE(profile)) { in change_hat()
1266 if (count) { in aa_change_hat()
[all …]
A Dlabel.c66 kref_init(&new->count); in aa_alloc_proxy()
415 kref_init(&label->count); in aa_label_init()
1548 int mode = -1, count = 0; in label_modename() local
1552 count++; in label_modename()
1566 if (count == 0) in label_modename()
1635 if (count > 0) { in aa_label_snxprint()
1643 count++; in aa_label_snxprint()
1647 if (count == 0) { in aa_label_snxprint()
1814 int count = 1; in label_count_strn_entries() local
1821 count++; in label_count_strn_entries()
[all …]
/security/integrity/evm/
A Devm_secfs.c39 size_t count, loff_t *ppos) in evm_read_key() argument
66 size_t count, loff_t *ppos) in evm_write_key() argument
74 ret = kstrtouint_from_user(buf, count, 0, &i); in evm_write_key()
107 return count; in evm_write_key()
127 size_t count, loff_t *ppos) in evm_read_xattrs() argument
180 size_t count, loff_t *ppos) in evm_write_xattrs() argument
194 if (count > XATTR_NAME_MAX) in evm_write_xattrs()
209 xattr->name = memdup_user_nul(buf, count); in evm_write_xattrs()
233 err = count; in evm_write_xattrs()
257 err = count; in evm_write_xattrs()
[all …]
A Devm_crypto.c187 size_t count) in dump_security_xattr_l() argument
192 p = asciihex = kmalloc(count * 2 + 1, GFP_KERNEL); in dump_security_xattr_l()
196 p = bin2hex(p, src, count); in dump_security_xattr_l()
198 pr_debug("%s: (%zu) %.*s\n", prefix, count, (int)count * 2, asciihex); in dump_security_xattr_l()
/security/integrity/ima/
A Dima_kexec.c33 sf->count = 0; in ima_free_kexec_file_buf()
75 ima_kexec_file.count = sizeof(struct ima_kexec_hdr); /* reserved space */ in ima_alloc_kexec_file_buf()
98 if (ima_kexec_file.count < ima_kexec_file.size) { in ima_dump_measurement_list()
99 khdr.count++; in ima_dump_measurement_list()
111 khdr.buffer_size = ima_kexec_file.count; in ima_dump_measurement_list()
114 khdr.count = cpu_to_le64(khdr.count); in ima_dump_measurement_list()
120 ima_kexec_file.buf, ima_kexec_file.count < 100 ? in ima_dump_measurement_list()
121 ima_kexec_file.count : 100, in ima_dump_measurement_list()
124 *buffer_size = ima_kexec_file.count; in ima_dump_measurement_list()
A Dima_fs.c41 static ssize_t ima_show_htable_value(char __user *buf, size_t count, in ima_show_htable_value() argument
48 return simple_read_from_buffer(buf, count, ppos, tmpbuf, len); in ima_show_htable_value()
53 size_t count, loff_t *ppos) in ima_show_htable_violations() argument
55 return ima_show_htable_value(buf, count, ppos, &ima_htable.violations); in ima_show_htable_violations()
65 size_t count, loff_t *ppos) in ima_show_measurements_count() argument
67 return ima_show_htable_value(buf, count, ppos, &ima_htable.len); in ima_show_measurements_count()
397 int count = NR_BANKS(ima_tpm_chip); in create_securityfs_measurement_lists() local
400 count++; in create_securityfs_measurement_lists()
402 for (int i = 0; i < count; i++) { in create_securityfs_measurement_lists()
A Dima_template.c430 unsigned long count = 0; in ima_restore_measurement_list() local
438 khdr->count = le64_to_cpu((__force __le64)khdr->count); in ima_restore_measurement_list()
447 if (khdr->count > ULONG_MAX - 1) { in ima_restore_measurement_list()
462 while ((bufp < bufendp) && (count++ < khdr->count)) { in ima_restore_measurement_list()
465 enforce_mask |= (count == khdr->count) ? ENFORCE_BUFEND : 0; in ima_restore_measurement_list()
/security/selinux/
A Dselinuxfs.c144 if (count >= PAGE_SIZE) in sel_write_enforce()
184 length = count; in sel_write_enforce()
279 if (count >= PAGE_SIZE) in sel_write_disable()
294 length = count; in sel_write_disable()
583 if (!count) in sel_write_load()
617 length = count; in sel_write_load()
706 length = count; in sel_write_checkreqprot()
790 rc = count; in sel_write_validatetrans()
1285 length = count; in sel_write_bool()
1337 length = count; in sel_commit_bools_write()
[all …]
/security/
A Ddevice_cgroup.c615 int count, rc = 0; in devcgroup_update_access() local
687 for (count = 0; count < sizeof(temp) - 1; count++) { in devcgroup_update_access()
688 temp[count] = *b; in devcgroup_update_access()
709 for (count = 0; count < sizeof(temp) - 1; count++) { in devcgroup_update_access()
710 temp[count] = *b; in devcgroup_update_access()
723 for (b++, count = 0; count < 3; count++, b++) { in devcgroup_update_access()
736 count = 3; in devcgroup_update_access()
A Dinode.c319 static ssize_t lsm_read(struct file *filp, char __user *buf, size_t count, in lsm_read() argument
322 return simple_read_from_buffer(buf, count, ppos, lsm_names, in lsm_read()
/security/apparmor/include/
A Dpolicy.h90 struct kref count; member
115 kref_get(&(pdb->count)); in aa_get_pdb()
129 kref_put(&pdb->count, aa_pdb_free_kref); in aa_put_pdb()
358 kref_get(&(p->label.count)); in aa_get_profile()
372 if (p && kref_get_unless_zero(&p->label.count)) in aa_get_profile_not0()
392 } while (c && !kref_get_unless_zero(&c->label.count)); in aa_get_profile_rcu()
405 kref_put(&p->label.count, aa_label_kref); in aa_put_profile()
A Dmatch.h101 struct kref count; member
154 const char *str, unsigned int *count);
166 kref_get(&(dfa->count)); in aa_get_dfa()
180 kref_put(&dfa->count, aa_dfa_free_kref); in aa_put_dfa()
A Dpolicy_unpack.h100 struct kref count; member
134 if (data && kref_get_unless_zero(&(data->count))) in __aa_get_loaddata()
165 kref_put(&data->count, aa_loaddata_kref); in aa_put_loaddata()
A Dlabel.h105 struct kref count; member
128 struct kref count; member
360 if (l && kref_get_unless_zero(&l->count)) in __aa_get_label()
369 kref_get(&(l->count)); in aa_get_label()
389 } while (c && !kref_get_unless_zero(&c->count)); in aa_get_label_rcu()
429 kref_put(&l->count, aa_label_kref); in aa_put_label()
446 kref_get(&(proxy->count)); in aa_get_proxy()
454 kref_put(&proxy->count, aa_proxy_kref); in aa_put_proxy()
A Dlib.h131 struct kref count; member
147 kref_get(&(str_to_counted(str)->count)); in aa_get_str()
155 kref_put(&str_to_counted(str)->count, aa_str_kref); in aa_put_str()
A Ddomain.h30 int aa_change_hat(const char *hats[], int count, u64 token, int flags);
/security/integrity/
A Diint.c26 void *addr, unsigned long count) in integrity_kernel_read() argument
28 return __kernel_read(file, addr, count, &offset); in integrity_kernel_read()
/security/lockdown/
A Dlockdown.c96 static ssize_t lockdown_read(struct file *filp, char __user *buf, size_t count, in lockdown_read() argument
119 return simple_read_from_buffer(buf, count, ppos, temp, strlen(temp)); in lockdown_read()

Completed in 60 milliseconds

12