freebsd-skq/sys/security/mac
rwatson 0f9e858440 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
..
mac_atalk.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_audit.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_cred.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_framework.c Add internal 'mac_policy_count' counter to the MAC Framework, which is a 2009-06-02 18:26:17 +00:00
mac_framework.h Remove 'uio' argument from MAC Framework and MAC policy entry points for 2009-03-08 12:32:06 +00:00
mac_inet6.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_inet.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_internal.h Add internal 'mac_policy_count' counter to the MAC Framework, which is a 2009-06-02 18:26:17 +00:00
mac_label.c
mac_net.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_pipe.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_policy.h Remove 'uio' argument from MAC Framework and MAC policy entry points for 2009-03-08 12:32:06 +00:00
mac_posix_sem.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_posix_shm.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_priv.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_process.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_socket.c Add internal 'mac_policy_count' counter to the MAC Framework, which is a 2009-06-02 18:26:17 +00:00
mac_syscalls.c Rework MAC Framework synchronization in a number of ways in order to 2009-03-14 16:06:06 +00:00
mac_system.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_sysv_msg.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_sysv_sem.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_sysv_shm.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00
mac_vfs.c Rename MAC Framework-internal macros used to invoke policy entry points: 2009-05-01 21:05:40 +00:00