]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
s390/head: avoid doubling early boot stack size under KASAN
authorVasily Gorbik <gor@linux.ibm.com>
Fri, 12 Jan 2018 11:46:00 +0000 (12:46 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 9 Oct 2018 09:21:32 +0000 (11:21 +0200)
Early boot stack uses predefined 4 pages of memory 0x8000-0xC000. This
stack is used to run not instumented decompressor/facilities
verification C code. It doesn't make sense to double its size when
the kernel is built with KASAN support. BOOT_STACK_ORDER is introduced
to avoid that.

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

index e209cfe69bb9bb775e3fcefc5af6afd2377b4d2a..ce2cbbc417428f6a0a813c04d53cc4037f493cf6 100644 (file)
@@ -315,7 +315,7 @@ ENTRY(startup_kdump)
        brasl   %r14,startup_kernel
 
 .Lstack:
-       .long   0x8000 + THREAD_SIZE - STACK_FRAME_OVERHEAD
+       .long   0x8000 + (1<<(PAGE_SHIFT+BOOT_STACK_ORDER)) - STACK_FRAME_OVERHEAD
        .align  8
 6:     .long   0x7fffffff,0xffffffff
 
index 79b40600f523f43fdc7da9c68197303222ee7a35..27248f42a03c4561a9e1481fbea205b3b866f928 100644 (file)
@@ -18,6 +18,7 @@
 #else
 #define THREAD_SIZE_ORDER 2
 #endif
+#define BOOT_STACK_ORDER  2
 #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
 
 #ifndef __ASSEMBLY__