]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: Disable STACKPROTECTOR_PER_TASK if GCC_PLUGIN_RANDSTRUCT is enabled
authorGuenter Roeck <linux@roeck-us.net>
Tue, 6 Jul 2021 16:26:21 +0000 (09:26 -0700)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Wed, 4 Aug 2021 04:24:48 +0000 (21:24 -0700)
commit13bffaef2d196f156bd83ef80cc0ffd3613c024f
tree0c89003076bb79ec85965fd5bae07dc024df86ac
parent7ff92489042e1ecfb4681efe9e23cf4c77c0ea6f
riscv: Disable STACKPROTECTOR_PER_TASK if GCC_PLUGIN_RANDSTRUCT is enabled

riscv uses the value of TSK_STACK_CANARY to set
stack-protector-guard-offset. With GCC_PLUGIN_RANDSTRUCT enabled, that
value is non-deterministic, and with riscv:allmodconfig often results
in build errors such as

cc1: error: '8120' is not a valid offset in '-mstack-protector-guard-offset='

Enable STACKPROTECTOR_PER_TASK only if GCC_PLUGIN_RANDSTRUCT is disabled
to fix the problem.

Fixes: 80ec1690201af ("riscv: Enable per-task stack canaries")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/Kconfig