profile_cmp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… profile_cmp(9) β€” or, "how do we even order these profiles bestie"

okay so this page lives in the Kernel API Manual (section 9, kernel-adjacent girlies rise) and it's all about profile_cmp β€” the lil function that decides how profiles get ordered in a set. Think of it as the vibe-check bouncer for the set ordering line πŸ’–


✨ NAME ✨

profile_cmp β€” profile comparison for set ordering 🫢


🌸 SYNOPSIS 🌸

int profile_cmp (struct aa_profile *a , struct aa_profile *b );

πŸŽ€ ARGUMENTS πŸŽ€

  • a β€” the profile to compare (and like… it is NOT NULL, bestie, do not come for her with a NULL, she will not survive it πŸ™ˆ)
  • b β€” the other profile to compare (also NOT NULL, same energy, no NULLs allowed periodt πŸ’€)

⭐ RETURN ⭐

the return value is giving "three-way comparison" and here's the whole tea:

  • <0 when a < b
  • ==0 when a == b
  • >0 when a > b

like yes, that's it, that's the whole slay β€” sign of the result tells you who ranks first πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

this is the friend group, the whole squad, the group chat, and honestly they're all iconic. Kernel file ./security/apparmor/label.c is where the source lives btw:


πŸ’‘ tiny reminder bestie: a and b are both marked NOT NULL, so no funny business, no sneaky NULLs, mkay? the docs said it in all caps for a reason 😭

okay that's the whole page, and before you go β€” the source path is ./security/apparmor and this edition is dated October 2026 🌈 so like, yes, a little time-travel moment, we love that for us. mwah, go order some profiles πŸ’œπŸ¦‹

πŸ“¦ where this page comes from