__label_find(9)
π __label_find β the NAME moment π
okay so first things first: we're in the Kernel API Manual, section 9, and this page is literally titled __label_find(9). it's giving "find a label in a label set" energy and honestly? iconic. let's get into it bestie π¦
β¨ SYNOPSIS β¨
struct aa_label * __label_find (struct aa_label *label );
that's the whole vibe. one function, one arg, returns a struct aa_label *. slay.
πΈ ARGUMENTS πΈ
labelβ the label you're tryna find. and bestie, listen: it's NOT NULL. like, don't even think about passing NULL, that's not the move π
π DESCRIPTION π
okay so the requirements here are so important, don't skip them:
Requires: labels_set(label)->lock held β that's the lock from labels_set(label), and you gotta be holding it. also the caller has to hold a valid ref on l. no cap, that's the deal π
π RETURN π
so what do you actually get back? two slay outcomes and one sad one:
- a ref counted label if
labelis in the tree π - a ref counted label that is equivalent to
labelin the tree β so like, not the exact same one but it is giving the same thing β¨ NULLif neitherlabelnor its equivalent is in the tree π that's the flop case
π₯ SEE ALSO π₯
the link-up list is long and every single one of these is a main character. no skips, no cuts π«Ά
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)aa_label_remove(9)aa_label_replace(9)vec_find(9)aa_label_insert(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)
also, for the record, these all live in the kernel file ./security/apparmor/label.c β that's the source location, iykyk π
okay that's the whole page, bestie π this one came out of ./security/apparmor, dated October 2026, and it's filed under __label_find(9). drink some water, hold your lock, and go find those labels β¨π§ββοΈ
π¦ 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