arch: arm64: Kconfig: Introduce ARM64_STACK_PROTECTION

Introduce the ARM64_STACK_PROTECTION config. This option leverages the
MMU or MPU to cause a system fatal error if the bounds of the current
process stack are overflowed. This is done by preceding all stack areas
with a fixed guard region. The config depends on MPU for now since MMU
stack protection is not ready.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
This commit is contained in:
Jaxson Han 2023-01-20 10:29:38 +08:00 committed by Carles Cufí
commit 1fe9a06d8b

View file

@ -168,6 +168,17 @@ config ARM64_FALLBACK_ON_RESERVED_CORES
then that core will be skipped and the next core in the device tree
will be used.
config ARM64_STACK_PROTECTION
bool
default y if HW_STACK_PROTECTION
depends on ARM_MPU
select THREAD_STACK_INFO
select ARM64_SAFE_EXCEPTION_STACK
help
This option leverages the MMU or MPU to cause a system fatal error if
the bounds of the current process stack are overflowed. This is done
by preceding all stack areas with a fixed guard region.
if CPU_CORTEX_A
config ARMV8_A_NS