]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: r4k,octeon,r2300: stack protector: change canary per task
authorGregory Fong <gregory.0xf0@gmail.com>
Mon, 17 Jun 2013 19:36:07 +0000 (19:36 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 1 Jul 2013 13:10:52 +0000 (15:10 +0200)
commit4a485b059532a80671f7194a50260553845716d0
treee987890f85581753d951d917e2a9db0b3592b667
parentd9012638c1ee80e1fd4ddec38b891da976760cee
MIPS: r4k,octeon,r2300: stack protector: change canary per task

For non-SMP, uses the new random canary value that is stored in the
task struct whenever a new task is forked.  Based on ARM version in
8b499865a09290cb8945b8923c7bbf6edacff417 and subject to the same
limitations: the variable GCC expects, __stack_chk_guard, is global,
so this will not work on SMP.

Quoting Nicolas Pitre <nico@fluxnic.net>: "One way to overcome this
GCC limitation would be to locate the __stack_chk_guard variable into
a memory page of its own for each CPU, and then use TLB locking to
have each CPU see its own page at the same virtual address for each of
them."

Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5488/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/asm-offsets.c
arch/mips/kernel/octeon_switch.S
arch/mips/kernel/r2300_switch.S
arch/mips/kernel/r4k_switch.S