Lines Matching refs:label
18 #include "label.h"
31 struct aa_label *label)
36 *blob = 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);
51 AA_BUG(!label);
52 return 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
67 * __aa_task_raw_label - retrieve another task's label
70 * Returns: @task's label without incrementing its ref count
80 * aa_current_raw_label - find the current tasks confining label
82 * Returns: up to date confining label or the ns unconfined label (NOT NULL)
85 * of the label so it is safe to call when inside of locks.
93 * aa_get_current_label - get the newest version of the current tasks label
95 * Returns: newest version of confining label (NOT NULL)
114 * @label: label reference to put
120 static inline void end_current_label_crit_section(struct aa_label *label)
122 if (label != aa_current_raw_label())
123 aa_put_label(label);
127 * __begin_current_label_crit_section - current's confining label
129 * Returns: up to date confining label or the ns unconfined label (NOT NULL)
140 struct aa_label *label = aa_current_raw_label();
142 if (label_is_stale(label))
143 label = aa_get_newest_label(label);
145 return label;
149 * begin_current_label_crit_section - current's confining label and update it
151 * Returns: up to date confining label or the ns unconfined label (NOT NULL)
162 struct aa_label *label = aa_current_raw_label();
166 if (label_is_stale(label)) {
167 label = aa_get_newest_label(label);
168 if (aa_replace_current_label(label) == 0)
170 aa_put_label(label);
173 return label;
178 struct aa_label *label;
181 label = __begin_current_label_crit_section();
182 ns = aa_get_ns(labels_ns(label));
183 __end_current_label_crit_section(label);