kernel_samsung_a53x/arch/riscv
Guenter Roeck 13f3ce8ec2 riscv: Disable STACKPROTECTOR_PER_TASK if GCC_PLUGIN_RANDSTRUCT is enabled
commit a18b14d8886614b3c7d290c4cfc33389822b0535 upstream.

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: fea2fed201ee5 ("riscv: Enable per-task stack canaries")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-19 11:32:40 +01:00
..
boot Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
configs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
include riscv: Fix TASK_SIZE on 64-bit NOMMU 2024-11-19 11:32:40 +01:00
kernel riscv: process: Fix kernel gp leakage 2024-11-19 11:32:21 +01:00
lib Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net riscv, bpf: Sign-extend return values 2024-11-08 11:25:45 +01:00
Kbuild Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig riscv: Disable STACKPROTECTOR_PER_TASK if GCC_PLUGIN_RANDSTRUCT is enabled 2024-11-19 11:32:40 +01:00
Kconfig.debug Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig.socs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile riscv: Enable per-task stack canaries 2024-11-19 11:32:21 +01:00