vec_cmp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vec_cmp(9) β€” the Kernel API Manual page you didn't know you needed

okay so bestie, welcome to vec_cmp(9), straight out of the Kernel API Manual. this one is lowkey tiny but it's doing real work: it's the label comparison for set ordering. iykyk πŸŽ€


✨ NAME ✨

vec_cmp β€” literally just label comparison for set ordering, no cap 🫢


🌸 SYNOPSIS 🌸

int vec_cmp (struct aa_profile * const *a , int an , struct aa_profile *
const *b , int bn );

yes the line break is right there in the signature, she's just like that πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • a β€” the aa_profile you're comparing (and ngl bestie, this one is NOT NULL, so do not play with me πŸ™ˆ)
  • an β€” the length of a ✨
  • b β€” the other aa_profile you're comparing (also NOT NULL β€” i said what i said 😭)
  • bn β€” the length of b πŸ“

πŸ‘‘ RETURN πŸ‘‘

okay so the vibe check results, in order:

  • <0 β€” if a < b πŸ’€
  • ==0 β€” if a == b πŸŽ€
  • >0 β€” if a > b πŸ”₯

periodt. that's the whole return contract, she's not complicated.


🌈 SEE ALSO 🌈

this is the part where she lists everyone she knows, and bestie she knows a LOT of people β€” all of these live in the kernel file ./security/apparmor/label.c, so go say hi πŸ‘‹

ns_cmp(9), profile_cmp(9), aa_vec_unique(9), aa_label_alloc(9), label_cmp(9), __aa_label_next_not_in_set(9), aa_label_is_subset(9), aa_label_is_unconfined_subset(9), __label_remove(9), __label_replace(9), __label_insert(9), __vec_find(9), __label_find(9), aa_label_remove(9), aa_label_replace(9), vec_find(9), aa_label_insert(9), aa_label_next_in_merge(9), label_merge_cmp(9), label_merge_insert(9), labelset_of_merge(9), __label_find_merge(9), aa_label_find_merge(9), aa_label_merge(9), label_compound_match(9), label_components_match(9), aa_label_match(9), aa_update_label_name(9), aa_profile_snxprint(9), aa_label_snxprint(9), aa_label_asxprint(9), aa_label_acntsxprint(9), aa_label_strn_parse(9), aa_labelset_destroy(9), __label_update(9), __labelset_update(9), __aa_labelset_update_subtree(9)

like, the whole friend group fr fr 🌸


and that's the page, bestie!! this icon dropped from ./security/apparmor back in October 2026, so jot that down in your notes app and go compare some labels πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from