__vec_find(9)
π
__vec_find β the kernel API manual, but make it make sense
okay so bestie, welcome to __vec_find(9) from the Kernel API Manual β¨ this one lives in the AppArmor label code and it's lowkey a little lookup goblin. let's get into it π«Ά
πΈ NAME πΈ
__vec_find β find the label that matches @vec in the label set π
π SYNOPSIS π
struct aa_label * __vec_find (struct aa_profile **vec , int n );
like, that's the whole signature. she's compact. she's iconic. π
π¦ ARGUMENTS π¦
vecβ the vec of profiles you wanna find the matching label for. and listen, this one is NOT NULL β do not come in here with a NULL, bestie, that's not the vibe πnβ the length ofvec. yes, she needs to know how long it is. periodt.
β DESCRIPTION β
okay so here's the requirement, and it's a big one: this function requires that the caller holds the vec_labelset(vec) lock π β and also that the caller holds a valid ref on l. no cap, you gotta have both of those locked down before you call her, or it's giving undefined chaos π
π RETURN π
so what do you get back? let's break it down:
- a ref counted label, if a matching label is in the tree π
- a ref counted label that is equiv to
lin the tree π - otherwise
NULL, if the vec equiv is not in the tree π
that's it, that's the return. choose your own adventure but it's kernel labels.
π SEE ALSO π
Kernel file ./security/apparmor/label.c β and girl, the friend group is LARGE, so buckle up π§:
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), __label_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)
likeβ¦ that's a whole group chat right there π every single one, we don't skip a single mutual π«Ά
β οΈ quick vibe check:vecis NOT NULL, and you must hold thevec_labelset(vec)lock and a valid ref onl. this is not optional, bestie, it's the whole assignment π₯
and that's the page!! brought to you by ./security/apparmor, dated October 2026, with __vec_find(9) right there in the corner being her cute little self β¨ mwah, go forth and 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