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

2019-01-11 Thread Andrey Ryabinin
On 1/10/19 12:52 AM, Qian Cai wrote: > If the kernel is configured with KASAN_EXTRA, the stack size is > increasted significantly due to enable this option will set > "-fstack-reuse" to "none" in GCC [1]. As the results, it could trigger > stack overrun quite often with 32k stack size compiled

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

2019-01-09 Thread Qian Cai
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

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

2019-01-09 Thread Andrew Morton
On Wed, 9 Jan 2019 16:52:09 -0500 Qian Cai wrote: > If the kernel is configured with KASAN_EXTRA, the stack size is > increasted significantly due to enable this option will set > "-fstack-reuse" to "none" in GCC [1]. As the results, it could trigger > stack overrun quite often with 32k stack

[RESEND PATCH] x86_64: increase stack size for KASAN_EXTRA

2019-01-09 Thread Qian Cai
If the kernel is configured with KASAN_EXTRA, the stack size is increasted significantly due to enable this option will set "-fstack-reuse" to "none" in GCC [1]. As the results, it could trigger stack overrun quite often with 32k stack size compiled using GCC 8. For example, this reproducer