Lines Matching +full:num +full:- +full:strings

1 /* SPDX-License-Identifier: GPL-2.0-only */
7 * Copyright (C) 1998-2008 Novell/SUSE
8 * Copyright 2009-2010 Canonical Ltd.
44 ((_profile)->mode == (_mode)))
52 #define PROFILE_IS_HAT(_profile) ((_profile)->label.flags & FLAG_HAT)
54 #define CHECK_DEBUG1(_profile) ((_profile)->label.flags & FLAG_DEBUG1)
56 #define CHECK_DEBUG2(_profile) ((_profile)->label.flags & FLAG_DEBUG2)
58 #define profile_is_stale(_profile) (label_is_stale(&(_profile)->label))
60 #define on_list_rcu(X) (!list_empty(X) && (X)->prev != LIST_POISON2)
84 u32 count; /* number of strings per entry */
85 u32 size; /* size of all strings covered by count */
95 u32 size; /* number of headers == num of strs */
101 /* struct aa_policydb - match engine for a policy
106 * @trans: table of strings, index by x
107 * @tags: table of tags that perms->tag indexes
130 * aa_get_pdb - increment refcount on @pdb
139 kref_get(&(pdb->count)); in aa_get_pdb()
145 * aa_put_pdb - put a pdb refcount
153 kref_put(&pdb->count, aa_pdb_free_kref); in aa_put_pdb()
160 unsigned int index = ACCEPT_TABLE(policy->dfa)[state]; in aa_lookup_perms()
162 if (!(policy->perms)) in aa_lookup_perms()
165 return &(policy->perms[index]); in aa_lookup_perms()
168 /* struct aa_data - generic data structure
181 /* struct aa_ruleset - data covering mediation rules
206 /* struct aa_attachment - data and rules for a profiles attachment
222 /* struct aa_profile - basic confinement data
223 * @base - base components of the profile (name, refcount, lists, lock ...)
242 * @data: hashtable for free-form policy aa_data
243 * @label - label this profile is an extension of
244 * @rules - label with the rule vec on its end
280 /* special - variable length must be last entry in profile */
290 #define profiles_ns(P) ((P)->ns)
291 #define name_is_shared(A, B) ((A)->hname && (A)->hname == (B)->hname)
313 #define profile_unconfined(X) ((X)->mode == APPARMOR_UNCONFINED)
316 * aa_get_newest_profile - simple wrapper fn to wrap the label version
325 return labels_profile(aa_get_newest_label(&p->label)); in aa_get_newest_profile()
332 return rules->policy->start[class]; in RULE_MEDIATES()
334 return aa_dfa_match_len(rules->policy->dfa, in RULE_MEDIATES()
335 rules->policy->start[0], &class, 1); in RULE_MEDIATES()
363 return label_mediates(&profile->label, class); in profile_mediates()
369 return label_mediates_safe(&profile->label, class); in profile_mediates_safe()
373 * aa_get_profile - increment refcount on profile @p
382 kref_get(&(p->label.count.count)); in aa_get_profile()
388 * aa_get_profile_not0 - increment refcount on profile @p found via lookup
396 if (p && kref_get_unless_zero(&p->label.count.count)) in aa_get_profile_not0()
403 * aa_get_profile_rcu - increment a refcount profile that can be replaced
416 } while (c && !kref_get_unless_zero(&c->label.count.count)); in aa_get_profile_rcu()
423 * aa_put_profile - decrement refcount on profile @p
429 kref_put(&p->label.count.count, aa_label_kref); in aa_put_profile()
437 return profile->audit; in AUDIT_MODE()