aa_replace_profiles(9)
π
aa_replace_profiles: the Kernel API Manual moment π
okay bestie, welcome to aa_replace_profiles(9) β yes, the Kernel API Manual page itself, but make it cute. Weβre talking profile replacement, namespace behavior, and the whole βold profile gets invalidatedβ situation. Buckle up, itβs giving kernel-core π
πΈ NAME πΈ
aa_replace_profiles β replace profile(s) on the profile list π«Ά
β¨ SYNOPSIS β¨
ssize_t aa_replace_profiles (struct aa_ns *policy_ns , struct aa_label
*label , u32 mask , struct aa_loaddata *udata , char *compressed_profile
, size_t compressed_size );
π ARGUMENTS π
policy_nsβ namespace load is occurring on πlabelβ label that is attempting to load/replace policy πmaskβ permission mask πudataβ serialized data stream (NOT NULL) βcompressed_profileβ The userspace-provided compressed profile. May beNULLπ¦compressed_sizeβ Ifcompressed_datais notNULL, the compressed data size π
π¦ DESCRIPTION π¦
So whatβs the vibe? It unpacks and replaces a profile on the profile list and uses of that profile by any task creds via invalidating the old version of the profile, which tasks will notice to update their own cred. If the profile does not exist on the profile list it is added. Periodt π
π₯ RETURN π₯
size of data consumed else error code on failure. No cap β thatβs the whole return situation π
π SEE ALSO π
Kernel file ./security/apparmor/policy.c β yes, thatβs the spot π
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)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_remove_profiles(9)
mwah π signing off from ./security/apparmor, timestamped October 2026, and yes bestie β this icon is aa_replace_profiles(9) πβ¨
π¦ 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