ns_cmp(9)
π ns_cmp(9)
okay bestie, so this is a page from the Kernel API Manual β yes, the ns_cmp(9) one, we're doing this, we're thriving β¨
π NAME π
ns_cmp β literally just compares ns for label set ordering. that's the whole vibe, that's the assignment π
β¨ SYNOPSIS β¨
int ns_cmp (struct aa_ns *a , struct aa_ns *b );
look at her. two pointers in, one int out. iconic behavior tbh π«Ά
πΈ ARGUMENTS πΈ
aβ thensyou wanna compare. NOT NULL β like, do not pass her a null, i'm begging πbβ the othernsyou wanna compare. also NOT NULL, same energy, no cap π
π RETURN π
so the return value is doing the classic three-way thing, keep up:
<0ifa < b==0ifa == b>0ifa > b
fr fr that's it, that's the whole mood π
π¦ SEE ALSO π¦
bestie there are SO many siblings, get comfy, this is a whole family reunion π
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)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)
also, for the record, this all lives in the kernel file ./security/apparmor/label.c π
okay that's the page!! shoutout to ./security/apparmor and the October 2026 date stamp for being here with us, mwah ππ§ hope this made sense, ily, go compare some ns πβ
π¦ 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