freebsd-dev/sys/security
Robert Watson f93bfb23dc Add internal 'mac_policy_count' counter to the MAC Framework, which is a
count of the number of registered policies.

Rather than unconditionally locking sockets before passing them into MAC,
lock them in the MAC entry points only if mac_policy_count is non-zero.

This avoids locking overhead for a number of socket system calls when no
policies are registered, eliminating measurable overhead for the MAC
Framework for the socket subsystem when there are no active policies.

Possibly socket locks should be acquired by policies if they are required
for socket labels, which would further avoid locking overhead when there
are policies but they don't require labeling of sockets, or possibly
don't even implement socket controls.

Obtained from:	TrustedBSD Project
2009-06-02 18:26:17 +00:00
..
audit Remove the thread argument from the FSD (File-System Dependent) parts of 2009-05-11 15:33:26 +00:00
mac Add internal 'mac_policy_count' counter to the MAC Framework, which is a 2009-06-02 18:26:17 +00:00
mac_biba Get rid of VSTAT and replace it with VSTAT_PERMS, which is somewhat 2009-03-29 17:45:48 +00:00
mac_bsdextended Add hierarchical jails. A jail may further virtualize its environment 2009-05-27 14:11:23 +00:00
mac_ifoff Rather than having MAC policies explicitly declare what object types 2009-01-10 10:58:41 +00:00
mac_lomac Remove 'uio' argument from MAC Framework and MAC policy entry points for 2009-03-08 12:32:06 +00:00
mac_mls Get rid of VSTAT and replace it with VSTAT_PERMS, which is somewhat 2009-03-29 17:45:48 +00:00
mac_none Rather than having MAC policies explicitly declare what object types 2009-01-10 10:58:41 +00:00
mac_partition Rather than having MAC policies explicitly declare what object types 2009-01-10 10:58:41 +00:00
mac_portacl - Correct logic in if statement - we want to allocate temporary buffer 2009-03-14 20:40:06 +00:00
mac_seeotheruids Rather than having MAC policies explicitly declare what object types 2009-01-10 10:58:41 +00:00
mac_stub Remove 'uio' argument from MAC Framework and MAC policy entry points for 2009-03-08 12:32:06 +00:00
mac_test Remove 'uio' argument from MAC Framework and MAC policy entry points for 2009-03-08 12:32:06 +00:00