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_current_raw_label - find the current tasks confining label
69 * Returns: up to date confining label or the ns unconfined label (NOT NULL)
72 * of the label so it is safe to call when inside of locks.
80 * aa_get_current_label - get the newest version of the current tasks label
82 * Returns: newest version of confining label (NOT NULL)
101 * @label: label reference to put
107 static inline void end_current_label_crit_section(struct aa_label *label)
109 if (label != aa_current_raw_label())
110 aa_put_label(label);
114 * __begin_current_label_crit_section - current's confining label
116 * Returns: up to date confining label or the ns unconfined label (NOT NULL)
127 struct aa_label *label = aa_current_raw_label();
129 if (label_is_stale(label))
130 label = aa_get_newest_label(label);
132 return label;
136 * begin_current_label_crit_section - current's confining label and update it
138 * Returns: up to date confining label or the ns unconfined label (NOT NULL)
149 struct aa_label *label = aa_current_raw_label();
153 if (label_is_stale(label)) {
154 label = aa_get_newest_label(label);
155 if (aa_replace_current_label(label) == 0)
157 aa_put_label(label);
160 return label;
165 struct aa_label *label;
168 label = __begin_current_label_crit_section();
169 ns = aa_get_ns(labels_ns(label));
170 __end_current_label_crit_section(label);