diff options
author | Alexander Gordeev <agordeev@linux.ibm.com> | 2022-08-13 19:45:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-15 11:30:07 +0200 |
commit | 4b198c41d736c1c4c4974fd53cd03d632abdb6be (patch) | |
tree | b0f0931851554e44af57717d5ae84a02b7b86fca | |
parent | a557ae094207cffcf0d612c7bdbef7513519683a (diff) | |
download | linux-stable-4b198c41d736c1c4c4974fd53cd03d632abdb6be.tar.gz linux-stable-4b198c41d736c1c4c4974fd53cd03d632abdb6be.tar.bz2 linux-stable-4b198c41d736c1c4c4974fd53cd03d632abdb6be.zip |
s390/boot: fix absolute zero lowcore corruption on boot
[ Upstream commit 12dd19c159659ec9050f45dc8a2ff3c3917f4be3 ]
Crash dump always starts on CPU0. In case CPU0 is offline the
prefix page is not installed and the absolute zero lowcore is
used. However, struct lowcore::mcesad is never assigned and
stays zero. That leads to __machine_kdump() -> save_vx_regs()
call silently stores vector registers to the absolute lowcore
at 0x11b0 offset.
Fixes: a62bc0739253 ("s390/kdump: add support for vector extension")
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | arch/s390/kernel/nmi.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c index a50f2ff1b00e..383b4799b6dd 100644 --- a/arch/s390/kernel/nmi.c +++ b/arch/s390/kernel/nmi.c @@ -62,7 +62,7 @@ static inline unsigned long nmi_get_mcesa_size(void) * The structure is required for machine check happening early in * the boot process. */ -static struct mcesa boot_mcesa __initdata __aligned(MCESA_MAX_SIZE); +static struct mcesa boot_mcesa __aligned(MCESA_MAX_SIZE); void __init nmi_alloc_boot_cpu(struct lowcore *lc) { diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 6b1a8697fae8..4dfe37b06889 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -484,6 +484,7 @@ static void __init setup_lowcore_dat_off(void) put_abs_lowcore(restart_data, lc->restart_data); put_abs_lowcore(restart_source, lc->restart_source); put_abs_lowcore(restart_psw, lc->restart_psw); + put_abs_lowcore(mcesad, lc->mcesad); lc->spinlock_lockval = arch_spin_lockval(0); lc->spinlock_index = 0; |