• Ingo Molnar's avatar
    x86: fix canary of the boot CPU's idle task · 7e09b2a0
    Ingo Molnar authored
    the boot CPU's idle task has a zero stackprotector canary value.
    
    this is a special task that is never forked, so the fork code
    does not randomize its canary. Do it when we hit cpu_idle().
    
    Academic sidenote: this means that the early init code runs with a
    zero canary and hence the canary becomes predictable for this short,
    boot-only amount of time.
    
    Although attack vectors against early init code are very rare, it might
    make sense to move this initialization to an earlier point.
    (to one of the early init functions that never return - such as
    start_kernel())
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    7e09b2a0
process_64.c 20.9 KB