Lines Matching full:label
22 #include "label.h"
30 * aa_cred_raw_label - obtain cred's label
31 * @cred: cred to obtain label from (NOT NULL)
33 * Returns: confining label
39 struct aa_label *label = cred_label(cred); in aa_cred_raw_label() local
41 AA_BUG(!label); in aa_cred_raw_label()
42 return label; in aa_cred_raw_label()
46 * aa_get_newest_cred_label - obtain the newest label on a cred
47 * @cred: cred to obtain label from (NOT NULL)
49 * Returns: newest version of confining label
57 * __aa_task_raw_label - retrieve another task's label
60 * Returns: @task's label without incrementing its ref count
70 * aa_current_raw_label - find the current tasks confining label
72 * Returns: up to date confining label or the ns unconfined label (NOT NULL)
75 * of the label so it is safe to call when inside of locks.
83 * aa_get_current_label - get the newest version of the current tasks label
85 * Returns: newest version of confining label (NOT NULL)
104 * @label: label reference to put
110 static inline void end_current_label_crit_section(struct aa_label *label) in end_current_label_crit_section() argument
112 if (label != aa_current_raw_label()) in end_current_label_crit_section()
113 aa_put_label(label); in end_current_label_crit_section()
117 * __begin_current_label_crit_section - current's confining label
119 * Returns: up to date confining label or the ns unconfined label (NOT NULL)
130 struct aa_label *label = aa_current_raw_label(); in __begin_current_label_crit_section() local
132 if (label_is_stale(label)) in __begin_current_label_crit_section()
133 label = aa_get_newest_label(label); in __begin_current_label_crit_section()
135 return label; in __begin_current_label_crit_section()
139 * begin_current_label_crit_section - current's confining label and update it
141 * Returns: up to date confining label or the ns unconfined label (NOT NULL)
152 struct aa_label *label = aa_current_raw_label(); in begin_current_label_crit_section() local
156 if (label_is_stale(label)) { in begin_current_label_crit_section()
157 label = aa_get_newest_label(label); in begin_current_label_crit_section()
158 if (aa_replace_current_label(label) == 0) in begin_current_label_crit_section()
160 aa_put_label(label); in begin_current_label_crit_section()
163 return label; in begin_current_label_crit_section()
168 struct aa_label *label; in aa_get_current_ns() local
171 label = __begin_current_label_crit_section(); in aa_get_current_ns()
172 ns = aa_get_ns(labels_ns(label)); in aa_get_current_ns()
173 __end_current_label_crit_section(label); in aa_get_current_ns()