linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: fix for bad_mode() handler to always result in panic
@ 2018-08-07 11:03 Hari Vyas
  2018-08-07 12:27 ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Hari Vyas @ 2018-08-07 11:03 UTC (permalink / raw)
  To: linux-arm-kernel

bad_mode() handler is called for invalid or undefined
instruction in el1 level or when irq,fiq,sync or error
situation happen in el1 or el0 level.

As per latest code, above abnormal situation may not result in
panic always due to die() call if user mode is determined at
that moment. That will just result in kill of current process
and panic will be avoided which it must not.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=200637
Signed-off-by: Hari Vyas <hari.vyas@broadcom.com>
---
 arch/arm64/kernel/traps.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index d399d45..716ee73 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -621,7 +621,6 @@ asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr)
 		handler[reason], smp_processor_id(), esr,
 		esr_get_class_string(esr));
 
-	die("Oops - bad mode", regs, 0);
 	local_daif_mask();
 	panic("bad mode");
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-08-22  6:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-07 11:03 [PATCH] arm64: fix for bad_mode() handler to always result in panic Hari Vyas
2018-08-07 12:27 ` Greg KH
2018-08-08 18:18   ` Hari Vyas
2018-08-08 18:23     ` Florian Fainelli
2018-08-10 16:46       ` Hari Vyas
2018-08-21 14:16         ` Hari Vyas
2018-08-21 17:38           ` Will Deacon
2018-08-22  6:31             ` Hari Vyas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).