[PATCH v4 16/16] powerpc/traps: Machine check fix RI=0 recoverability check
Nicholas Piggin
npiggin at gmail.com
Fri May 8 14:34:08 AEST 2020
The MSR[RI]=0 recoverability check should be in the recovered machine
check case. Without this, a machine check that hits in a RI region that
has for example live SRRs, will cause the interrupted context to resume
with corrupted registers and crash unpredictably.
This does not affect 64s at the moment, because it does its own early
handling with RI check, but it may affect 32s.
Cc: Christophe Leroy <christophe.leroy at c-s.fr>
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
arch/powerpc/kernel/traps.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 477befcda8d3..759d8dbf867b 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -873,13 +873,13 @@ void machine_check_exception(struct pt_regs *regs)
die("Machine check", regs, SIGBUS);
+ return;
+
+bail:
/* Must die if the interrupt is not recoverable */
if (!(regs->msr & MSR_RI))
die("Unrecoverable Machine check", regs, SIGBUS);
- return;
-
-bail:
if (!nested)
nmi_exit();
}
--
2.23.0
More information about the Linuxppc-dev
mailing list