From 6f8cce75a5c7a59ff78073f9d7196f1d511b7e32 Mon Sep 17 00:00:00 2001 From: Jerome Forissier Date: Wed, 23 Aug 2023 11:55:52 +0200 Subject: [PATCH] core: asan: arm64: increase stack sizes for ASAN Increase STACK_TMP_SIZE and STACK_THREAD_SIZE when CFG_CORE_SANITIZE_KADDRESS=y. With that, xtest passes on PLATFORM=vexpress-qemu_armv8a. Signed-off-by: Jerome Forissier --- core/arch/arm/include/kernel/thread_private_arch.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/arch/arm/include/kernel/thread_private_arch.h b/core/arch/arm/include/kernel/thread_private_arch.h index d52f96b4236..d5b188429c3 100644 --- a/core/arch/arm/include/kernel/thread_private_arch.h +++ b/core/arch/arm/include/kernel/thread_private_arch.h @@ -37,12 +37,17 @@ #endif /*ARM32*/ #ifdef ARM64 -#if defined(__clang__) && !defined(__OPTIMIZE_SIZE__) +#if (defined(__clang__) && !defined(__OPTIMIZE_SIZE__)) || \ + defined(CFG_CORE_SANITIZE_KADDRESS) #define STACK_TMP_SIZE (4096 + STACK_TMP_OFFS + CFG_STACK_TMP_EXTRA) #else #define STACK_TMP_SIZE (2048 + STACK_TMP_OFFS + CFG_STACK_TMP_EXTRA) #endif +#if defined(CFG_CORE_SANITIZE_KADDRESS) +#define STACK_THREAD_SIZE (10240 + CFG_STACK_THREAD_EXTRA) +#else #define STACK_THREAD_SIZE (8192 + CFG_STACK_THREAD_EXTRA) +#endif #if TRACE_LEVEL > 0 #define STACK_ABT_SIZE 3072