--- zzzz-none-000/linux-4.4.271/arch/arm/include/asm/thread_info.h 2021-06-03 06:22:09.000000000 +0000 +++ dakota-7530ac-750/linux-4.4.271/arch/arm/include/asm/thread_info.h 2023-01-11 09:25:41.000000000 +0000 @@ -16,9 +16,30 @@ #include #include -#define THREAD_SIZE_ORDER 1 -#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) -#define THREAD_START_SP (THREAD_SIZE - 8) +/* AVM: Changed to 16k kernel stack size. - AMY */ +#include +#if 0 +#ifndef CONFIG_KASAN +#define THREAD_SIZE_ORDER 1 +#else +#define THREAD_SIZE_ORDER 2 +#endif +#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) +#define THREAD_START_SP (THREAD_SIZE - 8) +#else +/* PAGE_SIZE is 4k; shift 2 is 16k */ +#ifdef CONFIG_THREAD_SIZE_ORDER +#define THREAD_SIZE_ORDER CONFIG_THREAD_SIZE_ORDER +#else +#ifndef CONFIG_KASAN +#define THREAD_SIZE_ORDER 1 +#else +#define THREAD_SIZE_ORDER 2 +#endif +#endif +#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) +#define THREAD_START_SP (THREAD_SIZE - 8) +#endif #ifndef __ASSEMBLY__