Skip to contentSkip to conversation

init: move stack canary initialization after setup_arch

PATCH New [email protected] 1 participant 1 message Sep 8, 2017

lore
Share & tools
lore
#0 lore raw

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.

---

 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
diff -puN init/main.c~init-move-stack-canary-initialization-after-setup_arch init/main.c
@@ -515,12 +515,6 @@ asmlinkage __visible void __init start_k
 	smp_setup_processor_id();
 	debug_objects_early_init();
 
-	/*
-	 * Set up the initial canary ASAP:
-	 */
-	add_latent_entropy();
-	boot_init_stack_canary();