]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
s390/kasan: double the stack size
authorVasily Gorbik <gor@linux.ibm.com>
Fri, 17 Nov 2017 15:52:22 +0000 (16:52 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 9 Oct 2018 09:21:21 +0000 (11:21 +0200)
Kasan stack instrumentation pads stack variables with redzones, which
increases stack frames size significantly. Stack sizes are increased
from 16k to 32k in the code, as well as for the kernel stack overflow
detection option (CHECK_STACK).

Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/Makefile
arch/s390/include/asm/thread_info.h

index ee65185bbc807284b8729b5c9d52c129fafba30e..0b33577932c3bd9c552c62cfe473979987c97313 100644 (file)
@@ -27,7 +27,7 @@ KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-option,-ffreestanding)
 KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g)
 KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,))
 UTS_MACHINE    := s390x
-STACK_SIZE     := 16384
+STACK_SIZE     := $(if $(CONFIG_KASAN),32768,16384)
 CHECKFLAGS     += -D__s390__ -D__s390x__
 
 export LD_BFD
index 1bbbaf6ae511e46cfd6b6337d4b36849f6b82799..79b40600f523f43fdc7da9c68197303222ee7a35 100644 (file)
 /*
  * General size of kernel stacks
  */
+#ifdef CONFIG_KASAN
+#define THREAD_SIZE_ORDER 3
+#else
 #define THREAD_SIZE_ORDER 2
+#endif
 #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
 
 #ifndef __ASSEMBLY__