--- zzzz-none-000/linux-5.4.213/arch/arm/include/asm/thread_info.h 2022-09-15 10:04:56.000000000 +0000 +++ miami-7690-761/linux-5.4.213/arch/arm/include/asm/thread_info.h 2024-05-29 11:19:50.000000000 +0000 @@ -13,7 +13,22 @@ #include #include -#define THREAD_SIZE_ORDER 1 +#ifdef CONFIG_KASAN +/* + * KASan uses a lot of extra stack space so the thread size order needs to + * be increased. + */ +#define THREAD_SIZE_ORDER 2 +#else +/* AVM: Changed to 16k kernel stack size. - AMY */ +/* PAGE_SIZE is 4k; shift 2 is 16k */ +#ifdef CONFIG_THREAD_SIZE_ORDER +#define THREAD_SIZE_ORDER CONFIG_THREAD_SIZE_ORDER +#else +#define THREAD_SIZE_ORDER 2 +#endif +#endif + #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) #define THREAD_START_SP (THREAD_SIZE - 8)