Skip to content

Commit

Permalink
s390/kasan: add kdump support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vasily Gorbik committed Aug 29, 2019
1 parent d0b3198 commit 042c1d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/s390/mm/kasan_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 042c1d2

Please sign in to comment.