freebsd-dev/sys
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
..
alpha Change the clear_ret argument of get_mcontext() to be a flags argument. 2003-11-09 20:31:04 +00:00
amd64 Cosmetic sync with i386 2003-11-12 01:49:49 +00:00
arm Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bit 2003-09-25 01:10:26 +00:00
boot Set RB_SERIAL in boothowto if the firmware output-device is ttya or ttyb. 2003-11-11 18:01:44 +00:00
cam - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
coda - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
compat Use kern_sendit rather than sendit for the Linux send* syscalls. 2003-11-09 17:04:04 +00:00
conf Modify the MAC Framework so that instead of embedding a (struct label) 2003-11-12 03:14:31 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r122208, 2003-11-07 08:54:27 +00:00
crypto cleanup rijndael API. 2003-11-11 18:58:54 +00:00
ddb Reworked rev.1.14. Use the ELF symbol type again to summarily reject 2003-09-28 06:02:33 +00:00
dev Remove a gremlin so that this code compiles under -stable without 2003-11-12 01:40:11 +00:00
fs Modify the MAC Framework so that instead of embedding a (struct label) 2003-11-12 03:14:31 +00:00
geom Close the right consumers if we run into trouble opening them all. 2003-10-24 18:47:31 +00:00
gnu Fixed a reference to a nonexistent variable in previous commit. Renaming 2003-11-05 11:56:58 +00:00
i4b Based on an excellent suggestion from tanimura@ define I4BPRI and use it 2003-11-10 14:20:34 +00:00
i386 Don't probe busses in the MP Table for the MP Table PCI bridge drivers 2003-11-11 21:19:43 +00:00
ia64 Further work-out the handling of the high FP registers. The most 2003-11-12 01:26:02 +00:00
isa - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
isofs/cd9660 DuH! 2003-10-18 14:10:28 +00:00
kern Modify the MAC Framework so that instead of embedding a (struct label) 2003-11-12 03:14:31 +00:00
libkern - Support for multibyte charsets in LIBICONV. 2003-09-26 20:26:25 +00:00
modules Following the repo-copy from src/sys/modules/mac_none/Makefile, 2003-11-11 21:23:54 +00:00
net Modify the MAC Framework so that instead of embedding a (struct label) 2003-11-12 03:14:31 +00:00
net80211 fix typo that broke AP scanning by BSSID 2003-11-09 23:36:46 +00:00
netatalk o add a flags parameter to netisr_register that is used to specify 2003-11-08 22:28:40 +00:00
netatm o add a flags parameter to netisr_register that is used to specify 2003-11-08 22:28:40 +00:00
netgraph MFS: Change interface name from "nge" to "ngeth" to avoid conflict 2003-11-11 16:12:05 +00:00
netinet Modify the MAC Framework so that instead of embedding a (struct label) 2003-11-12 03:14:31 +00:00
netinet6 cleanup rijndael API. 2003-11-11 18:58:54 +00:00
netipsec MFp4: portability work, general cleanup, locking fixes 2003-09-29 22:57:43 +00:00
netipx o add a flags parameter to netisr_register that is used to specify 2003-11-08 22:28:40 +00:00
netkey ipsec_esp_auth is unused when IPSEC_ESP is not defined. 2003-11-11 17:25:45 +00:00
netnatm o add a flags parameter to netisr_register that is used to specify 2003-11-08 22:28:40 +00:00
netncp The present defaults for the open and close for device drivers which 2003-09-27 12:01:01 +00:00
netsmb - Support for multibyte charsets in LIBICONV. 2003-09-26 20:26:25 +00:00
nfs
nfsclient 1. Consolidate mount struct allocation/destruction into a common code in 2003-11-12 02:54:47 +00:00
nfsserver Assert GIANT_REQUIRED where sockets are manipulated. This is 2003-11-07 22:57:09 +00:00
opencrypto falloc allocates a file structure and adds it to the file descriptor 2003-10-19 20:41:07 +00:00
pc98 Change the clear_ret argument of get_mcontext() to be a flags argument. 2003-11-09 20:31:04 +00:00
pccard - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
pci - Disable AGP on ALI chipsets if aperture size is 0. 2003-11-11 21:49:18 +00:00
posix4 sched_setscheduler: Return EINVAL when a invalid policy is specified, 2003-09-13 18:46:24 +00:00
powerpc Change the clear_ret argument of get_mcontext() to be a flags argument. 2003-11-09 20:31:04 +00:00
rpc
security Modify the MAC Framework so that instead of embedding a (struct label) 2003-11-12 03:14:31 +00:00
sparc64 Remove reference to sio (superseded by uart). 2003-11-11 07:49:13 +00:00
sys Modify the MAC Framework so that instead of embedding a (struct label) 2003-11-12 03:14:31 +00:00
tools Changes for new SMP-safe kobj method dispatch algorithm. 2003-10-16 13:29:26 +00:00
ufs Remove mntvnode_mtx and replace it with per-mountpoint mutex. 2003-11-05 04:30:08 +00:00
vm - The Open Group Base Specifications Issue 6 specifies that an munmap(2) 2003-11-10 01:37:40 +00:00
Makefile Revert exclusion for amd64 that stopped boot/ being built. 2003-06-26 03:52:48 +00:00