aa_label_merge(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– aa_label_merge β€” Kernel API Manual, but make it make sense πŸ’–

okay so bestie, this is aa_label_merge(9) β€” yes the (9) is the kernel API section thing, iykyk β€” and it lives in the AppArmor label code. Buckle up, it's lowkey a glow-up moment for two labels that want to become one πŸ’…


✨ NAME ✨

aa_label_merge β€” attempt to insert new merged label of @a and @b 🫢


🌸 SYNOPSIS 🌸

struct aa_label * aa_label_merge (struct aa_label *a , struct aa_label *b , gfp_t gfp );

πŸŽ€ ARGUMENTS πŸŽ€

  • a β€” label to merge with b (NOT NULL, like, non-negotiable bestie πŸ™ˆ)
  • b β€” label to merge with a (NOT NULL, same energy, no exceptions πŸ’€)
  • gfp β€” memory allocation type ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

Requires: caller to hold valid refs on a and b labels be fully constructed with a valid ns

fr fr, that's the entry fee. Hold your refs, have both labels fully constructed, and make sure the ns is valid. No shortcuts, no vibes-only submissions. πŸ‘‘


🌈 RETURN 🌈

  • A ref counted new label if it successfully inserted the merge of a & b β€” slay πŸ’…
  • Else a ref counted equivalent label that's already in the set β€” the "we been knew" outcome, iconic πŸŽ€
  • Else NULL if it could not create a label (-ENOMEM) β€” the sad little 😭 moment

⭐ SEE ALSO ⭐

Kernel file ./security/apparmor/label.c β€” and the entire friend group:

ns_cmp(9), profile_cmp(9), vec_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), 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)


anyway, that's the whole page, go merge some labels responsibly 🧚

this lil drop comes from ./security/apparmor, dated October 2026, and it's the aa_label_merge(9) page from the Kernel API Manual β€” mwah, ilysm, bye πŸ’œ

πŸ“¦ where this page comes from