Skip to content

Commit

Permalink
s390/boot: fix absolute zero lowcore corruption on boot
Browse files Browse the repository at this point in the history
[ Upstream commit 12dd19c ]

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: a62bc07 ("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>
  • Loading branch information
Alexander Gordeev authored and gregkh committed Sep 15, 2022
1 parent a557ae0 commit 4b198c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/kernel/nmi.c
Expand Up @@ -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)
{
Expand Down
1 change: 1 addition & 0 deletions arch/s390/kernel/setup.c
Expand Up @@ -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;
Expand Down

0 comments on commit 4b198c4

Please sign in to comment.