init: move stack canary initialization after setup_arch
PATCH 97/126 init: move stack canary initialization after setup_arch
From: Laura Abbott <[email protected]>
Subject: init: move stack canary initialization after setup_arch
Patch series "Command line randomness", v3.
A series to add the kernel command line as a source of randomness.
This patch (of 2):
Stack canary intialization involves getting a random number. Getting this random number may involve accessing caches or other architectural specific features which are not available until after the architecture is setup. Move the stack canary initialization later to accommodate this.
Signed-off-by Laura Abbott <[email protected]>
Signed-off-by Laura Abbott <[email protected]>
Acked-by Kees Cook <[email protected]>
Cc "Theodore Ts'o" <[email protected]>
Cc Daniel Micay <[email protected]>
Cc Nick Kralevich <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
init/main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
init/main.c renamed from init/main.c~init-move-stack-canary-initialization-after-setup_arch +0 -5
@@ -515,12 +515,6 @@ asmlinkage __visible void __init start_ksmp_setup_processor_id ();debug_objects_early_init (); -/* -* Set up the initial canary ASAP: -*/ -add_latent_entropy (); -boot_init_stack_canary ();