aa_unpack(9)
π aa_unpack β a Kernel API Manual moment
okay so bestie, welcome to aa_unpack(9) β the kernel API manual page you didn't know you needed until right now. This is the one that unpacks the packed binary profile(s) data that got loaded in from user space. it's giving unboxing video but make it kernel. π
β¨ NAME β¨
aa_unpack β unpack packed binary profile(s) data loaded from user space
β¨ SYNOPSIS β¨
int aa_unpack (struct aa_loaddata *udata , struct list_head *lh , const
char **ns , char *compressed_data , size_t compressed_size );
look at that signature. iconic. five arguments, all of them main characters. π
β¨ ARGUMENTS β¨
udataβ the user data, copied to kmem. and yes bestie, this one isNOT NULLβ no cap, don't even think about passing a NULL here. πlhβ the list where the unpacked profiles get placed, inside anaa_repl_ws. this is the lil home the profiles move into. πnsβ returns the namespace the profile is in, if one was specified, elseNULL. alsoNOT NULLβ the pointer itself has to be real, even when what it points at ends upNULL. iykyk. β¨compressed_dataβ the userspace-provided compressed data. this one may beNULL, so it's lowkey chill. π¦compressed_sizeβ ifcompressed_datais notNULL, then this is the compressed data size. fr fr, they're a package deal. πΈ
β¨ DESCRIPTION β¨
okay so here's the vibe: it unpacks the user data and returns refcounted allocated profile(s) stored in lh, in order of discovery, with the list chain stored in base.list β or error. that's the whole assignment and it ate. π₯
β¨ RETURN β¨
profile(s) on lh π β¦ or an error pointer if it fails to unpack. and that's the vibe check β either you get the profiles or you get the error pointer, no in-between. π
π SEE ALSO π
Kernel file ./security/apparmor/policy_unpack.c, plus the whole friend group:
audit_iface(9)aa_unpack_u16_chunk(9)aa_unpack_nameX(9)unpack_dfa(9)unpack_strs_table(9)unpack_profile(9)verify_header(9)verify_dfa_accept_index(9)verify_profile(9)
literally the whole squad. go read them, bestie, they all slay. π«Ά
and that's the page!! π brought to you by ./security/apparmor, dated October 2026 β mwah, go unpack something cute, ily, bye! π§β¨π
π¦ 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