Lines Matching full:label

48  * zone_label is the UMA zone from which most labels are allocated.  Label
50 * slot on first use, even if the policy is loaded after the label is
62 zone_label = uma_zcreate("MAC labels", sizeof(struct label), in mac_labelzone_init()
73 mac_init_label(struct label *label) in mac_init_label() argument
76 bzero(label, sizeof(*label)); in mac_init_label()
77 label->l_flags = MAC_FLAG_INITIALIZED; in mac_init_label()
81 mac_destroy_label(struct label *label) in mac_destroy_label() argument
84 KASSERT(label->l_flags & MAC_FLAG_INITIALIZED, in mac_destroy_label()
85 ("destroying uninitialized label")); in mac_destroy_label()
88 bzero(label, sizeof(*label)); in mac_destroy_label()
90 label->l_flags &= ~MAC_FLAG_INITIALIZED; in mac_destroy_label()
97 struct label *label; in mac_labelzone_ctor() local
99 KASSERT(size == sizeof(*label), ("mac_labelzone_ctor: wrong size\n")); in mac_labelzone_ctor()
100 label = mem; in mac_labelzone_ctor()
101 mac_init_label(label); in mac_labelzone_ctor()
108 struct label *label; in mac_labelzone_dtor() local
110 KASSERT(size == sizeof(*label), ("mac_labelzone_dtor: wrong size\n")); in mac_labelzone_dtor()
111 label = mem; in mac_labelzone_dtor()
112 mac_destroy_label(label); in mac_labelzone_dtor()
115 struct label *
123 mac_labelzone_free(struct label *label) in mac_labelzone_free() argument
126 uma_zfree(zone_label, label); in mac_labelzone_free()
130 * Functions used by policy modules to get and set label values.
133 mac_label_get(struct label *l, int slot) in mac_label_get()
136 KASSERT(l != NULL, ("mac_label_get: NULL label")); in mac_label_get()
142 mac_label_set(struct label *l, int slot, intptr_t v) in mac_label_set()
145 KASSERT(l != NULL, ("mac_label_set: NULL label")); in mac_label_set()