• Home
  • Raw
  • Download

Lines Matching refs:ns

141 	AA_BUG(!a->ns);  in profile_cmp()
142 AA_BUG(!b->ns); in profile_cmp()
148 res = ns_cmp(a->ns, b->ns); in profile_cmp()
370 struct aa_ns *ns = labels_ns(label); in aa_label_kref() local
372 if (!ns) { in aa_label_kref()
1261 return aa_ns_visible(profile->ns, labels_ns(label), true); in label_is_visible()
1275 if (profile->ns == tp->ns) in match_component()
1279 ns_name = aa_ns_name(profile->ns, tp->ns, true); in match_component()
1311 if (!aa_ns_visible(profile->ns, tp->ns, subns)) in label_compound_match()
1325 if (!aa_ns_visible(profile->ns, tp->ns, subns)) in label_compound_match()
1371 if (!aa_ns_visible(profile->ns, tp->ns, subns)) in label_components_match()
1387 if (!aa_ns_visible(profile->ns, tp->ns, subns)) in label_components_match()
1444 bool aa_update_label_name(struct aa_ns *ns, struct aa_label *label, gfp_t gfp) in aa_update_label_name() argument
1451 AA_BUG(!ns); in aa_update_label_name()
1454 if (label->hname || labels_ns(label) != ns) in aa_update_label_name()
1457 if (aa_label_acntsxprint(&name, ns, label, FLAGS_NONE, gfp) < 0) in aa_update_label_name()
1476 static inline bool use_label_hname(struct aa_ns *ns, struct aa_label *label, in use_label_hname() argument
1479 if (label->hname && (!ns || labels_ns(label) == ns) && in use_label_hname()
1524 if (view != profile->ns && in aa_profile_snxprint()
1525 (!prev_ns || (*prev_ns != profile->ns))) { in aa_profile_snxprint()
1527 *prev_ns = profile->ns; in aa_profile_snxprint()
1528 ns_name = aa_ns_name(view, profile->ns, in aa_profile_snxprint()
1537 if ((flags & FLAG_SHOW_MODE) && profile != profile->ns->unconfined) { in aa_profile_snxprint()
1553 static const char *label_modename(struct aa_ns *ns, struct aa_label *label, in label_modename() argument
1561 if (aa_ns_visible(ns, profile->ns, flags & FLAG_VIEW_SUBNS)) { in label_modename()
1563 if (profile == profile->ns->unconfined) in label_modename()
1586 static inline bool display_mode(struct aa_ns *ns, struct aa_label *label, in display_mode() argument
1594 if (aa_ns_visible(ns, profile->ns, in display_mode()
1596 profile != profile->ns->unconfined) in display_mode()
1623 int aa_label_snxprint(char *str, size_t size, struct aa_ns *ns, in aa_label_snxprint() argument
1636 ns = root_ns; in aa_label_snxprint()
1639 } else if (!ns) { in aa_label_snxprint()
1640 ns = labels_ns(label); in aa_label_snxprint()
1644 if (aa_ns_visible(ns, profile->ns, flags & FLAG_VIEW_SUBNS)) { in aa_label_snxprint()
1649 len = aa_profile_snxprint(str, size, ns, profile, in aa_label_snxprint()
1666 if (display_mode(ns, label, flags)) { in aa_label_snxprint()
1668 label_modename(ns, label, flags)); in aa_label_snxprint()
1687 int aa_label_asxprint(char **strp, struct aa_ns *ns, struct aa_label *label, in aa_label_asxprint() argument
1695 size = aa_label_snxprint(NULL, 0, ns, label, flags); in aa_label_asxprint()
1702 return aa_label_snxprint(*strp, size + 1, ns, label, flags); in aa_label_asxprint()
1716 int aa_label_acntsxprint(char __counted **strp, struct aa_ns *ns, in aa_label_acntsxprint() argument
1724 size = aa_label_snxprint(NULL, 0, ns, label, flags); in aa_label_acntsxprint()
1731 return aa_label_snxprint(*strp, size + 1, ns, label, flags); in aa_label_acntsxprint()
1735 void aa_label_xaudit(struct audit_buffer *ab, struct aa_ns *ns, in aa_label_xaudit() argument
1745 if (!use_label_hname(ns, label, flags) || in aa_label_xaudit()
1746 display_mode(ns, label, flags)) { in aa_label_xaudit()
1747 len = aa_label_asxprint(&name, ns, label, flags, gfp); in aa_label_xaudit()
1765 void aa_label_seq_xprint(struct seq_file *f, struct aa_ns *ns, in aa_label_seq_xprint() argument
1771 if (!use_label_hname(ns, label, flags)) { in aa_label_seq_xprint()
1775 len = aa_label_asxprint(&str, ns, label, flags, gfp); in aa_label_seq_xprint()
1782 } else if (display_mode(ns, label, flags)) in aa_label_seq_xprint()
1784 label_modename(ns, label, flags)); in aa_label_seq_xprint()
1789 void aa_label_xprintk(struct aa_ns *ns, struct aa_label *label, int flags, in aa_label_xprintk() argument
1794 if (!use_label_hname(ns, label, flags)) { in aa_label_xprintk()
1798 len = aa_label_asxprint(&str, ns, label, flags, gfp); in aa_label_xprintk()
1805 } else if (display_mode(ns, label, flags)) in aa_label_xprintk()
1807 label_modename(ns, label, flags)); in aa_label_xprintk()
1814 struct aa_ns *ns = aa_get_current_ns(); in aa_label_audit() local
1816 aa_label_xaudit(ab, ns, label, FLAG_VIEW_SUBNS, gfp); in aa_label_audit()
1817 aa_put_ns(ns); in aa_label_audit()
1822 struct aa_ns *ns = aa_get_current_ns(); in aa_label_seq_print() local
1824 aa_label_seq_xprint(f, ns, label, FLAG_VIEW_SUBNS, gfp); in aa_label_seq_print()
1825 aa_put_ns(ns); in aa_label_seq_print()
1830 struct aa_ns *ns = aa_get_current_ns(); in aa_label_printk() local
1832 aa_label_xprintk(ns, label, FLAG_VIEW_SUBNS, gfp); in aa_label_printk()
1833 aa_put_ns(ns); in aa_label_printk()
1928 if (vec[i]->ns != labels_ns(currbase)) in aa_label_strn_parse()
2122 static void __labelset_update(struct aa_ns *ns) in __labelset_update() argument
2126 AA_BUG(!ns); in __labelset_update()
2127 AA_BUG(!mutex_is_locked(&ns->lock)); in __labelset_update()
2130 label = labelset_next_stale(&ns->labels); in __labelset_update()
2148 void __aa_labelset_update_subtree(struct aa_ns *ns) in __aa_labelset_update_subtree() argument
2152 AA_BUG(!ns); in __aa_labelset_update_subtree()
2153 AA_BUG(!mutex_is_locked(&ns->lock)); in __aa_labelset_update_subtree()
2155 __labelset_update(ns); in __aa_labelset_update_subtree()
2157 list_for_each_entry(child, &ns->sub_ns, base.list) { in __aa_labelset_update_subtree()