Lines Matching defs:profile

17  * the aa_task_cxt.profile, both of which are required and are not allowed
19 * to each cred (which is reference count). The profile pointed to by
50 aa_put_profile(cxt->profile);
66 aa_get_profile(new->profile);
72 * aa_get_task_profile - Get another task's profile
75 * Returns: counted reference to @task's profile
90 * @profile: new profile (NOT NULL)
94 int aa_replace_current_profile(struct aa_profile *profile)
98 BUG_ON(!profile);
100 if (cxt->profile == profile)
108 if (unconfined(profile) || (cxt->profile->ns != profile->ns))
109 /* if switching to unconfined or a different profile namespace
114 /* be careful switching cxt->profile, when racing replacement it
115 * is possible that cxt->profile->replacedby->profile is the reference
116 * keeping @profile valid, so make sure to get its reference before
117 * dropping the reference on cxt->profile */
118 aa_get_profile(profile);
119 aa_put_profile(cxt->profile);
120 cxt->profile = profile;
128 * @profile: system profile to set at exec (MAYBE NULL to clear value)
132 int aa_set_current_onexec(struct aa_profile *profile)
140 aa_get_profile(profile);
142 cxt->onexec = profile;
150 * @profile: profile to set as the current hat (NOT NULL)
158 int aa_set_current_hat(struct aa_profile *profile, u64 token)
164 BUG_ON(!profile);
169 cxt->previous = cxt->profile;
172 aa_put_profile(cxt->profile);
178 cxt->profile = aa_get_newest_profile(profile);
188 * aa_restore_previous_profile - exit from hat context restoring the profile
191 * Attempt to return out of a hat to the previous profile. The token
208 /* ignore restores when there is no saved profile */
214 aa_put_profile(cxt->profile);
215 cxt->profile = aa_get_newest_profile(cxt->previous);
216 BUG_ON(!cxt->profile);