--- zzzz-none-000/linux-4.4.60/arch/arm/include/asm/thread_info.h 2017-04-08 07:53:53.000000000 +0000 +++ jet-2400-727/linux-4.4.60/arch/arm/include/asm/thread_info.h 2021-03-17 14:36: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__