Lines Matching +full:state +full:- +full:labels

1 /* SPDX-License-Identifier: GPL-2.0-only */
38 (V) ? 0 : -ENOMEM; \
52 #define vec_last(VEC, SIZE) ((VEC)[(SIZE) - 1])
53 #define vec_ns(VEC, SIZE) (vec_last((VEC), (SIZE))->ns)
54 #define vec_labelset(VEC, SIZE) (&vec_ns((VEC), (SIZE))->labels)
55 #define cleanup_domain_vec(V, L) cleanup_label_vec((V), (L)->size)
66 /* struct aa_labelset - set of labels for a namespace
68 * Labels are reference counted; aa_labelset does not contribute to label
79 for ((N) = rb_first(&(LS)->root); (N); (N) = rb_next(N))
87 FLAG_USER_DEFINED = 0x20, /* user based profile - lower privs */
113 /* struct aa_label_base - base info of label
119 * @flags: stale and other flags - values may change under label set lock
157 #define label_isprofile(X) ((X)->flags & FLAG_PROFILE)
158 #define label_unconfined(X) ((X)->flags & FLAG_UNCONFINED)
160 #define label_is_stale(X) ((X)->flags & FLAG_STALE)
161 #define __label_make_stale(X) ((X)->flags |= FLAG_STALE)
162 #define labels_ns(X) (vec_ns(&((X)->vec[0]), (X)->size))
163 #define labels_set(X) (&labels_ns(X)->labels)
165 #define labels_profile(X) ((X)->vec[(X)->size - 1])
172 for ((I).i = 0; ((P) = (L)->vec[(I).i]); ++((I).i))
176 for (++((I).i); ((P) = (L)->vec[(I).i]); ++((I).i))
183 ((P) = (L)->vec[(I).i]); \
199 while ((L)->vec[___i] && (L)->vec[___i]->ns != (NS)) \
206 ((P) = (L)->vec[(I).i]); \
251 return (L)->mediates & (((u64) 1) << (C)); in label_mediates()
320 aa_state_t state; in aa_label_strn_split() local
322 state = aa_dfa_matchn_until(stacksplitdfa, DFA_START, str, n, &pos); in aa_label_strn_split()
323 if (!ACCEPT_TABLE(stacksplitdfa)[state]) in aa_label_strn_split()
326 return pos - 3; in aa_label_strn_split()
332 aa_state_t state; in aa_label_str_split() local
334 state = aa_dfa_match_until(stacksplitdfa, DFA_START, str, &pos); in aa_label_str_split()
335 if (!ACCEPT_TABLE(stacksplitdfa)[state]) in aa_label_str_split()
338 return pos - 3; in aa_label_str_split()
346 struct aa_label *label, aa_state_t state, bool subns,
351 * __aa_get_label - get a reference count to uncounted label reference
360 if (l && kref_get_unless_zero(&l->count)) in __aa_get_label()
369 kref_get(&(l->count)); in aa_get_label()
376 * aa_get_label_rcu - increment refcount on a label that can be replaced
389 } while (c && !kref_get_unless_zero(&c->count)); in aa_get_label_rcu()
396 * aa_get_newest_label - find the newest version of @l
411 AA_BUG(!l->proxy); in aa_get_newest_label()
412 AA_BUG(!l->proxy->label); in aa_get_newest_label()
417 tmp = aa_get_label_rcu(&l->proxy->label); in aa_get_newest_label()
429 kref_put(&l->count, aa_label_kref); in aa_put_label()
446 kref_get(&(proxy->count)); in aa_get_proxy()
454 kref_put(&proxy->count, aa_proxy_kref); in aa_put_proxy()