aa_alloc_profile(9)
β¨ aa_alloc_profile(9) β Kernel API Manual, bestie edition β¨
okay so we're in the Kernel API Manual and today's main character is aa_alloc_profile(9) π
this one's short and sweet but like, actually important β it literally brings a brand-new profile into existence. no cap.
πΈ NAME πΈ
aa_alloc_profile β allocate, initialize and return a new profile π
π¦ SYNOPSIS π¦
struct aa_profile * aa_alloc_profile (const char *hname , struct
aa_proxy *proxy , gfp_t gfp );
like yes, that's three args, and yes, you gotta pass them all. π«Ά
β¨ ARGUMENTS β¨
hnameβ the name of the profile. and listen: it is NOT NULL. do not try it. this is not the vibe. πproxyβ the proxy to use ORnullif you want a brand new one allocated for you. your call, bestie πgfpβ the allocation type. that's it, that's the whole thing. π
π RETURN π
returns a refcounted profile π₯ β or NULL on failure, in which case, sad girl hours π but at least you know.
π SEE ALSO π
this is the part where we shout out the whole friend group π«Ά the Kernel file is ./security/apparmor/policy.c, and it wants you to also go look at:
aa_pdb_free_kref(9)__add_profile(9)__list_remove_profile(9)__remove_profile(9)__aa_profile_list_release(9)aa_free_data(9)aa_free_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 that's the whole group chat, screenshot it πΈ
ngl this page is short because the function just does its little job and slays. allocate, initialize, return. iconic behaviour, no notes. β
and that's a wrap, bestie π this one came from ./security/apparmor and it's dated October 2026 β so yeah, fresh off the press. 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