linux-hardened/security/tomoyo
Casey Schaufler b1d9e6b064 LSM: Switch to lists of hooks
Instead of using a vector of security operations
with explicit, special case stacking of the capability
and yama hooks use lists of hooks with capability and
yama hooks included as appropriate.

The security_operations structure is no longer required.
Instead, there is a union of the function pointers that
allows all the hooks lists to use a common mechanism for
list management while retaining typing. Each module
supplies an array describing the hooks it provides instead
of a sparsely populated security_operations structure.
The description includes the element that gets put on
the hook list, avoiding the issues surrounding individual
element allocation.

The method for registering security modules is changed to
reflect the information available. The method for removing
a module, currently only used by SELinux, has also changed.
It should be generic now, however if there are potential
race conditions based on ordering of hook removal that needs
to be addressed by the calling module.

The security hooks are called from the lists and the first
failure is returned.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Paul Moore <paul@paul-moore.com>
Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <james.l.morris@oracle.com>
2015-05-12 15:00:41 +10:00
..
policy tomoyo: Do not generate empty policy files 2015-04-07 21:27:45 +02:00
.gitignore tomoyo: Do not generate empty policy files 2015-04-07 21:27:45 +02:00
audit.c tomoyo: Use sensible time interface 2014-06-12 16:18:45 +02:00
common.c tomoyo: Use sensible time interface 2014-06-12 16:18:45 +02:00
common.h switch security_inode_getattr() to struct path * 2015-04-11 22:24:32 -04:00
condition.c VFS: security/: d_backing_inode() annotations 2015-04-15 15:06:56 -04:00
domain.c tomoyo: remove the second argument of k[un]map_atomic() 2012-03-20 21:48:28 +08:00
environ.c TOMOYO: Add environment variable name restriction support. 2011-09-14 08:27:05 +10:00
file.c switch security_inode_getattr() to struct path * 2015-04-11 22:24:32 -04:00
gc.c TOMOYO: Fix quota and garbage collector. 2011-10-12 12:15:20 +11:00
group.c TOMOYO: Add socket operation restriction support. 2011-09-14 08:27:05 +10:00
Kconfig tomoyo: Use bin2c to generate builtin-policy.h 2015-04-07 21:27:45 +02:00
load_policy.c usermodehelper: use UMH_WAIT_PROC consistently 2012-03-23 16:58:41 -07:00
Makefile tomoyo: Do not generate empty policy files 2015-04-07 21:27:45 +02:00
memory.c TOMOYO: Remove tomoyo_policy_memory_lock spinlock. 2011-09-26 10:46:22 +10:00
mount.c consitify do_mount() arguments 2012-10-11 20:02:04 -04:00
network.c TOMOYO: Add socket operation restriction support. 2011-09-14 08:27:05 +10:00
realpath.c VFS: security/: d_backing_inode() annotations 2015-04-15 15:06:56 -04:00
securityfs_if.c tomoyo_close_control: don't bother with return value 2013-04-29 15:41:42 -04:00
tomoyo.c LSM: Switch to lists of hooks 2015-05-12 15:00:41 +10:00
util.c tomoyo: reduce mmap_sem hold for mm->exe_file 2015-04-17 09:04:11 -04:00