summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2019-08-20 19:45:47 +0200
committerVasily Gorbik <gor@linux.ibm.com>2019-08-29 15:34:58 +0200
commit042c1d29de8c0d4e4c9e77c64995b59be97aed33 (patch)
tree2489664e6d2241d4b2b3b6cad33d90479fec9e0f /arch/s390
parentd0b319843baddc1a224ccdc73729aed55ec7787a (diff)
downloadlinux-042c1d29de8c0d4e4c9e77c64995b59be97aed33.tar.bz2
s390/kasan: add kdump support
If kasan enabled kernel is used as crash kernel it crashes itself with program check loop during kdump execution. The reason for that is that kasan shadow memory backed by pages beyond OLDMEM_SIZE. Make kasan memory allocator respect physical memory limit imposed by kdump. Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/mm/kasan_init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/mm/kasan_init.c b/arch/s390/mm/kasan_init.c
index 4a61bc955388..460f25572940 100644
--- a/arch/s390/mm/kasan_init.c
+++ b/arch/s390/mm/kasan_init.c
@@ -261,6 +261,8 @@ void __init kasan_early_init(void)
/* respect mem= cmdline parameter */
if (memory_end_set && memsize > memory_end)
memsize = memory_end;
+ if (IS_ENABLED(CONFIG_CRASH_DUMP) && OLDMEM_BASE)
+ memsize = min(memsize, OLDMEM_SIZE);
memsize = min(memsize, KASAN_SHADOW_START);
if (IS_ENABLED(CONFIG_KASAN_S390_4_LEVEL_PAGING)) {