[PATCH] powerpc: dump kernel log before carrying out fadump or kdump

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE2570d REVIEWED: 1 (0M)

1 review trailer.

2 messages, 2 authors, 2019-08-27 · open the first message on its own page

[PATCH] powerpc: dump kernel log before carrying out fadump or kdump

From: Ganesh Goudar <hidden>
Date: 2019-08-22 06:34:27

Die or panic path in system reset handler dumps kernel log to
nvram, since commit 4388c9b3a6ee ("powerpc: Do not send system
reset request through the oops path") system reset request is
not allowed to take die path if fadump or kdump is configured,
hence we miss dumping kernel log to nvram, call kmsg_dump()
before carrying out fadump or kdump.

Fixes: 4388c9b3a6ee ("powerpc: Do not send system reset request through the oops path")
Reviewed-by: Mahesh Salgaonkar <redacted>
Signed-off-by: Ganesh Goudar <redacted>
---
 arch/powerpc/kernel/traps.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 11caa0291254..82f43535e686 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -472,6 +472,7 @@ void system_reset_exception(struct pt_regs *regs)
 	if (debugger(regs))
 		goto out;
 
+	kmsg_dump(KMSG_DUMP_OOPS);
 	/*
 	 * A system reset is a request to dump, so we always send
 	 * it through the crashdump code (if fadump or kdump are
-- 
2.17.2

Re: [PATCH] powerpc: dump kernel log before carrying out fadump or kdump

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2019-08-27 10:14:45

Ganesh Goudar's on August 22, 2019 4:31 pm:
Die or panic path in system reset handler dumps kernel log to
nvram, since commit 4388c9b3a6ee ("powerpc: Do not send system
reset request through the oops path") system reset request is
not allowed to take die path if fadump or kdump is configured,
hence we miss dumping kernel log to nvram, call kmsg_dump()
before carrying out fadump or kdump.

Fixes: 4388c9b3a6ee ("powerpc: Do not send system reset request through the oops path")
Reviewed-by: Mahesh Salgaonkar <redacted>
Signed-off-by: Ganesh Goudar <redacted>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help