__add_profile(9)
π __add_profile β the Kernel API glow-up π
okay so bestie, this one lives in the Kernel API Manual (section 9, kernel land, we love her) and honestly? she's giving "small function, big responsibilities" energy. π
β¨ NAME β¨
__add_profile β adds a profile to the list and to the label tree π¦
πΈ SYNOPSIS πΈ
void __add_profile (struct list_head *list , struct aa_profile *profile );
that's it. that's the whole signature. no cap. π
π ARGUMENTS π
listβ the list you're adding it to. it is NOT NULL, and like... we mean it, bestie. don't come in here with a null pointer πprofileβ the profile itself. also NOT NULL. also non-negotiable. β¨
π«Ά DESCRIPTION π«Ά
so what's actually happening: it refcounts the profile, which is the polite way of saying it takes a reference on it. that means whoever comes along later has to clean up after themselves with __list_remove_profile. put it back. balance the books. be a good citizen. π
β οΈ Requires: the namespace lock must be held β or the list must not be shared. this is not a vibe suggestion, it's a rule. read it, screenshot it, remember it. π₯
π SEE ALSO π
y'all, the friend group here is huge. family reunion time:
- kernel file
./security/apparmor/policy.cπ aa_pdb_free_kref(9)__list_remove_profile(9)__remove_profile(9)__aa_profile_list_release(9)aa_free_data(9)aa_free_profile(9)aa_alloc_profile(9)__strn_find_child(9)__find_child(9)aa_find_child(9)__lookup_parent(9)__create_missing_ancestors(9)__lookupn_profile(9)aa_lookupn_profile(9)__aa_new_learning_profile(9)replacement_allowed(9)audit_policy(9)aa_policy_view_capable(9)aa_may_manage_policy(9)__replace_profile(9)__lookup_replace(9)aa_replace_profiles(9)aa_remove_profiles(9)
like I said. big friend group. go say hi. π
anyway bestie that's the whole page π§ this icon came from the ./security/apparmor corner of the kernel and it was dated October 2026 β so mark your calendar and stan responsibly. 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