From 7cf636c99b257c1b4b12066ab34fd5f06e8d892f Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Tue, 1 Jul 2025 18:12:06 +0200 Subject: [PATCH] s390/early: Copy last breaking event address to pt_regs In case of an early crash the early program check handler also prints the last breaking event address which is contained within the pt_regs structure. However it is not initialized, and therefore a more or less random value is printed in case of a crash. Copy the last breaking event address from lowcore to pt_regs in case of an early program check to address this. This also makes it easier to analyze early crashes. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev --- arch/s390/kernel/early.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 3cf050f7c605..9adfbdd377dc 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c @@ -157,6 +157,7 @@ void __init __do_early_pgm_check(struct pt_regs *regs) regs->int_code = lc->pgm_int_code; regs->int_parm_long = lc->trans_exc_code; + regs->last_break = lc->pgm_last_break; ip = __rewind_psw(regs->psw, regs->int_code >> 16); /* Monitor Event? Might be a warning */ -- 2.47.2