]> git.baikalelectronics.ru Git - kernel.git/commit
security: Support early LSMs
authorMatthew Garrett <matthewgarrett@google.com>
Tue, 20 Aug 2019 00:17:37 +0000 (17:17 -0700)
committerJames Morris <jmorris@namei.org>
Tue, 20 Aug 2019 04:54:15 +0000 (21:54 -0700)
commit8f118e0656fe7b0591aef7409a35722315b691a6
tree29e5abb33f499f99ec7a258a3846de344f199653
parentf01ead29895ffadc21e68cc10ab8a440d84ec7e8
security: Support early LSMs

The lockdown module is intended to allow for kernels to be locked down
early in boot - sufficiently early that we don't have the ability to
kmalloc() yet. Add support for early initialisation of some LSMs, and
then add them to the list of names when we do full initialisation later.
Early LSMs are initialised in link order and cannot be overridden via
boot parameters, and cannot make use of kmalloc() (since the allocator
isn't initialised yet).

(Fixed by Stephen Rothwell to include a stub to fix builds when
!CONFIG_SECURITY)

Signed-off-by: Matthew Garrett <mjg59@google.com>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: James Morris <jmorris@namei.org>
include/asm-generic/vmlinux.lds.h
include/linux/lsm_hooks.h
include/linux/security.h
init/main.c
security/security.c