Skip to content

Commit 12dd19c

Browse files
Alexander GordeevVasily Gorbik
authored andcommitted
s390/boot: fix absolute zero lowcore corruption on boot
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>
1 parent 7c8d42f commit 12dd19c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

arch/s390/kernel/nmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static inline unsigned long nmi_get_mcesa_size(void)
6464
* structure. The structure is required for machine check happening
6565
* early in the boot process.
6666
*/
67-
static struct mcesa boot_mcesa __initdata __aligned(MCESA_MAX_SIZE);
67+
static struct mcesa boot_mcesa __aligned(MCESA_MAX_SIZE);
6868

6969
void __init nmi_alloc_mcesa_early(u64 *mcesad)
7070
{

arch/s390/kernel/setup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ static void __init setup_lowcore_dat_off(void)
479479
put_abs_lowcore(restart_data, lc->restart_data);
480480
put_abs_lowcore(restart_source, lc->restart_source);
481481
put_abs_lowcore(restart_psw, lc->restart_psw);
482+
put_abs_lowcore(mcesad, lc->mcesad);
482483

483484
mcck_stack = (unsigned long)memblock_alloc(THREAD_SIZE, THREAD_SIZE);
484485
if (!mcck_stack)

0 commit comments

Comments
 (0)