diff options
author | 2019-08-20 19:45:47 +0200 | |
---|---|---|
committer | 2019-08-29 15:34:58 +0200 | |
commit | 042c1d29de8c0d4e4c9e77c64995b59be97aed33 (patch) | |
tree | 2489664e6d2241d4b2b3b6cad33d90479fec9e0f /arch | |
parent | s390/setup: avoid using strncmp with hardcoded length (diff) | |
download | linux-042c1d29de8c0d4e4c9e77c64995b59be97aed33.tar.gz linux-042c1d29de8c0d4e4c9e77c64995b59be97aed33.tar.bz2 linux-042c1d29de8c0d4e4c9e77c64995b59be97aed33.zip |
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')
-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)) { |