summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorMatthew Garrett <matthewgarrett@google.com>2019-08-19 20:17:37 -0400
committerJames Morris <jmorris@namei.org>2019-08-20 00:54:15 -0400
commite6b1db98cf4d54d9ea59cfcc195f70dc946fdd38 (patch)
tree29e5abb33f499f99ec7a258a3846de344f199653 /init
parent0ecfebd2b52404ae0c54a878c872bb93363ada36 (diff)
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>
Diffstat (limited to 'init')
-rw-r--r--init/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index 66a196c5e4c3..598effd29a0a 100644
--- a/init/main.c
+++ b/init/main.c
@@ -569,6 +569,7 @@ asmlinkage __visible void __init start_kernel(void)
569 boot_cpu_init(); 569 boot_cpu_init();
570 page_address_init(); 570 page_address_init();
571 pr_notice("%s", linux_banner); 571 pr_notice("%s", linux_banner);
572 early_security_init();
572 setup_arch(&command_line); 573 setup_arch(&command_line);
573 mm_init_cpumask(&init_mm); 574 mm_init_cpumask(&init_mm);
574 setup_command_line(command_line); 575 setup_command_line(command_line);