freebsd-dev/sys/fs
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
..
cd9660 DuH! 2003-10-18 14:10:28 +00:00
coda - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
deadfs Finish cleanup of vprint() which was begun with changing v_tag to a string. 2003-03-03 19:15:40 +00:00
devfs Modify the MAC Framework so that instead of embedding a (struct label) 2003-11-12 03:14:31 +00:00
fdescfs forgot to remove static declaration of fdesc_poll() 2003-09-27 12:34:41 +00:00
fifofs If fifo_open() is interrupted, fifo_close() may not get called, causing 2003-11-10 22:21:00 +00:00
hpfs DuH! 2003-10-18 14:10:28 +00:00
msdosfs Remove mntvnode_mtx and replace it with per-mountpoint mutex. 2003-11-05 04:30:08 +00:00
ntfs - Don't cache_purge() in *_reclaim routines. vclean() does it for us so 2003-10-05 02:43:30 +00:00
nullfs MFp4: Fix two bugs causing possible deadlocks or panics, and one nit: 2003-06-17 08:52:45 +00:00
nwfs Initialize b_offset before calling VOP_STRATEGY/VOP_SPECSTRATEGY. 2003-10-18 11:06:15 +00:00
portalfs Initialize struct vfsops C99-sparsely. 2003-06-12 20:48:38 +00:00
procfs Remove debug printf(). 2003-10-19 14:33:00 +00:00
pseudofs - Don't cache_purge() in *_reclaim routines. vclean() does it for us so 2003-10-05 02:43:30 +00:00
smbfs Initialize b_offset before calling VOP_STRATEGY/VOP_SPECSTRATEGY. 2003-10-18 11:06:15 +00:00
specfs Initialize b_iooffset before calling strategy 2003-10-18 19:48:21 +00:00
udf Add hooks for translating directories entries using the iconv methods. 2003-11-05 06:56:08 +00:00
umapfs Initialize struct vfsops C99-sparsely. 2003-06-12 20:48:38 +00:00
unionfs Remove now unused variable. 2003-11-01 15:04:50 +00:00