• Christophe Leroy's avatar
    powerpc/32: Change the stack protector canary value per task · 902e06eb
    Christophe Leroy authored
    Partially copied from commit df0698be ("ARM: stack protector:
    change the canary value per task")
    
    A new random value for the canary is stored in the task struct whenever
    a new task is forked.  This is meant to allow for different canary values
    per task.  On powerpc, GCC expects the canary value to be found in a global
    variable called __stack_chk_guard.  So this variable has to be updated
    with the value stored in the task struct whenever a task switch occurs.
    
    Because the variable GCC expects is global, this cannot work on SMP
    unfortunately.  So, on SMP, the same initial canary value is kept
    throughout, making this feature a bit less effective although it is still
    useful.
    Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    902e06eb
entry_32.S 34.6 KB