Home
last modified time | relevance | path

Searched refs:dfa (Results 1 – 20 of 20) sorted by relevance

/linux-5.19.10/security/apparmor/
Dmatch.c197 static int verify_dfa(struct aa_dfa *dfa) in verify_dfa() argument
202 state_count = dfa->tables[YYTD_ID_BASE]->td_lolen; in verify_dfa()
203 trans_count = dfa->tables[YYTD_ID_NXT]->td_lolen; in verify_dfa()
207 if (!(BASE_TABLE(dfa)[i] & MATCH_FLAG_DIFF_ENCODE) && in verify_dfa()
208 (DEFAULT_TABLE(dfa)[i] >= state_count)) in verify_dfa()
210 if (BASE_TABLE(dfa)[i] & MATCH_FLAGS_INVALID) { in verify_dfa()
214 if ((BASE_TABLE(dfa)[i] & MATCH_FLAG_DIFF_ENCODE)) { in verify_dfa()
215 if (!(dfa->flags & YYTH_FLAG_DIFF_ENCODE)) { in verify_dfa()
220 if ((BASE_TABLE(dfa)[i] & MATCH_FLAG_OOB_TRANSITION)) { in verify_dfa()
221 if (base_idx(BASE_TABLE(dfa)[i]) < dfa->max_oob) { in verify_dfa()
[all …]
Dmount.c193 static unsigned int match_mnt_flags(struct aa_dfa *dfa, unsigned int state, in match_mnt_flags() argument
200 state = aa_dfa_next(dfa, state, i + 1); in match_mnt_flags()
213 static struct aa_perms compute_mnt_perms(struct aa_dfa *dfa, in compute_mnt_perms() argument
217 .allow = dfa_user_allow(dfa, state), in compute_mnt_perms()
218 .audit = dfa_user_audit(dfa, state), in compute_mnt_perms()
219 .quiet = dfa_user_quiet(dfa, state), in compute_mnt_perms()
220 .xindex = dfa_user_xindex(dfa, state), in compute_mnt_perms()
240 static int do_match_mnt(struct aa_dfa *dfa, unsigned int start, in do_match_mnt() argument
247 AA_BUG(!dfa); in do_match_mnt()
250 state = aa_dfa_match(dfa, start, mntpnt); in do_match_mnt()
[all …]
Dfile.c215 struct aa_perms aa_compute_fperms(struct aa_dfa *dfa, unsigned int state, in aa_compute_fperms() argument
226 perms.allow = map_old_perms(dfa_user_allow(dfa, state)); in aa_compute_fperms()
227 perms.audit = map_old_perms(dfa_user_audit(dfa, state)); in aa_compute_fperms()
228 perms.quiet = map_old_perms(dfa_user_quiet(dfa, state)); in aa_compute_fperms()
229 perms.xindex = dfa_user_xindex(dfa, state); in aa_compute_fperms()
231 perms.allow = map_old_perms(dfa_other_allow(dfa, state)); in aa_compute_fperms()
232 perms.audit = map_old_perms(dfa_other_audit(dfa, state)); in aa_compute_fperms()
233 perms.quiet = map_old_perms(dfa_other_quiet(dfa, state)); in aa_compute_fperms()
234 perms.xindex = dfa_other_xindex(dfa, state); in aa_compute_fperms()
239 if (ACCEPT_TABLE(dfa)[state] & 0x80000000) in aa_compute_fperms()
[all …]
Dpolicy_unpack.c446 struct aa_dfa *dfa = NULL; in unpack_dfa() local
460 dfa = aa_dfa_unpack(blob + pad, size - pad, flags); in unpack_dfa()
462 if (IS_ERR(dfa)) in unpack_dfa()
463 return dfa; in unpack_dfa()
467 return dfa; in unpack_dfa()
831 profile->policy.dfa = unpack_dfa(e); in unpack_profile()
832 if (IS_ERR(profile->policy.dfa)) { in unpack_profile()
833 error = PTR_ERR(profile->policy.dfa); in unpack_profile()
834 profile->policy.dfa = NULL; in unpack_profile()
836 } else if (!profile->policy.dfa) { in unpack_profile()
[all …]
Dlib.c325 void aa_compute_perms(struct aa_dfa *dfa, unsigned int state, in aa_compute_perms() argument
329 .allow = dfa_user_allow(dfa, state), in aa_compute_perms()
330 .audit = dfa_user_audit(dfa, state), in aa_compute_perms()
331 .quiet = dfa_user_quiet(dfa, state), in aa_compute_perms()
337 perms->allow |= map_other(dfa_other_allow(dfa, state)); in aa_compute_perms()
338 perms->audit |= map_other(dfa_other_audit(dfa, state)); in aa_compute_perms()
339 perms->quiet |= map_other(dfa_other_quiet(dfa, state)); in aa_compute_perms()
387 state = aa_dfa_next(profile->policy.dfa, in aa_profile_match_label()
Ddomain.c105 state = aa_dfa_match(profile->file.dfa, state, "&"); in match_component()
107 return aa_dfa_match(profile->file.dfa, state, tp->base.hname); in match_component()
111 state = aa_dfa_match_len(profile->file.dfa, state, ":", 1); in match_component()
112 state = aa_dfa_match(profile->file.dfa, state, ns_name); in match_component()
113 state = aa_dfa_match_len(profile->file.dfa, state, ":", 1); in match_component()
114 return aa_dfa_match(profile->file.dfa, state, tp->base.hname); in match_component()
160 state = aa_dfa_match(profile->file.dfa, state, "//&"); in label_compound_match()
165 *perms = aa_compute_fperms(profile->file.dfa, state, &cond); in label_compound_match()
218 tmp = aa_compute_fperms(profile->file.dfa, state, &cond); in label_components_match()
227 tmp = aa_compute_fperms(profile->file.dfa, state, &cond); in label_components_match()
[all …]
Dnet.c126 state = aa_dfa_match_len(profile->policy.dfa, state, (char *) &buffer, in aa_profile_af_perm()
128 aa_compute_perms(profile->policy.dfa, state, &perms); in aa_profile_af_perm()
Dpolicy_ns.c111 ns->unconfined->file.dfa = aa_get_dfa(nulldfa); in alloc_ns()
112 ns->unconfined->policy.dfa = aa_get_dfa(nulldfa); in alloc_ns()
Dlabel.c1275 return aa_dfa_match(profile->policy.dfa, state, tp->base.hname); in match_component()
1279 state = aa_dfa_match_len(profile->policy.dfa, state, ":", 1); in match_component()
1280 state = aa_dfa_match(profile->policy.dfa, state, ns_name); in match_component()
1281 state = aa_dfa_match_len(profile->policy.dfa, state, ":", 1); in match_component()
1282 return aa_dfa_match(profile->policy.dfa, state, tp->base.hname); in match_component()
1326 state = aa_dfa_match(profile->policy.dfa, state, "//&"); in label_compound_match()
1331 aa_compute_perms(profile->policy.dfa, state, perms); in label_compound_match()
1382 aa_compute_perms(profile->policy.dfa, state, &tmp); in label_components_match()
1391 aa_compute_perms(profile->policy.dfa, state, &tmp); in label_components_match()
Dapparmorfs.c612 struct aa_dfa *dfa; in profile_query_cb() local
617 if (profile->file.dfa && *match_str == AA_CLASS_FILE) { in profile_query_cb()
618 dfa = profile->file.dfa; in profile_query_cb()
619 state = aa_dfa_match_len(dfa, profile->file.start, in profile_query_cb()
624 tmp = aa_compute_fperms(dfa, state, &cond); in profile_query_cb()
626 } else if (profile->policy.dfa) { in profile_query_cb()
629 dfa = profile->policy.dfa; in profile_query_cb()
630 state = aa_dfa_match_len(dfa, profile->policy.start[0], in profile_query_cb()
633 aa_compute_perms(dfa, state, &tmp); in profile_query_cb()
Dipc.c200 state = aa_dfa_next(profile->policy.dfa, in profile_signal_perm()
Dpolicy.c234 aa_put_dfa(profile->policy.dfa); in aa_free_profile()
547 profile->file.dfa = aa_get_dfa(nulldfa); in aa_new_null_profile()
548 profile->policy.dfa = aa_get_dfa(nulldfa); in aa_new_null_profile()
/linux-5.19.10/security/apparmor/include/
Dfile.h143 #define dfa_user_allow(dfa, state) (((ACCEPT_TABLE(dfa)[state]) & 0x7f) | \ argument
144 ((ACCEPT_TABLE(dfa)[state]) & 0x80000000))
145 #define dfa_user_audit(dfa, state) ((ACCEPT_TABLE2(dfa)[state]) & 0x7f) argument
146 #define dfa_user_quiet(dfa, state) (((ACCEPT_TABLE2(dfa)[state]) >> 7) & 0x7f) argument
147 #define dfa_user_xindex(dfa, state) \ argument
148 (dfa_map_xindex(ACCEPT_TABLE(dfa)[state] & 0x3fff))
150 #define dfa_other_allow(dfa, state) ((((ACCEPT_TABLE(dfa)[state]) >> 14) & \ argument
152 ((ACCEPT_TABLE(dfa)[state]) & 0x80000000))
153 #define dfa_other_audit(dfa, state) (((ACCEPT_TABLE2(dfa)[state]) >> 14) & 0x7f) argument
154 #define dfa_other_quiet(dfa, state) \ argument
[all …]
Dmatch.h129 unsigned int aa_dfa_match_len(struct aa_dfa *dfa, unsigned int start,
131 unsigned int aa_dfa_match(struct aa_dfa *dfa, unsigned int start,
133 unsigned int aa_dfa_next(struct aa_dfa *dfa, unsigned int state,
135 unsigned int aa_dfa_outofband_transition(struct aa_dfa *dfa,
137 unsigned int aa_dfa_match_until(struct aa_dfa *dfa, unsigned int start,
139 unsigned int aa_dfa_matchn_until(struct aa_dfa *dfa, unsigned int start,
159 unsigned int aa_dfa_leftmatch(struct aa_dfa *dfa, unsigned int start,
169 static inline struct aa_dfa *aa_get_dfa(struct aa_dfa *dfa) in aa_get_dfa() argument
171 if (dfa) in aa_get_dfa()
172 kref_get(&(dfa->count)); in aa_get_dfa()
[all …]
Dpolicy.h75 struct aa_dfa *dfa; member
222 return aa_dfa_match_len(profile->policy.dfa, in PROFILE_MEDIATES()
233 return aa_dfa_match_len(profile->policy.dfa, state, (char *) &be_af, 2); in PROFILE_MEDIATES_AF()
Dlib.h90 static inline unsigned int aa_dfa_null_transition(struct aa_dfa *dfa, in aa_dfa_null_transition() argument
94 return aa_dfa_next(dfa, start, 0); in aa_dfa_null_transition()
Dperms.h144 void aa_compute_perms(struct aa_dfa *dfa, unsigned int state,
/linux-5.19.10/arch/mips/include/asm/octeon/
Dcvmx-npi-defs.h2240 uint64_t dfa:1; member
2254 uint64_t dfa:1;
2309 uint64_t dfa:1; member
2323 uint64_t dfa:1;
2380 uint64_t dfa:1; member
2394 uint64_t dfa:1;
2447 uint64_t dfa:1; member
2461 uint64_t dfa:1;
Dcvmx-npei-defs.h3732 uint64_t dfa:1; member
3746 uint64_t dfa:1;
/linux-5.19.10/drivers/staging/octeon/
Docteon-stubs.h1031 uint64_t dfa:1; member
1066 uint64_t dfa:1; member
1101 uint64_t dfa:1; member
1132 uint64_t dfa:1; member