diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2019-08-20 20:45:47 +0300 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2019-08-29 16:34:58 +0300 |
commit | 042c1d29de8c0d4e4c9e77c64995b59be97aed33 (patch) | |
tree | 2489664e6d2241d4b2b3b6cad33d90479fec9e0f /arch/s390/mm | |
parent | d0b319843baddc1a224ccdc73729aed55ec7787a (diff) | |
download | linux-042c1d29de8c0d4e4c9e77c64995b59be97aed33.tar.xz |
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/mm')
-rw-r--r-- | arch/s390/mm/kasan_init.c | 2 |
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)) { |