--- zzzz-none-000/linux-4.19.183/arch/arm/include/asm/memory.h 2021-03-24 10:07:39.000000000 +0000 +++ bcm63-7530ax-756/linux-4.19.183/arch/arm/include/asm/memory.h 2023-06-28 08:54:18.000000000 +0000 @@ -21,6 +21,9 @@ #ifdef CONFIG_NEED_MACH_MEMORY_H #include #endif +#if defined(CONFIG_BCM_KF_ARM_KASAN) +#include +#endif /* PAGE_OFFSET - the virtual address of the start of the kernel image */ #define PAGE_OFFSET UL(CONFIG_PAGE_OFFSET) @@ -31,7 +34,15 @@ * TASK_SIZE - the maximum size of a user space task. * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area */ +#if defined(CONFIG_BCM_KF_ARM_KASAN) +#ifndef CONFIG_KASAN +#define TASK_SIZE (UL(CONFIG_PAGE_OFFSET) - UL(SZ_16M)) +#else +#define TASK_SIZE (KASAN_SHADOW_START) +#endif +#else #define TASK_SIZE (UL(CONFIG_PAGE_OFFSET) - UL(SZ_16M)) +#endif #define TASK_UNMAPPED_BASE ALIGN(TASK_SIZE / 3, SZ_16M) /*