begin_curren...crit_section(9)
π begin_current_label_crit_section(9) β the Kernel API Manual, bestie edition π
okay so you're in begin_curren...crit_section(9), which honestly is the most chopped-off manpage title ever (the terminal had ONE job π) but the full name is begin_current_label_crit_section and it lives in the Kernel API Manual. Buckle up, this one's short but she's important π
β¨ NAME β¨
begin_current_label_crit_section β literally grabs current's confining label and updates it. that's the whole vibe π¦
πΈ SYNOPSIS πΈ
struct aa_label * begin_current_label_crit_section (bool *needput );
copy it exactly, don't @ me π
π ARGUMENTS π
needputβ you hand her a pointer and she stores in it whether the label needs to be put when you're done with the crit section. it's giving "receipt for later" energy π§Ύβ¨
π RETURN π
she gives you back the up to date confining label or the ns unconfined label.
and it is NOT NULL, bestie. never null. not today, not ever. you do not have to null-check this one π
π₯ DESCRIPTION π₯
okay so here's the tea β the reference she returns? you must put it with end_current_label_crit_section. like, that's not optional, that's the whole deal. we do not leak references in this household π«Ά
and hear me out, because this is the important part: this should NOT be used if the task cred could be updated within the critical section between begin_current_label_crit_section .. end_current_label_crit_section. like genuinely don't, that's the one scenario where she's not your girl ππ
π SEE ALSO π
- Kernel file
./security/apparmor/include/cred.h aa_get_newest_cred_label(9)aa_current_raw_label(9)aa_get_current_label(9)__end_cred_crit_section(9)__begin_cred_crit_section(9)__end_current_label_crit_section(9)end_current_label_crit_section(9)__begin_current_label_crit_section(9)
go read them all, i'll wait π
that's the whole page fr fr β sourced straight from ./security/apparmor/include, dated October 2026, filed under begin_curren...crit_section(9) (yes the title is STILL cut off, iykyk π¦). mwah, go write some kernel code responsibly πβ
π¦ 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