Lines Matching refs:label
77 static struct label *
80 struct label *label; in mac_inpcb_label_alloc() local
83 label = mac_labelzone_alloc(flag); in mac_inpcb_label_alloc()
84 if (label == NULL) in mac_inpcb_label_alloc()
87 MAC_POLICY_CHECK(inpcb_init_label, label, flag); in mac_inpcb_label_alloc()
89 MAC_POLICY_CHECK_NOSLEEP(inpcb_init_label, label, flag); in mac_inpcb_label_alloc()
91 MAC_POLICY_PERFORM_NOSLEEP(inpcb_destroy_label, label); in mac_inpcb_label_alloc()
92 mac_labelzone_free(label); in mac_inpcb_label_alloc()
95 return (label); in mac_inpcb_label_alloc()
111 static struct label *
114 struct label *label; in mac_ipq_label_alloc() local
117 label = mac_labelzone_alloc(flag); in mac_ipq_label_alloc()
118 if (label == NULL) in mac_ipq_label_alloc()
122 MAC_POLICY_CHECK(ipq_init_label, label, flag); in mac_ipq_label_alloc()
124 MAC_POLICY_CHECK_NOSLEEP(ipq_init_label, label, flag); in mac_ipq_label_alloc()
126 MAC_POLICY_PERFORM_NOSLEEP(ipq_destroy_label, label); in mac_ipq_label_alloc()
127 mac_labelzone_free(label); in mac_ipq_label_alloc()
130 return (label); in mac_ipq_label_alloc()
147 mac_inpcb_label_free(struct label *label) in mac_inpcb_label_free() argument
150 MAC_POLICY_PERFORM_NOSLEEP(inpcb_destroy_label, label); in mac_inpcb_label_free()
151 mac_labelzone_free(label); in mac_inpcb_label_free()
165 mac_ipq_label_free(struct label *label) in mac_ipq_label_free() argument
168 MAC_POLICY_PERFORM_NOSLEEP(ipq_destroy_label, label); in mac_ipq_label_free()
169 mac_labelzone_free(label); in mac_ipq_label_free()
193 struct label *label; in mac_ipq_reassemble() local
198 label = mac_mbuf_to_label(m); in mac_ipq_reassemble()
201 label); in mac_ipq_reassemble()
207 struct label *mlabel, *fraglabel; in mac_netinet_fragment()
222 struct label *label; in mac_ipq_create() local
227 label = mac_mbuf_to_label(m); in mac_ipq_create()
229 MAC_POLICY_PERFORM_NOSLEEP(ipq_create, m, label, q, q->ipq_label); in mac_ipq_create()
235 struct label *mlabel; in mac_inpcb_create_mbuf()
251 struct label *label; in mac_ipq_match() local
257 label = mac_mbuf_to_label(m); in mac_ipq_match()
260 MAC_POLICY_BOOLEAN_NOSLEEP(ipq_match, &&, m, label, q, q->ipq_label); in mac_ipq_match()
268 struct label *mlabel; in mac_netinet_arp_send()
285 struct label *mrecvlabel, *msendlabel; in mac_netinet_icmp_reply()
300 struct label *label; in mac_netinet_icmp_replyinplace() local
305 label = mac_mbuf_to_label(m); in mac_netinet_icmp_replyinplace()
307 MAC_POLICY_PERFORM_NOSLEEP(netinet_icmp_replyinplace, m, label); in mac_netinet_icmp_replyinplace()
313 struct label *mlabel; in mac_netinet_igmp_send()
330 struct label *label; in mac_netinet_tcp_reply() local
335 label = mac_mbuf_to_label(m); in mac_netinet_tcp_reply()
337 MAC_POLICY_PERFORM_NOSLEEP(netinet_tcp_reply, m, label); in mac_netinet_tcp_reply()
343 struct label *label; in mac_ipq_update() local
348 label = mac_mbuf_to_label(m); in mac_ipq_update()
350 MAC_POLICY_PERFORM_NOSLEEP(ipq_update, m, label, q, q->ipq_label); in mac_ipq_update()
359 struct label *label; in mac_inpcb_check_deliver() local
367 label = mac_mbuf_to_label(m); in mac_inpcb_check_deliver()
370 label); in mac_inpcb_check_deliver()
407 struct label *mrecvlabel, *msendlabel; in mac_netinet_firewall_reply()
425 struct label *label; in mac_netinet_firewall_send() local
432 label = mac_mbuf_to_label(m); in mac_netinet_firewall_send()
434 MAC_POLICY_PERFORM_NOSLEEP(netinet_firewall_send, m, label); in mac_netinet_firewall_send()
447 mac_syncache_destroy(struct label **label) in mac_syncache_destroy() argument
450 if (*label != NULL) { in mac_syncache_destroy()
451 MAC_POLICY_PERFORM_NOSLEEP(syncache_destroy_label, *label); in mac_syncache_destroy()
452 mac_labelzone_free(*label); in mac_syncache_destroy()
453 *label = NULL; in mac_syncache_destroy()
458 mac_syncache_init(struct label **label) in mac_syncache_init() argument
463 *label = mac_labelzone_alloc(M_NOWAIT); in mac_syncache_init()
464 if (*label == NULL) in mac_syncache_init()
473 MAC_POLICY_CHECK_NOSLEEP(syncache_init_label, *label, in mac_syncache_init()
477 *label); in mac_syncache_init()
478 mac_labelzone_free(*label); in mac_syncache_init()
482 *label = NULL; in mac_syncache_init()
487 mac_syncache_create(struct label *label, struct inpcb *inp) in mac_syncache_create() argument
492 MAC_POLICY_PERFORM_NOSLEEP(syncache_create, label, inp); in mac_syncache_create()
496 mac_syncache_create_mbuf(struct label *sc_label, struct mbuf *m) in mac_syncache_create_mbuf()
498 struct label *mlabel; in mac_syncache_create_mbuf()