aa_replace_profiles(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 be NULL πŸ¦‹
  • compressed_size β€” If compressed_data is not NULL, 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 πŸ‘€


mwah πŸ’‹ signing off from ./security/apparmor, timestamped October 2026, and yes bestie β€” this icon is aa_replace_profiles(9) πŸŽ€βœ¨

πŸ“¦ where this page comes from