Home
last modified time | relevance | path

Searched refs:pos (Results 1 – 25 of 29) sorted by relevance

12

/security/tomoyo/
Drealpath.c97 char *pos = ERR_PTR(-ENOMEM); in tomoyo_get_absolute_path() local
101 pos = d_absolute_path(path, buffer, buflen - 1); in tomoyo_get_absolute_path()
102 if (!IS_ERR(pos) && *pos == '/' && pos[1]) { in tomoyo_get_absolute_path()
111 return pos; in tomoyo_get_absolute_path()
128 char *pos = ERR_PTR(-ENOMEM); in tomoyo_get_dentry_path() local
131 pos = dentry_path_raw(dentry, buffer, buflen - 1); in tomoyo_get_dentry_path()
132 if (!IS_ERR(pos) && *pos == '/' && pos[1]) { in tomoyo_get_dentry_path()
141 return pos; in tomoyo_get_dentry_path()
157 char *pos = tomoyo_get_dentry_path(dentry, buffer, buflen); in tomoyo_get_local_path() local
159 if (IS_ERR(pos)) in tomoyo_get_local_path()
[all …]
Daudit.c30 unsigned long pos = bprm->p; in tomoyo_print_bprm() local
31 int offset = pos % PAGE_SIZE; in tomoyo_print_bprm()
46 if (!tomoyo_dump_page(bprm, pos, dump)) in tomoyo_print_bprm()
48 pos += PAGE_SIZE - offset; in tomoyo_print_bprm()
157 int pos; in tomoyo_print_header() local
165 pos = snprintf(buffer, tomoyo_buffer_len - 1, in tomoyo_print_header()
196 pos += snprintf(buffer + pos, in tomoyo_print_header()
197 tomoyo_buffer_len - 1 - pos, in tomoyo_print_header()
206 pos += snprintf(buffer + pos, tomoyo_buffer_len - 1 - pos, in tomoyo_print_header()
216 pos += snprintf(buffer + pos, in tomoyo_print_header()
[all …]
Dcondition.c113 unsigned long pos = bprm->p; in tomoyo_scan_bprm() local
114 int offset = pos % PAGE_SIZE; in tomoyo_scan_bprm()
130 if (!tomoyo_dump_page(bprm, pos, dump)) { in tomoyo_scan_bprm()
134 pos += PAGE_SIZE - offset; in tomoyo_scan_bprm()
457 char * const pos = param->data; in tomoyo_get_transit_preference() local
460 if (*pos == '<') { in tomoyo_get_transit_preference()
465 char *cp = strchr(pos, ' '); in tomoyo_get_transit_preference()
469 flag = tomoyo_correct_path(pos) || !strcmp(pos, "keep") || in tomoyo_get_transit_preference()
470 !strcmp(pos, "initialize") || !strcmp(pos, "reset") || in tomoyo_get_transit_preference()
471 !strcmp(pos, "child") || !strcmp(pos, "parent"); in tomoyo_get_transit_preference()
[all …]
Dutil.c135 char *pos = param->data; in tomoyo_read_token() local
136 char *del = strchr(pos, ' '); in tomoyo_read_token()
141 del = pos + strlen(pos); in tomoyo_read_token()
143 return pos; in tomoyo_read_token()
159 char *pos = start; in tomoyo_get_domainname() local
161 while (*pos) { in tomoyo_get_domainname()
162 if (*pos++ != ' ' || in tomoyo_get_domainname()
163 tomoyo_correct_path2(pos, strchrnul(pos, ' ') - pos)) in tomoyo_get_domainname()
165 *(pos - 1) = '\0'; in tomoyo_get_domainname()
168 param->data = pos; in tomoyo_get_domainname()
Dsecurityfs_if.c105 loff_t pos = *ppos; in tomoyo_read_self() local
107 if (pos >= len || !count) in tomoyo_read_self()
109 len -= pos; in tomoyo_read_self()
112 if (copy_to_user(buf, domain + pos, len)) in tomoyo_read_self()
Ddomain.c621 unsigned long pos = bprm->p; in tomoyo_environ() local
622 int offset = pos % PAGE_SIZE; in tomoyo_environ()
637 if (!tomoyo_dump_page(bprm, pos, &env_page)) in tomoyo_environ()
639 pos += PAGE_SIZE - offset; in tomoyo_environ()
896 bool tomoyo_dump_page(struct linux_binprm *bprm, unsigned long pos, in tomoyo_dump_page() argument
918 ret = get_user_pages_remote(bprm->mm, pos, 1, in tomoyo_dump_page()
924 page = bprm->page[pos / PAGE_SIZE]; in tomoyo_dump_page()
927 const unsigned int offset = pos % PAGE_SIZE; in tomoyo_dump_page()
Dcommon.h938 bool tomoyo_dump_page(struct linux_binprm *bprm, unsigned long pos,
1328 #define list_for_each_cookie(pos, head) \ argument
1329 if (!pos) \
1330 pos = srcu_dereference((head)->next, &tomoyo_ss); \
1331 for ( ; pos != (head); pos = srcu_dereference(pos->next, &tomoyo_ss))
Dcommon.c190 const int pos = strlen(buffer); in tomoyo_addprintf() local
193 vsnprintf(buffer + pos, len - pos - 1, fmt, args); in tomoyo_addprintf()
273 size_t pos = head->r.avail; in tomoyo_io_printf() local
274 int size = head->readbuf_size - pos; in tomoyo_io_printf()
279 len = vsnprintf(head->read_buf + pos, size, fmt, args) + 1; in tomoyo_io_printf()
281 if (pos + len >= head->readbuf_size) { in tomoyo_io_printf()
286 tomoyo_set_string(head, head->read_buf + pos); in tomoyo_io_printf()
2196 unsigned int pos = 0; in tomoyo_read_query() local
2208 if (pos++ != head->r.query_index) in tomoyo_read_query()
2221 pos = 0; in tomoyo_read_query()
[all …]
/security/apparmor/
Dpolicy_unpack.c54 if (aad(sa)->iface.pos) in audit_cb()
55 audit_log_format(ab, " offset=%ld", aad(sa)->iface.pos); in audit_cb()
76 aad(&sa)->iface.pos = e->pos - e->start; in audit_iface()
168 return (size <= e->end - e->pos); in aa_inbounds()
191 void *pos = e->pos; in aa_unpack_u16_chunk() local
195 size = le16_to_cpu(get_unaligned((__le16 *) e->pos)); in aa_unpack_u16_chunk()
196 e->pos += sizeof(__le16); in aa_unpack_u16_chunk()
199 *chunk = e->pos; in aa_unpack_u16_chunk()
200 e->pos += size; in aa_unpack_u16_chunk()
204 e->pos = pos; in aa_unpack_u16_chunk()
[all …]
Dpolicy_unpack_test.c68 e->pos = e->start; in build_aa_ext_struct()
148 puf->e->pos += TEST_ARRAY_BUF_OFFSET; in policy_unpack_test_unpack_array_with_null_name()
153 KUNIT_EXPECT_PTR_EQ(test, puf->e->pos, in policy_unpack_test_unpack_array_with_null_name()
163 puf->e->pos += TEST_NAMED_ARRAY_BUF_OFFSET; in policy_unpack_test_unpack_array_with_name()
168 KUNIT_EXPECT_PTR_EQ(test, puf->e->pos, in policy_unpack_test_unpack_array_with_name()
178 puf->e->pos += TEST_NAMED_ARRAY_BUF_OFFSET; in policy_unpack_test_unpack_array_out_of_bounds()
184 KUNIT_EXPECT_PTR_EQ(test, puf->e->pos, in policy_unpack_test_unpack_array_out_of_bounds()
194 puf->e->pos += TEST_BLOB_BUF_OFFSET; in policy_unpack_test_unpack_blob_with_null_name()
208 puf->e->pos += TEST_NAMED_BLOB_BUF_OFFSET; in policy_unpack_test_unpack_blob_with_name()
223 puf->e->pos += TEST_NAMED_BLOB_BUF_OFFSET; in policy_unpack_test_unpack_blob_out_of_bounds()
[all …]
Dmatch.c412 unsigned int pos = base_idx(b) + (C); \
413 if ((check)[pos] != (state)) { \
419 (state) = (next)[pos]; \
575 unsigned int state = start, pos; in aa_dfa_match_until() local
586 pos = base_idx(base[state]) + equiv[(u8) *str++]; in aa_dfa_match_until()
587 if (check[pos] == state) in aa_dfa_match_until()
588 state = next[pos]; in aa_dfa_match_until()
597 pos = base_idx(base[state]) + (u8) *str++; in aa_dfa_match_until()
598 if (check[pos] == state) in aa_dfa_match_until()
599 state = next[pos]; in aa_dfa_match_until()
[all …]
Dlabel.c229 int i, pos, dups = 0; in unique() local
234 pos = 0; in unique()
236 int res = profile_cmp(vec[pos], vec[i]); in unique()
245 pos++; in unique()
247 vec[pos] = vec[i]; in unique()
282 int pos, j; in aa_vec_unique() local
284 for (pos = i - 1 - dups; pos >= 0; pos--) { in aa_vec_unique()
285 int res = profile_cmp(vec[pos], tmp); in aa_vec_unique()
296 pos++; in aa_vec_unique()
298 for (j = i - dups; j > pos; j--) in aa_vec_unique()
[all …]
Dapparmorfs.c390 loff_t *pos) in aa_simple_write_to_buffer() argument
396 if (*pos != 0) in aa_simple_write_to_buffer()
415 loff_t *pos, struct aa_ns *ns) in policy_update() argument
430 data = aa_simple_write_to_buffer(buf, size, size, pos); in policy_update()
444 loff_t *pos) in profile_load() argument
447 int error = policy_update(AA_MAY_LOAD_POLICY, buf, size, pos, ns); in profile_load()
461 size_t size, loff_t *pos) in profile_replace() argument
465 buf, size, pos, ns); in profile_replace()
478 size_t size, loff_t *pos) in profile_remove() argument
497 data = aa_simple_write_to_buffer(buf, size + 1, size, pos); in profile_remove()
[all …]
Dmount.c323 int pos, error; in match_mnt_path_str() local
344 pos = do_match_mnt(profile->policy.dfa, in match_mnt_path_str()
347 if (pos) { in match_mnt_path_str()
348 info = mnt_info_table[pos]; in match_mnt_path_str()
/security/smack/
Dsmackfs.c532 static void *smk_seq_start(struct seq_file *s, loff_t *pos, in smk_seq_start() argument
536 int i = *pos; in smk_seq_start()
549 static void *smk_seq_next(struct seq_file *s, void *v, loff_t *pos, in smk_seq_next() argument
554 ++*pos; in smk_seq_next()
608 static void *load2_seq_start(struct seq_file *s, loff_t *pos) in load2_seq_start() argument
610 return smk_seq_start(s, pos, &smack_known_list); in load2_seq_start()
613 static void *load2_seq_next(struct seq_file *s, void *v, loff_t *pos) in load2_seq_next() argument
615 return smk_seq_next(s, v, pos, &smack_known_list); in load2_seq_next()
752 static void *cipso_seq_start(struct seq_file *s, loff_t *pos) in cipso_seq_start() argument
754 return smk_seq_start(s, pos, &smack_known_list); in cipso_seq_start()
[all …]
/security/keys/
Dbig_key.c85 loff_t pos = 0; in big_key_preparse() local
112 written = kernel_write(file, buf, enclen, &pos); in big_key_preparse()
240 loff_t pos = 0; in big_key_read() local
253 ret = kernel_read(file, buf, enclen, &pos); in big_key_read()
Dproc.c115 key_serial_t pos = *_pos; in proc_keys_start() local
122 key = find_ge_key(p, pos); in proc_keys_start()
278 loff_t pos = *_pos; in proc_key_users_start() local
283 while (pos > 0 && _p) { in proc_key_users_start()
284 pos--; in proc_key_users_start()
/security/selinux/ss/
Dsidtab.c373 u32 *pos, u32 count, u32 level, in sidtab_convert_tree() argument
387 while (i < SIDTAB_INNER_ENTRIES && *pos < count) { in sidtab_convert_tree()
390 pos, count, level - 1, in sidtab_convert_tree()
404 while (i < SIDTAB_LEAF_ENTRIES && *pos < count) { in sidtab_convert_tree()
410 (*pos)++; in sidtab_convert_tree()
421 u32 count, level, pos; in sidtab_convert() local
456 pos = 0; in sidtab_convert()
458 &s->roots[level], &pos, count, level, params); in sidtab_convert()
/security/selinux/
Davc.c630 struct avc_node *pos, *node = NULL; in avc_insert() local
653 hlist_for_each_entry(pos, head, list) { in avc_insert()
654 if (pos->ae.ssid == ssid && in avc_insert()
655 pos->ae.tsid == tsid && in avc_insert()
656 pos->ae.tclass == tclass) { in avc_insert()
657 avc_node_replace(avc, node, pos); in avc_insert()
863 struct avc_node *pos, *node, *orig = NULL; in avc_update_node() local
881 hlist_for_each_entry(pos, head, list) { in avc_update_node()
882 if (ssid == pos->ae.ssid && in avc_update_node()
883 tsid == pos->ae.tsid && in avc_update_node()
[all …]
/security/apparmor/include/
Dlabel.h335 const char *pos; in aa_label_strn_split() local
338 state = aa_dfa_matchn_until(stacksplitdfa, DFA_START, str, n, &pos); in aa_label_strn_split()
342 return pos - 3; in aa_label_strn_split()
347 const char *pos; in aa_label_str_split() local
350 state = aa_dfa_match_until(stacksplitdfa, DFA_START, str, &pos); in aa_label_str_split()
354 return pos - 3; in aa_label_str_split()
Dmatch.h147 unsigned int pos; member
155 .pos = 0, \
Dpolicy_unpack.h84 void *pos; /* pointer to current position in the buffer */ member
/security/integrity/ima/
Dima_fs.c77 static void *ima_measurements_start(struct seq_file *m, loff_t *pos) in ima_measurements_start() argument
79 loff_t l = *pos; in ima_measurements_start()
94 static void *ima_measurements_next(struct seq_file *m, void *v, loff_t *pos) in ima_measurements_next() argument
104 (*pos)++; in ima_measurements_next()
/security/
Ddevice_cgroup.c551 struct cgroup_subsys_state *pos; in propagate_exception() local
556 css_for_each_descendant_pre(pos, &devcg_root->css) { in propagate_exception()
557 struct dev_cgroup *devcg = css_to_devcgroup(pos); in propagate_exception()
565 if (pos == &devcg_root->css || !is_devcg_online(devcg)) in propagate_exception()
/security/integrity/evm/
Devm_main.c894 struct list_head *pos, *q; in init_evm() local
911 list_for_each_safe(pos, q, &evm_config_xattrnames) in init_evm()
912 list_del(pos); in init_evm()

12