Lines Matching full:label

18 #include "label.h"
31 struct aa_label *label) in set_cred_label() argument
36 *blob = label; in set_cred_label()
40 * aa_cred_raw_label - obtain cred's label
41 * @cred: cred to obtain label from (NOT NULL)
43 * Returns: confining label
49 struct aa_label *label = cred_label(cred); in aa_cred_raw_label() local
51 AA_BUG(!label); in aa_cred_raw_label()
52 return label; in aa_cred_raw_label()
56 * aa_get_newest_cred_label - obtain the newest label on a cred
57 * @cred: cred to obtain label from (NOT NULL)
59 * Returns: newest version of confining label
87 * aa_current_raw_label - find the current tasks confining label
89 * Returns: up to date confining label or the ns unconfined label (NOT NULL)
92 * of the label so it is safe to call when inside of locks.
100 * aa_get_current_label - get the newest version of the current tasks label
102 * Returns: newest version of confining label (NOT NULL)
121 * @label: label reference to put
127 static inline void end_current_label_crit_section(struct aa_label *label) in end_current_label_crit_section() argument
129 if (label != aa_current_raw_label()) in end_current_label_crit_section()
130 aa_put_label(label); in end_current_label_crit_section()
134 * __begin_current_label_crit_section - current's confining label
136 * Returns: up to date confining label or the ns unconfined label (NOT NULL)
147 struct aa_label *label = aa_current_raw_label(); in __begin_current_label_crit_section() local
149 if (label_is_stale(label)) in __begin_current_label_crit_section()
150 label = aa_get_newest_label(label); in __begin_current_label_crit_section()
152 return label; in __begin_current_label_crit_section()
156 * begin_current_label_crit_section - current's confining label and update it
158 * Returns: up to date confining label or the ns unconfined label (NOT NULL)
169 struct aa_label *label = aa_current_raw_label(); in begin_current_label_crit_section() local
173 if (label_is_stale(label)) { in begin_current_label_crit_section()
174 label = aa_get_newest_label(label); in begin_current_label_crit_section()
175 if (aa_replace_current_label(label) == 0) in begin_current_label_crit_section()
177 aa_put_label(label); in begin_current_label_crit_section()
180 return label; in begin_current_label_crit_section()
185 struct aa_label *label; in aa_get_current_ns() local
188 label = __begin_current_label_crit_section(); in aa_get_current_ns()
189 ns = aa_get_ns(labels_ns(label)); in aa_get_current_ns()
190 __end_current_label_crit_section(label); in aa_get_current_ns()