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
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) in end_current_label_crit_section() argument
109 if (label != aa_current_raw_label()) in end_current_label_crit_section()
110 aa_put_label(label); in end_current_label_crit_section()
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(); in __begin_current_label_crit_section() local
129 if (label_is_stale(label)) in __begin_current_label_crit_section()
130 label = aa_get_newest_label(label); in __begin_current_label_crit_section()
132 return label; in __begin_current_label_crit_section()
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(); in begin_current_label_crit_section() local
153 if (label_is_stale(label)) { in begin_current_label_crit_section()
154 label = aa_get_newest_label(label); in begin_current_label_crit_section()
155 if (aa_replace_current_label(label) == 0) in begin_current_label_crit_section()
157 aa_put_label(label); in begin_current_label_crit_section()
160 return label; in begin_current_label_crit_section()
165 struct aa_label *label; in aa_get_current_ns() local
168 label = __begin_current_label_crit_section(); in aa_get_current_ns()
169 ns = aa_get_ns(labels_ns(label)); in aa_get_current_ns()
170 __end_current_label_crit_section(label); in aa_get_current_ns()