diff options
| author | Laura Abbott <lauraa@codeaurora.org> | 2013-08-13 11:37:53 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-12-26 13:06:59 +0100 |
| commit | e1dfb2b3e0c84d95267e06c91b90f9fdf7081e2a (patch) | |
| tree | 1fc59b06f4a94df778ce12554f1f765f4a9a4f66 /init/main.c | |
| parent | bca71ee2753d174acdfab9e804cbcc4b4a66c4b6 (diff) | |
init: Move stack canary initialization after setup_arch
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 accomodate this.
Change-Id: I00b564a2c3172229a44339c061fa380c17fe7d8e
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Diffstat (limited to 'init/main.c')
| -rw-r--r-- | init/main.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/init/main.c b/init/main.c index 8a6b287fe..f5f12c676 100644 --- a/init/main.c +++ b/init/main.c @@ -488,11 +488,6 @@ asmlinkage void __init start_kernel(void) smp_setup_processor_id(); debug_objects_early_init(); - /* - * Set up the the initial canary ASAP: - */ - boot_init_stack_canary(); - cgroup_init_early(); local_irq_disable(); @@ -506,6 +501,10 @@ asmlinkage void __init start_kernel(void) page_address_init(); pr_notice("%s", linux_banner); setup_arch(&command_line); + /* + * Set up the the initial canary ASAP: + */ + boot_init_stack_canary(); add_device_randomness(command_line, strlen(command_line)); mm_init_owner(&init_mm, &init_task); mm_init_cpumask(&init_mm); |
