aa_label_insert(9)
π aa_label_insert(9) β the kernel API manual, bestie edition π
okay so real talk, this one is from the Kernel API Manual and it's called aa_label_insert(9), and honestly? she's a tiny function with main character energy. let's get into it β¨
β¨ NAME β¨
aa_label_insert β insert label @label into @ls or return existing label π¦
like, either you get a fresh insert or you get handed the label that's already chilling in there. no drama, no duplicates. periodt.
πΈ SYNOPSIS πΈ
struct aa_label * aa_label_insert (struct aa_labelset *ls , struct
aa_label *label );
that's it. two args, one struct pointer back. slay π
π«Ά ARGUMENTS π«Ά
lsβ the labelset to insert label into. this is the group chat you're adding her to π¬labelβ the label to insert. the girl herself π
π DESCRIPTION π
Requires: caller to hold a valid ref on label π₯
no cap, that's the whole vibe check β if you don't hold a valid ref on label going in, that's on you, bestie. don't come crying to me π
β RETURN β
two possible outcomes, both ref counted (iykyk, mind your refs):
- ref counted label if successful in inserting
labelπ - else, a ref counted equivalent label that is already in the set π β so like, she was already there, you just get a ref to her.
either way you're walking away with a ref counted label. iconic. π
π SEE ALSO π
kernel file ./security/apparmor/label.c, plus this whole friend group:
ns_cmp(9)profile_cmp(9)vec_cmp(9)aa_vec_unique(9)aa_label_alloc(9)label_cmp(9)__aa_label_next_not_in_set(9)aa_label_is_subset(9)aa_label_is_unconfined_subset(9)__label_remove(9)__label_replace(9)__label_insert(9)__vec_find(9)__label_find(9)aa_label_remove(9)aa_label_replace(9)vec_find(9)aa_label_next_in_merge(9)label_merge_cmp(9)label_merge_insert(9)labelset_of_merge(9)__label_find_merge(9)aa_label_find_merge(9)aa_label_merge(9)label_compound_match(9)label_components_match(9)aa_label_match(9)aa_update_label_name(9)aa_profile_snxprint(9)aa_label_snxprint(9)aa_label_asxprint(9)aa_label_acntsxprint(9)aa_label_strn_parse(9)aa_labelset_destroy(9)__label_update(9)__labelset_update(9)__aa_labelset_update_subtree(9)
that's a whole squad, honestly. π
ngl, the description section is literally one line long, and I respect that level of "get to the point" energy so much π
okay that's the page!! and before I go β huge shoutout to the source ./security/apparmor, dated October 2026, page aa_label_insert(9). mwah, take care of your refs, bestie πππ§
π¦ 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