aa_restore_previous_label(9)
π aa_restore_previous_label(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β this one lives in section 9, and it's all about yeeting yourself out of a hat context and getting back to where you were. very main character exit energy, no cap π
β¨ NAME β¨
aa_restore_previous_label β exit from hat context restoring previous label ππ³οΈπ¨
πΈ SYNOPSIS πΈ
int aa_restore_previous_label (u64 token );
π¦ ARGUMENTS π¦
tokenβ the token that must be matched to exit hat context π like, it has to match, bestie, no random tokens getting through the door π
π DESCRIPTION π
Attempt to return out of a hat to the previous label. π©β‘οΈπ The token must match the stored token value β that's the vibe check, and if it doesn't pass, you're not leaving. periodt. π
β RETURN β
0 or error of failure π (yes, that's the whole mood β either it slays at 0 or it comes back with an error)
π SEE ALSO π
- Kernel file
./security/apparmor/task.c aa_get_task_label(9)aa_replace_current_label(9)aa_set_current_onexec(9)aa_set_current_hat(9)audit_ptrace_mask(9)aa_may_ptrace(9)
go read those too, iykyk π«Ά
π that's the whole page, bestie β written for the ./security/apparmor source, dated October 2026, and signed off with aa_restore_previous_label(9) because we stay on brand. mwah! ππ§ββοΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms