Re: [RESEND PATCH] x86_64: increase stack size for KASAN_EXTRA

From: Qian Cai
Date: Wed Jan 09 2019 - 23:20:55 EST




On 1/9/19 5:02 PM, Andrew Morton wrote:
>> --- a/arch/x86/include/asm/page_64_types.h
>> +++ b/arch/x86/include/asm/page_64_types.h
>> @@ -7,7 +7,11 @@
>> #endif
>>
>> #ifdef CONFIG_KASAN
>> +#ifdef CONFIG_KASAN_EXTRA
>> +#define KASAN_STACK_ORDER 2
>> +#else
>> #define KASAN_STACK_ORDER 1
>> +#endif
>> #else
>> #define KASAN_STACK_ORDER 0
>> #endif
>
> I'm suspecting this logic could be performed in Kconfig, for all
> architectures. Add a new always-defined CONFIG_KASAN_STACK_ORDER?
>

Sounds doable, but KASAN only support x86_64, arm64, s390 and xtensa so far. I
am not sure I care about the later two nor I have any way to test them if they
suffer the same problem.

I'll keep looking if more arches start to implement KASAN, and then might be a
good time to reduce all those code duplication.