freebsd-dev/sys/netinet
Robert Watson eca8a663d4 Modify the MAC Framework so that instead of embedding a (struct label)
in various kernel objects to represent security data, we embed a
(struct label *) pointer, which now references labels allocated using
a UMA zone (mac_label.c).  This allows the size and shape of struct
label to be varied without changing the size and shape of these kernel
objects, which become part of the frozen ABI with 5-STABLE.  This opens
the door for boot-time selection of the number of label slots, and hence
changes to the bound on the number of simultaneous labeled policies
at boot-time instead of compile-time.  This also makes it easier to
embed label references in new objects as required for locking/caching
with fine-grained network stack locking, such as inpcb structures.

This change also moves us further in the direction of hiding the
structure of kernel objects from MAC policy modules, not to mention
dramatically reducing the number of '&' symbols appearing in both the
MAC Framework and MAC policy modules, and improving readability.

While this results in minimal performance change with MAC enabled, it
will observably shrink the size of a number of critical kernel data
structures for the !MAC case, and should have a small (but measurable)
performance benefit (i.e., struct vnode, struct socket) do to memory
conservation and reduced cost of zeroing memory.

NOTE: Users of MAC must recompile their kernel and all MAC modules as a
result of this change.  Because this is an API change, third party
MAC modules will also need to be updated to make less use of the '&'
symbol.

Suggestions from:	bmilekic
Obtained from:		TrustedBSD Project
Sponsored by:		DARPA, Network Associates Laboratories
2003-11-12 03:14:31 +00:00
..
libalias
accf_data.c
accf_http.c
icmp6.h
icmp_var.h
if_atm.c replace explicit changes to rt_refcnt by RT_ADDREF and RT_REMREF 2003-11-08 23:36:32 +00:00
if_atm.h
if_ether.c replace explicit changes to rt_refcnt by RT_ADDREF and RT_REMREF 2003-11-08 23:36:32 +00:00
if_ether.h
igmp_var.h
igmp.c
igmp.h
in_cksum.c
in_gif.c
in_gif.h
in_pcb.c In in_pcbconnect_setup(), don't use the cached inp->inp_route unless 2003-11-10 22:45:37 +00:00
in_pcb.h add locking assertions that turn into noops if INET6 is configured; 2003-11-08 22:48:27 +00:00
in_proto.c divert socket fixups: 2003-11-08 23:09:42 +00:00
in_rmx.c Remove bogus RTFREE that was added in rev 1.47. The rmx code operates 2003-11-03 06:11:44 +00:00
in_systm.h
in_var.h
in.c Correct rev 1.56 which (incorrectly) reversed the test used to 2003-11-03 03:22:39 +00:00
in.h
ip6.h
ip_divert.c divert socket fixups: 2003-11-08 23:09:42 +00:00
ip_dummynet.c replace explicit changes to rt_refcnt by RT_ADDREF and RT_REMREF 2003-11-08 23:36:32 +00:00
ip_dummynet.h
ip_ecn.c
ip_ecn.h
ip_encap.c
ip_encap.h
ip_flow.c replace explicit changes to rt_refcnt by RT_ADDREF and RT_REMREF 2003-11-08 23:36:32 +00:00
ip_flow.h
ip_fw2.c Move uid/gid checking logic out of line and lock inpcb usage. This 2003-11-07 23:26:57 +00:00
ip_fw.h Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
ip_gre.c
ip_gre.h
ip_icmp.c
ip_icmp.h
ip_id.c MFp4: reminder that random id code is not reentrant 2003-11-07 23:31:29 +00:00
ip_input.c replace explicit changes to rt_refcnt by RT_ADDREF and RT_REMREF 2003-11-08 23:36:32 +00:00
ip_mroute.c the sbappendaddr call in socket_send must be protected by Giant 2003-11-08 22:51:18 +00:00
ip_mroute.h
ip_output.c assert optional inpcb is passed in locked 2003-11-08 23:03:29 +00:00
ip_var.h Modify the MAC Framework so that instead of embedding a (struct label) 2003-11-12 03:14:31 +00:00
ip.h
ipprotosw.h
pim_var.h
pim.h
raw_ip.c add some missing locking 2003-11-08 22:53:41 +00:00
tcp_debug.c
tcp_debug.h
tcp_fsm.h
tcp_input.c o correct locking problem: the inpcb must be held across tcp_respond 2003-11-08 22:59:22 +00:00
tcp_output.c replace mtx_assert by INP_LOCK_ASSERT 2003-11-08 22:55:52 +00:00
tcp_reass.c o correct locking problem: the inpcb must be held across tcp_respond 2003-11-08 22:59:22 +00:00
tcp_seq.h
tcp_subr.c o correct locking problem: the inpcb must be held across tcp_respond 2003-11-08 22:59:22 +00:00
tcp_syncache.c correct typos 2003-11-11 18:16:54 +00:00
tcp_timer.c use local values instead of chasing pointers 2003-11-08 22:57:13 +00:00
tcp_timer.h
tcp_timewait.c o correct locking problem: the inpcb must be held across tcp_respond 2003-11-08 22:59:22 +00:00
tcp_usrreq.c
tcp_var.h Add an additional check to the tcp_twrecycleable function; I had 2003-11-02 07:47:03 +00:00
tcp.h
tcpip.h
udp_usrreq.c assert inpcb is locked in udp_output 2003-11-08 23:00:48 +00:00
udp_var.h
udp.h