/security/selinux/ss/ |
D | sidtab.c | 32 s->count = 0; in sidtab_init() 121 static u32 sidtab_level_from_count(u32 count) in sidtab_level_from_count() argument 126 while (count > capacity) { in sidtab_level_from_count() 198 u32 count = smp_load_acquire(&s->count); in sidtab_lookup() local 200 if (index >= count) in sidtab_lookup() 241 u32 count; in sidtab_context_to_sid() local 259 count = smp_load_acquire(&s->count); in sidtab_context_to_sid() 264 if (count >= SIDTAB_MAX) in sidtab_context_to_sid() 269 dst = sidtab_do_lookup(s, count, 1); in sidtab_context_to_sid() 273 dst->sid = index_to_sid(count); in sidtab_context_to_sid() [all …]
|
D | ebitmap.c | 349 u32 mapunit, count, startbit, index; in ebitmap_read() local 364 count = le32_to_cpu(buf[2]); in ebitmap_read() 382 if (e->highbit && !count) in ebitmap_read() 385 for (i = 0; i < count; i++) { in ebitmap_read() 455 u32 count; in ebitmap_write() local 462 count = 0; in ebitmap_write() 467 count++; in ebitmap_write() 473 buf[2] = cpu_to_le32(count); in ebitmap_write()
|
/security/smack/ |
D | smackfs.c | 444 size_t count, loff_t *ppos, in smk_write_rules_list() argument 466 if (count < SMK_OLOADLEN || count > SMK_LOADLEN) in smk_write_rules_list() 469 if (count >= PAGE_SIZE) { in smk_write_rules_list() 470 count = PAGE_SIZE - 1; in smk_write_rules_list() 475 data = memdup_user_nul(buf, count); in smk_write_rules_list() 484 while (count > 0 && (data[count - 1] != '\n')) in smk_write_rules_list() 485 --count; in smk_write_rules_list() 486 if (count == 0) { in smk_write_rules_list() 492 data[count] = '\0'; in smk_write_rules_list() 494 while (cnt < count) { in smk_write_rules_list() [all …]
|
/security/tomoyo/ |
D | securityfs_if.c | 42 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() 175 static ssize_t tomoyo_read(struct file *file, char __user *buf, size_t count, in tomoyo_read() argument 178 return tomoyo_read_control(file->private_data, buf, count); in tomoyo_read() [all …]
|
/security/apparmor/ |
D | procattr.c | 107 int count = 0; in aa_setprocattr_changehat() local 126 for (count = 0; (hat < end) && count < 16; ++count) { in aa_setprocattr_changehat() 128 hats[count] = hat; in aa_setprocattr_changehat() 130 , __func__, current->pid, token, count, hat); in aa_setprocattr_changehat() 135 __func__, current->pid, token, count, "<NULL>"); in aa_setprocattr_changehat() 137 return aa_change_hat(hats, count, token, flags); in aa_setprocattr_changehat()
|
D | match.c | 265 struct aa_dfa *dfa = container_of(kref, struct aa_dfa, count); in aa_dfa_free_kref() 291 kref_init(&dfa->count); in aa_dfa_unpack() 649 unsigned int *count) in leftmatch_fb() argument 660 AA_BUG(!count); in leftmatch_fb() 662 *count = 0; in leftmatch_fb() 682 *count -= adjust; in leftmatch_fb() 686 (*count)++; in leftmatch_fb() 701 *count -= adjust; in leftmatch_fb() 705 (*count)++; in leftmatch_fb() 711 *count = 0; in leftmatch_fb() [all …]
|
D | apparmorfs.c | 810 struct kref count; member 823 t = container_of(kref, struct multi_transaction, count); in multi_transaction_kref() 831 kref_get(&(t->count)); in get_multi_transaction() 839 kref_put(&(t->count), multi_transaction_kref); in put_multi_transaction() 870 kref_init(&t->count); in multi_transaction_new() 933 size_t count, loff_t *ppos) in aa_write_access() argument 941 t = multi_transaction_new(file, ubuf, count); in aa_write_access() 945 if (count > QUERY_CMD_PROFILE_LEN && in aa_write_access() 949 count - QUERY_CMD_PROFILE_LEN, true); in aa_write_access() 950 } else if (count > QUERY_CMD_LABEL_LEN && in aa_write_access() [all …]
|
D | domain.c | 411 unsigned int state, count; in find_attach() local 415 name, &count); in find_attach() 421 if (count < candidate_len) in find_attach() 451 if (count == candidate_len && in find_attach() 1054 int count, int flags) in change_hat() argument 1065 AA_BUG(count < 1); in change_hat() 1071 for (i = 0; i < count && !hat; i++) { in change_hat() 1128 if (count > 1 || COMPLAIN_MODE(profile)) { in change_hat() 1166 int aa_change_hat(const char *hats[], int count, u64 token, int flags) in aa_change_hat() argument 1197 if (count) { in aa_change_hat() [all …]
|
D | label.c | 55 struct aa_proxy *proxy = container_of(kref, struct aa_proxy, count); in aa_proxy_kref() 66 kref_init(&new->count); in aa_alloc_proxy() 374 struct aa_label *label = container_of(kref, struct aa_label, count); in aa_label_kref() 411 kref_init(&label->count); in aa_label_init() 1530 int mode = -1, count = 0; in label_modename() local 1540 count++; in label_modename() 1548 if (count == 0) in label_modename() 1601 int count = 0, total = 0; in aa_label_snxprint() local 1617 if (count > 0) { in aa_label_snxprint() 1625 count++; in aa_label_snxprint() [all …]
|
/security/integrity/ima/ |
D | ima_kexec.c | 34 file.count = sizeof(khdr); /* reserved space */ in ima_dump_measurement_list() 39 if (file.count < file.size) { in ima_dump_measurement_list() 40 khdr.count++; in ima_dump_measurement_list() 55 khdr.buffer_size = file.count; in ima_dump_measurement_list() 58 khdr.count = cpu_to_le64(khdr.count); in ima_dump_measurement_list() 65 file.count < 100 ? file.count : 100, true); in ima_dump_measurement_list() 67 *buffer_size = file.count; in ima_dump_measurement_list()
|
D | ima_template.c | 363 unsigned long count = 0; in ima_restore_measurement_list() local 371 khdr->count = le64_to_cpu(khdr->count); in ima_restore_measurement_list() 380 if (khdr->count > ULONG_MAX - 1) { in ima_restore_measurement_list() 395 while ((bufp < bufendp) && (count++ < khdr->count)) { in ima_restore_measurement_list() 398 enforce_mask |= (count == khdr->count) ? ENFORCE_BUFEND : 0; in ima_restore_measurement_list()
|
D | ima_fs.c | 42 static ssize_t ima_show_htable_value(char __user *buf, size_t count, in ima_show_htable_value() argument 49 return simple_read_from_buffer(buf, count, ppos, tmpbuf, len); in ima_show_htable_value() 54 size_t count, loff_t *ppos) in ima_show_htable_violations() argument 56 return ima_show_htable_value(buf, count, ppos, &ima_htable.violations); in ima_show_htable_violations() 66 size_t count, loff_t *ppos) in ima_show_measurements_count() argument 68 return ima_show_htable_value(buf, count, ppos, &ima_htable.len); in ima_show_measurements_count()
|
/security/integrity/evm/ |
D | evm_secfs.c | 42 size_t count, loff_t *ppos) in evm_read_key() argument 51 rc = simple_read_from_buffer(buf, count, ppos, temp, strlen(temp)); in evm_read_key() 69 size_t count, loff_t *ppos) in evm_write_key() argument 76 ret = kstrtoint_from_user(buf, count, 0, &i); in evm_write_key() 109 return count; in evm_write_key() 129 size_t count, loff_t *ppos) in evm_read_xattrs() argument 158 rc = simple_read_from_buffer(buf, count, ppos, temp, strlen(temp)); in evm_read_xattrs() 175 size_t count, loff_t *ppos) in evm_write_xattrs() argument 189 if (count > XATTR_NAME_MAX) in evm_write_xattrs() 203 xattr->name = memdup_user_nul(buf, count); in evm_write_xattrs() [all …]
|
D | evm_main.c | 97 int count = 0; in evm_find_protected_xattrs() local 110 count++; in evm_find_protected_xattrs() 113 return count; in evm_find_protected_xattrs()
|
/security/selinux/ |
D | selinuxfs.c | 122 size_t count, loff_t *ppos) in sel_read_enforce() argument 130 return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); in sel_read_enforce() 135 size_t count, loff_t *ppos) in sel_write_enforce() argument 144 if (count >= PAGE_SIZE) in sel_write_enforce() 151 page = memdup_user_nul(buf, count); in sel_write_enforce() 184 length = count; in sel_write_enforce() 200 size_t count, loff_t *ppos) in sel_read_handle_unknown() argument 212 return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); in sel_read_handle_unknown() 234 size_t count, loff_t *ppos) in sel_read_handle_status() argument 240 return simple_read_from_buffer(buf, count, ppos, in sel_read_handle_status() [all …]
|
/security/apparmor/include/ |
D | match.h | 95 struct kref count; member 139 unsigned int count; member 147 .count = 0, \ 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()
|
D | policy_unpack.h | 58 struct kref count; member 87 if (data && kref_get_unless_zero(&(data->count))) in __aa_get_loaddata() 118 kref_put(&data->count, aa_loaddata_kref); in aa_put_loaddata()
|
D | label.h | 106 struct kref count; member 126 struct kref count; member 374 if (l && kref_get_unless_zero(&l->count)) in __aa_get_label() 383 kref_get(&(l->count)); in aa_get_label() 403 } while (c && !kref_get_unless_zero(&c->count)); in aa_get_label_rcu() 443 kref_put(&l->count, aa_label_kref); in aa_put_label() 453 kref_get(&(proxy->count)); in aa_get_proxy() 461 kref_put(&proxy->count, aa_proxy_kref); in aa_put_proxy()
|
D | policy.h | 246 kref_get(&(p->label.count)); in aa_get_profile() 260 if (p && kref_get_unless_zero(&p->label.count)) in aa_get_profile_not0() 280 } while (c && !kref_get_unless_zero(&c->label.count)); in aa_get_profile_rcu() 293 kref_put(&p->label.count, aa_label_kref); in aa_put_profile()
|
D | lib.h | 94 struct kref count; member 110 kref_get(&(str_to_counted(str)->count)); in aa_get_str() 118 kref_put(&str_to_counted(str)->count, aa_str_kref); in aa_put_str()
|
D | domain.h | 36 int aa_change_hat(const char *hats[], int count, u64 token, int flags);
|
/security/ |
D | device_cgroup.c | 600 int count, rc = 0; in devcgroup_update_access() local 658 for (count = 0; count < sizeof(temp) - 1; count++) { in devcgroup_update_access() 659 temp[count] = *b; in devcgroup_update_access() 680 for (count = 0; count < sizeof(temp) - 1; count++) { in devcgroup_update_access() 681 temp[count] = *b; in devcgroup_update_access() 694 for (b++, count = 0; count < 3; count++, b++) { in devcgroup_update_access() 707 count = 3; in devcgroup_update_access()
|
D | inode.c | 318 static ssize_t lsm_read(struct file *filp, char __user *buf, size_t count, in lsm_read() argument 321 return simple_read_from_buffer(buf, count, ppos, lsm_names, in lsm_read()
|
/security/lockdown/ |
D | lockdown.c | 115 static ssize_t lockdown_read(struct file *filp, char __user *buf, size_t count, in lockdown_read() argument 138 return simple_read_from_buffer(buf, count, ppos, temp, strlen(temp)); in lockdown_read()
|
/security/integrity/ |
D | iint.c | 189 void *addr, unsigned long count) in integrity_kernel_read() argument 200 ret = __vfs_read(file, buf, count, &offset); in integrity_kernel_read()
|