x86/stackprotector: Pre-initialize canary for secondary CPUs

The idle tasks created for each secondary CPU already have a random stack
canary generated by fork().  Copy the canary to the percpu variable before
starting the secondary CPU which removes the need to call
boot_init_stack_canary().

Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200617225624.799335-1-brgerst@gmail.com
This commit is contained in:
Brian Gerst
2020-06-17 18:56:24 -04:00
committed by Borislav Petkov
parent a5ce9f2bb6
commit c9a1ff316b
3 changed files with 14 additions and 14 deletions

View File

@@ -92,9 +92,7 @@ static void cpu_bringup(void)
asmlinkage __visible void cpu_bringup_and_idle(void)
{
cpu_bringup();
boot_init_stack_canary();
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
prevent_tail_call_optimization();
}
void xen_smp_intr_free_pv(unsigned int cpu)