/Linux-v4.19/security/apparmor/ |
D | match.c | 198 static int verify_dfa(struct aa_dfa *dfa) in verify_dfa() argument 203 state_count = dfa->tables[YYTD_ID_BASE]->td_lolen; in verify_dfa() 204 trans_count = dfa->tables[YYTD_ID_NXT]->td_lolen; in verify_dfa() 206 if (!(BASE_TABLE(dfa)[i] & MATCH_FLAG_DIFF_ENCODE) && in verify_dfa() 207 (DEFAULT_TABLE(dfa)[i] >= state_count)) in verify_dfa() 209 if (base_idx(BASE_TABLE(dfa)[i]) + 255 >= trans_count) { in verify_dfa() 216 if (NEXT_TABLE(dfa)[i] >= state_count) in verify_dfa() local 218 if (CHECK_TABLE(dfa)[i] >= state_count) in verify_dfa() local 227 (BASE_TABLE(dfa)[j] & MATCH_FLAG_DIFF_ENCODE) && in verify_dfa() 228 !(BASE_TABLE(dfa)[j] & MARK_DIFF_ENCODE); in verify_dfa() [all …]
|
D | mount.c | 196 static unsigned int match_mnt_flags(struct aa_dfa *dfa, unsigned int state, in match_mnt_flags() argument 203 state = aa_dfa_next(dfa, state, i + 1); in match_mnt_flags() 216 static struct aa_perms compute_mnt_perms(struct aa_dfa *dfa, in compute_mnt_perms() argument 220 .allow = dfa_user_allow(dfa, state), in compute_mnt_perms() 221 .audit = dfa_user_audit(dfa, state), in compute_mnt_perms() 222 .quiet = dfa_user_quiet(dfa, state), in compute_mnt_perms() 223 .xindex = dfa_user_xindex(dfa, state), in compute_mnt_perms() 242 static int do_match_mnt(struct aa_dfa *dfa, unsigned int start, in do_match_mnt() argument 249 AA_BUG(!dfa); in do_match_mnt() 252 state = aa_dfa_match(dfa, start, mntpnt); in do_match_mnt() [all …]
|
D | policy_unpack.c | 403 struct aa_dfa *dfa = NULL; in unpack_dfa() local 417 dfa = aa_dfa_unpack(blob + pad, size - pad, flags); in unpack_dfa() 419 if (IS_ERR(dfa)) in unpack_dfa() 420 return dfa; in unpack_dfa() 424 return dfa; in unpack_dfa() 733 profile->policy.dfa = unpack_dfa(e); in unpack_profile() 734 if (IS_ERR(profile->policy.dfa)) { in unpack_profile() 735 error = PTR_ERR(profile->policy.dfa); in unpack_profile() 736 profile->policy.dfa = NULL; in unpack_profile() 738 } else if (!profile->policy.dfa) { in unpack_profile() [all …]
|
D | file.c | 228 struct aa_perms aa_compute_fperms(struct aa_dfa *dfa, unsigned int state, in aa_compute_fperms() argument 239 perms.allow = map_old_perms(dfa_user_allow(dfa, state)); in aa_compute_fperms() 240 perms.audit = map_old_perms(dfa_user_audit(dfa, state)); in aa_compute_fperms() 241 perms.quiet = map_old_perms(dfa_user_quiet(dfa, state)); in aa_compute_fperms() 242 perms.xindex = dfa_user_xindex(dfa, state); in aa_compute_fperms() 244 perms.allow = map_old_perms(dfa_other_allow(dfa, state)); in aa_compute_fperms() 245 perms.audit = map_old_perms(dfa_other_audit(dfa, state)); in aa_compute_fperms() 246 perms.quiet = map_old_perms(dfa_other_quiet(dfa, state)); in aa_compute_fperms() 247 perms.xindex = dfa_other_xindex(dfa, state); in aa_compute_fperms() 252 if (ACCEPT_TABLE(dfa)[state] & 0x80000000) in aa_compute_fperms() [all …]
|
D | lib.c | 327 void aa_compute_perms(struct aa_dfa *dfa, unsigned int state, in aa_compute_perms() argument 331 .allow = dfa_user_allow(dfa, state), in aa_compute_perms() 332 .audit = dfa_user_audit(dfa, state), in aa_compute_perms() 333 .quiet = dfa_user_quiet(dfa, state), in aa_compute_perms() 339 perms->allow |= map_other(dfa_other_allow(dfa, state)); in aa_compute_perms() 340 perms->audit |= map_other(dfa_other_audit(dfa, state)); in aa_compute_perms() 341 perms->quiet |= map_other(dfa_other_quiet(dfa, state)); in aa_compute_perms() 389 state = aa_dfa_next(profile->policy.dfa, in aa_profile_match_label()
|
D | domain.c | 108 state = aa_dfa_match(profile->file.dfa, state, "&"); in match_component() 110 return aa_dfa_match(profile->file.dfa, state, tp->base.hname); in match_component() 114 state = aa_dfa_match_len(profile->file.dfa, state, ":", 1); in match_component() 115 state = aa_dfa_match(profile->file.dfa, state, ns_name); in match_component() 116 state = aa_dfa_match_len(profile->file.dfa, state, ":", 1); in match_component() 117 return aa_dfa_match(profile->file.dfa, state, tp->base.hname); in match_component() 163 state = aa_dfa_match(profile->file.dfa, state, "//&"); in label_compound_match() 168 *perms = aa_compute_fperms(profile->file.dfa, state, &cond); in label_compound_match() 221 tmp = aa_compute_fperms(profile->file.dfa, state, &cond); in label_components_match() 230 tmp = aa_compute_fperms(profile->file.dfa, state, &cond); in label_components_match() [all …]
|
D | net.c | 127 state = aa_dfa_match_len(profile->policy.dfa, state, (char *) &buffer, in aa_profile_af_perm() 129 aa_compute_perms(profile->policy.dfa, state, &perms); in aa_profile_af_perm()
|
D | policy_ns.c | 115 ns->unconfined->file.dfa = aa_get_dfa(nulldfa); in alloc_ns() 116 ns->unconfined->policy.dfa = aa_get_dfa(nulldfa); in alloc_ns()
|
D | label.c | 1252 return aa_dfa_match(profile->policy.dfa, state, tp->base.hname); in match_component() 1256 state = aa_dfa_match_len(profile->policy.dfa, state, ":", 1); in match_component() 1257 state = aa_dfa_match(profile->policy.dfa, state, ns_name); in match_component() 1258 state = aa_dfa_match_len(profile->policy.dfa, state, ":", 1); in match_component() 1259 return aa_dfa_match(profile->policy.dfa, state, tp->base.hname); in match_component() 1303 state = aa_dfa_match(profile->policy.dfa, state, "//&"); in label_compound_match() 1308 aa_compute_perms(profile->policy.dfa, state, perms); in label_compound_match() 1359 aa_compute_perms(profile->policy.dfa, state, &tmp); in label_components_match() 1368 aa_compute_perms(profile->policy.dfa, state, &tmp); in label_components_match()
|
D | apparmorfs.c | 607 struct aa_dfa *dfa; in profile_query_cb() local 612 if (profile->file.dfa && *match_str == AA_CLASS_FILE) { in profile_query_cb() 613 dfa = profile->file.dfa; in profile_query_cb() 614 state = aa_dfa_match_len(dfa, profile->file.start, in profile_query_cb() 619 tmp = aa_compute_fperms(dfa, state, &cond); in profile_query_cb() 621 } else if (profile->policy.dfa) { in profile_query_cb() 624 dfa = profile->policy.dfa; in profile_query_cb() 625 state = aa_dfa_match_len(dfa, profile->policy.start[0], in profile_query_cb() 628 aa_compute_perms(dfa, state, &tmp); in profile_query_cb()
|
D | policy.c | 236 aa_put_dfa(profile->policy.dfa); in aa_free_profile() 549 profile->file.dfa = aa_get_dfa(nulldfa); in aa_new_null_profile() 550 profile->policy.dfa = aa_get_dfa(nulldfa); in aa_new_null_profile()
|
D | ipc.c | 203 state = aa_dfa_next(profile->policy.dfa, in profile_signal_perm()
|
/Linux-v4.19/security/apparmor/include/ |
D | file.h | 144 #define dfa_user_allow(dfa, state) (((ACCEPT_TABLE(dfa)[state]) & 0x7f) | \ argument 145 ((ACCEPT_TABLE(dfa)[state]) & 0x80000000)) 146 #define dfa_user_audit(dfa, state) ((ACCEPT_TABLE2(dfa)[state]) & 0x7f) argument 147 #define dfa_user_quiet(dfa, state) (((ACCEPT_TABLE2(dfa)[state]) >> 7) & 0x7f) argument 148 #define dfa_user_xindex(dfa, state) \ argument 149 (dfa_map_xindex(ACCEPT_TABLE(dfa)[state] & 0x3fff)) 151 #define dfa_other_allow(dfa, state) ((((ACCEPT_TABLE(dfa)[state]) >> 14) & \ argument 153 ((ACCEPT_TABLE(dfa)[state]) & 0x80000000)) 154 #define dfa_other_audit(dfa, state) (((ACCEPT_TABLE2(dfa)[state]) >> 14) & 0x7f) argument 155 #define dfa_other_quiet(dfa, state) \ argument [all …]
|
D | match.h | 128 unsigned int aa_dfa_match_len(struct aa_dfa *dfa, unsigned int start, 130 unsigned int aa_dfa_match(struct aa_dfa *dfa, unsigned int start, 132 unsigned int aa_dfa_next(struct aa_dfa *dfa, unsigned int state, 134 unsigned int aa_dfa_match_until(struct aa_dfa *dfa, unsigned int start, 136 unsigned int aa_dfa_matchn_until(struct aa_dfa *dfa, unsigned int start, 157 unsigned int aa_dfa_leftmatch(struct aa_dfa *dfa, unsigned int start, 167 static inline struct aa_dfa *aa_get_dfa(struct aa_dfa *dfa) in aa_get_dfa() argument 169 if (dfa) in aa_get_dfa() 170 kref_get(&(dfa->count)); in aa_get_dfa() 172 return dfa; in aa_get_dfa() [all …]
|
D | policy.h | 79 struct aa_dfa *dfa; member 225 return aa_dfa_match_len(profile->policy.dfa, state, (char *) &be_af, 2); in PROFILE_MEDIATES_AF()
|
D | lib.h | 80 static inline unsigned int aa_dfa_null_transition(struct aa_dfa *dfa, in aa_dfa_null_transition() argument 84 return aa_dfa_next(dfa, start, 0); in aa_dfa_null_transition()
|
D | perms.h | 148 void aa_compute_perms(struct aa_dfa *dfa, unsigned int state,
|
/Linux-v4.19/arch/mips/include/asm/octeon/ |
D | cvmx-ciu2-defs.h | 852 uint64_t dfa:1; member 894 uint64_t dfa:1; 910 uint64_t dfa:1; member 948 uint64_t dfa:1; 967 uint64_t dfa:1; member 1009 uint64_t dfa:1; 1025 uint64_t dfa:1; member 1063 uint64_t dfa:1; 1082 uint64_t dfa:1; member 1124 uint64_t dfa:1; [all …]
|
D | cvmx-npi-defs.h | 2457 uint64_t dfa:1; member 2471 uint64_t dfa:1; 2526 uint64_t dfa:1; member 2540 uint64_t dfa:1; 2598 uint64_t dfa:1; member 2612 uint64_t dfa:1; 2666 uint64_t dfa:1; member 2680 uint64_t dfa:1;
|
D | cvmx-npei-defs.h | 3983 uint64_t dfa:1; member 3997 uint64_t dfa:1;
|