freebsd-dev/sys/net
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
..
bpf_compat.h
bpf_filter.c
bpf.c - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
bpf.h Add a new macro M_ASSERTVALID which ensures that the mbuf in question 2003-10-19 22:33:41 +00:00
bpfdesc.h Modify the MAC Framework so that instead of embedding a (struct label) 2003-11-12 03:14:31 +00:00
bridge.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
bridge.h
bsd_comp.c
ethernet.h
fddi.h
if_arc.h
if_arcsubr.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_arp.h
if_atm.h
if_atmsubr.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_disc.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_dl.h
if_ef.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_ethersubr.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_faith.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_fddisubr.c Remove unnecessary (caddr_t) casts of if_broadcastaddr. 2003-10-23 17:47:55 +00:00
if_gif.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_gif.h
if_gre.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_gre.h
if_iso88025subr.c Enable IPv6 for Token Ring. 2003-09-14 02:32:31 +00:00
if_llc.h
if_loop.c Remove the m_defrag call from if_loop; testing with m_fragment 2003-11-11 17:58:36 +00:00
if_media.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_media.h
if_mib.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_mib.h
if_ppp.c o add a flags parameter to netisr_register that is used to specify 2003-11-08 22:28:40 +00:00
if_ppp.h
if_pppvar.h
if_sl.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_slvar.h
if_sppp.h
if_spppsubr.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_stf.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_stf.h
if_tap.c - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
if_tap.h
if_tapvar.h
if_tun.c - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
if_tun.h
if_tunvar.h Correctly name r_unit member tun_unit. 2003-09-27 21:43:16 +00:00
if_types.h use official # for IFT_STF 2003-10-26 14:29:04 +00:00
if_var.h Modify the MAC Framework so that instead of embedding a (struct label) 2003-11-12 03:14:31 +00:00
if_vlan_var.h
if_vlan.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if.h Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
iso88025.h
net_osdep.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
net_osdep.h - update comments to refrect recent BSDs. 2003-11-04 14:08:31 +00:00
netisr.c o add a flags parameter to netisr_register that is used to specify 2003-11-08 22:28:40 +00:00
netisr.h o add a flags parameter to netisr_register that is used to specify 2003-11-08 22:28:40 +00:00
pfil.c o update PFIL_HOOKS support to current API used by netbsd 2003-09-23 17:54:04 +00:00
pfil.h o update PFIL_HOOKS support to current API used by netbsd 2003-09-23 17:54:04 +00:00
pfkeyv2.h - support AES counter mode for ESP. 2003-10-13 14:57:41 +00:00
ppp_comp.h
ppp_deflate.c
ppp_defs.h
ppp_tty.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
radix.c While cleaning out my tree, fix another strict alias warning that would 2003-09-22 23:24:18 +00:00
radix.h
raw_cb.c
raw_cb.h
raw_usrreq.c Fix a bunch of off-by-one errors in the range checking code. 2003-09-11 21:40:21 +00:00
route.c replace explicit changes to rt_refcnt by RT_ADDREF and RT_REMREF 2003-11-08 23:36:32 +00:00
route.h replace explicit changes to rt_refcnt by RT_ADDREF and RT_REMREF 2003-11-08 23:36:32 +00:00
rtsock.c replace explicit changes to rt_refcnt by RT_ADDREF and RT_REMREF 2003-11-08 23:36:32 +00:00
slcompress.c
slcompress.h
slip.h
zlib.c
zlib.h