Skip to content

Commit 6b4b54c

Browse files
eaibmzVasily Gorbik
authored andcommitted
s390/setup: preserve memory at OLDMEM_BASE and OLDMEM_SIZE
We need to preserve the values at OLDMEM_BASE and OLDMEM_SIZE which are used by zgetdump in case when kdump crashes. In that case zgetdump will attempt to read OLDMEM_BASE and OLDMEM_SIZE in order to find out where the memory range [0 - OLDMEM_SIZE] belonging to the production kernel is. Fixes: f1a5469 ("s390/setup: don't reserve memory that occupied decompressor's head") Cc: stable@vger.kernel.org # 5.15+ Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com> Acked-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
1 parent dd9cb84 commit 6b4b54c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/s390/kernel/setup.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,8 @@ static void __init check_initrd(void)
800800
static void __init reserve_kernel(void)
801801
{
802802
memblock_reserve(0, STARTUP_NORMAL_OFFSET);
803+
memblock_reserve(OLDMEM_BASE, sizeof(unsigned long));
804+
memblock_reserve(OLDMEM_SIZE, sizeof(unsigned long));
803805
memblock_reserve(__amode31_base, __eamode31 - __samode31);
804806
memblock_reserve(__pa(sclp_early_sccb), EXT_SCCB_READ_SCP);
805807
memblock_reserve(__pa(_stext), _end - _stext);

0 commit comments

Comments
 (0)