FreeBSD src
Go to file
Robert Watson 41a17fe326 Clean up locking for the MAC Framework:
(1) Accept that we're now going to use mutexes, so don't attempt
    to avoid treating them as mutexes.  This cleans up locking
    accessor function names some.

(2) Rename variables to _mtx, _cv, _count, simplifying the naming.

(3) Add a new form of the _busy() primitive that conditionally
    makes the list busy: if there are entries on the list, bump
    the busy count.  If there are no entries, don't bump the busy
    count.  Return a boolean indicating whether or not the busy
    count was bumped.

(4) Break mac_policy_list into two lists: one with the same name
    holding dynamic policies, and a new list, mac_static_policy_list,
    which holds policies loaded before mac_late and without the
    unload flag set.  The static list may be accessed without
    holding the busy count, since it can't change at run-time.

(5) In general, prefer making the list busy conditionally, meaning
    we pay only one mutex lock per entry point if all modules are
    on the static list, rather than two (since we don't have to
    lower the busy count when we're done with the framework).  For
    systems running just Biba or MLS, this will halve the mutex
    accesses in the network stack, and may offer a substantial
    performance benefits.

(6) Lay the groundwork for a dynamic-free kernel option which
    eliminates all locking associated with dynamically loaded or
    unloaded policies, for pre-configured systems requiring
    maximum performance but less run-time flexibility.

These changes have been running for a few weeks on MAC development
branch systems.

Approved by:	re (jhb)
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-05-07 17:49:24 +00:00
bin df(1) and ls(1) print units in 'four or fewer' not 'three or less'. 2003-05-06 21:54:46 +00:00
contrib Centralize _PATH_* definitions. 2003-05-05 22:49:23 +00:00
crypto Use __FBSDID vs. rcsid[]. Also protect sccs[] and copyright[] from GCC 3.3. 2003-05-04 02:54:49 +00:00
etc Don't use logger by default just yet for unmatched devices. It is a 2003-05-07 15:48:20 +00:00
games Make the __FBSDID usage consistent 2003-05-05 09:52:25 +00:00
gnu Enable GSSAPI/Kerberos 5 support (aka `gserver'). 2003-05-05 16:50:42 +00:00
include Centralize _PATH_* definitions. 2003-05-05 22:49:23 +00:00
kerberos5 Turn MAKE_KERBEROS5 into NO_KERBEROS by negating the logic. Some extra 2003-05-05 07:58:44 +00:00
lib Properly cleanup the stack before jumping to cerror() if rfork(2) fails. 2003-05-07 17:23:25 +00:00
libexec Turn MAKE_KERBEROS5 into NO_KERBEROS by negating the logic. Some extra 2003-05-05 07:58:44 +00:00
release New release notes: Kerberos 5 built by default, krb5 distributed 2003-05-07 04:15:57 +00:00
sbin Add an example of how to create an fstab entry. 2003-05-05 23:41:17 +00:00
secure Turn MAKE_KERBEROS5 into NO_KERBEROS by negating the logic. Some extra 2003-05-05 07:58:44 +00:00
share Consistentify our NO_KERBEROS documentation. 2003-05-06 19:26:55 +00:00
sys Clean up locking for the MAC Framework: 2003-05-07 17:49:24 +00:00
tools Start mailing -CURRENT tinderbox failures to the lists. 2003-05-06 04:04:02 +00:00
usr.bin Add my birthday. 2003-05-07 13:28:16 +00:00
usr.sbin Fix age_old_log checking so that it will notice log files which were 2003-05-05 23:38:03 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
MAINTAINERS OBE 2003-04-27 05:51:12 +00:00
Makefile Kill upgrade target docs. It too is stale. 2003-04-03 05:34:36 +00:00
Makefile.inc1 Install symlinks to individual headers instead of symlinks to directories 2003-05-05 12:54:26 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Announce the Kerberos5 changes. 2003-05-05 20:05:37 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html