Lines Matching full:label

75 static struct label *
78 struct label *label; in mac_inpcb_label_alloc() local
81 label = mac_labelzone_alloc(flag); in mac_inpcb_label_alloc()
82 if (label == NULL) in mac_inpcb_label_alloc()
85 MAC_POLICY_CHECK(inpcb_init_label, label, flag); in mac_inpcb_label_alloc()
87 MAC_POLICY_CHECK_NOSLEEP(inpcb_init_label, label, flag); in mac_inpcb_label_alloc()
89 MAC_POLICY_PERFORM_NOSLEEP(inpcb_destroy_label, label); in mac_inpcb_label_alloc()
90 mac_labelzone_free(label); in mac_inpcb_label_alloc()
93 return (label); in mac_inpcb_label_alloc()
120 static struct label *
123 struct label *label; in mac_ipq_label_alloc() local
126 label = mac_labelzone_alloc(flag); in mac_ipq_label_alloc()
127 if (label == NULL) in mac_ipq_label_alloc()
131 MAC_POLICY_CHECK(ipq_init_label, label, flag); in mac_ipq_label_alloc()
133 MAC_POLICY_CHECK_NOSLEEP(ipq_init_label, label, flag); in mac_ipq_label_alloc()
135 MAC_POLICY_PERFORM_NOSLEEP(ipq_destroy_label, label); in mac_ipq_label_alloc()
136 mac_labelzone_free(label); in mac_ipq_label_alloc()
139 return (label); in mac_ipq_label_alloc()
156 mac_inpcb_label_free(struct label *label) in mac_inpcb_label_free() argument
159 MAC_POLICY_PERFORM_NOSLEEP(inpcb_destroy_label, label); in mac_inpcb_label_free()
160 mac_labelzone_free(label); in mac_inpcb_label_free()
174 mac_ipq_label_free(struct label *label) in mac_ipq_label_free() argument
177 MAC_POLICY_PERFORM_NOSLEEP(ipq_destroy_label, label); in mac_ipq_label_free()
178 mac_labelzone_free(label); in mac_ipq_label_free()
202 struct label *label; in mac_ipq_reassemble() local
207 label = mac_mbuf_to_label(m); in mac_ipq_reassemble()
210 label); in mac_ipq_reassemble()
216 struct label *mlabel, *fraglabel; in mac_netinet_fragment()
231 struct label *label; in mac_ipq_create() local
236 label = mac_mbuf_to_label(m); in mac_ipq_create()
238 MAC_POLICY_PERFORM_NOSLEEP(ipq_create, m, label, q, q->ipq_label); in mac_ipq_create()
244 struct label *mlabel; in mac_inpcb_create_mbuf()
260 struct label *label; in mac_ipq_match() local
266 label = mac_mbuf_to_label(m); in mac_ipq_match()
269 MAC_POLICY_BOOLEAN_NOSLEEP(ipq_match, &&, m, label, q, q->ipq_label); in mac_ipq_match()
277 struct label *mlabel; in mac_netinet_arp_send()
294 struct label *mrecvlabel, *msendlabel; in mac_netinet_icmp_reply()
309 struct label *label; in mac_netinet_icmp_replyinplace() local
314 label = mac_mbuf_to_label(m); in mac_netinet_icmp_replyinplace()
316 MAC_POLICY_PERFORM_NOSLEEP(netinet_icmp_replyinplace, m, label); in mac_netinet_icmp_replyinplace()
322 struct label *mlabel; in mac_netinet_igmp_send()
339 struct label *label; in mac_netinet_tcp_reply() local
344 label = mac_mbuf_to_label(m); in mac_netinet_tcp_reply()
346 MAC_POLICY_PERFORM_NOSLEEP(netinet_tcp_reply, m, label); in mac_netinet_tcp_reply()
352 struct label *label; in mac_ipq_update() local
357 label = mac_mbuf_to_label(m); in mac_ipq_update()
359 MAC_POLICY_PERFORM_NOSLEEP(ipq_update, m, label, q, q->ipq_label); in mac_ipq_update()
368 struct label *label; in mac_inpcb_check_deliver() local
376 label = mac_mbuf_to_label(m); in mac_inpcb_check_deliver()
379 label); in mac_inpcb_check_deliver()
416 struct label *mrecvlabel, *msendlabel; in mac_netinet_firewall_reply()
434 struct label *label; in mac_netinet_firewall_send() local
441 label = mac_mbuf_to_label(m); in mac_netinet_firewall_send()
443 MAC_POLICY_PERFORM_NOSLEEP(netinet_firewall_send, m, label); in mac_netinet_firewall_send()
448 * instead of the label. However, due to some of the complexities associated
449 * with exposing this syncache structure we operate directly on its label
452 * label storage so we can properly initialize mbuf labels for any packets
456 mac_syncache_destroy(struct label **label) in mac_syncache_destroy() argument
459 if (*label != NULL) { in mac_syncache_destroy()
460 MAC_POLICY_PERFORM_NOSLEEP(syncache_destroy_label, *label); in mac_syncache_destroy()
461 mac_labelzone_free(*label); in mac_syncache_destroy()
462 *label = NULL; in mac_syncache_destroy()
467 mac_syncache_init(struct label **label) in mac_syncache_init() argument
472 *label = mac_labelzone_alloc(M_NOWAIT); in mac_syncache_init()
473 if (*label == NULL) in mac_syncache_init()
477 * allocate policy specific label storage using M_WAITOK. So in mac_syncache_init()
482 MAC_POLICY_CHECK_NOSLEEP(syncache_init_label, *label, in mac_syncache_init()
486 *label); in mac_syncache_init()
487 mac_labelzone_free(*label); in mac_syncache_init()
488 *label = NULL; in mac_syncache_init()
492 *label = NULL; in mac_syncache_init()
497 mac_syncache_create(struct label *label, struct inpcb *inp) in mac_syncache_create() argument
502 MAC_POLICY_PERFORM_NOSLEEP(syncache_create, label, inp); in mac_syncache_create()
506 mac_syncache_create_mbuf(struct label *sc_label, struct mbuf *m) in mac_syncache_create_mbuf()
508 struct label *mlabel; in mac_syncache_create_mbuf()