* [PATCH] Let us die more gracefully
@ 2002-07-19 21:18 Jun Sun
2002-07-22 13:48 ` Maciej W. Rozycki
0 siblings, 1 reply; 3+ messages in thread
From: Jun Sun @ 2002-07-19 21:18 UTC (permalink / raw)
To: linux-mips, Ralf Baechle
[-- Attachment #1: Type: text/plain, Size: 182 bytes --]
This patch dumps the offending code context rather than dumping the context of
do_ri() function call itself.
Apply to both branches. (Same is true with the previous patch)
Jun
[-- Attachment #2: 020719.b.graceful-death-in-do_ri.patch --]
[-- Type: text/plain, Size: 403 bytes --]
diff -Nru linux/arch/mips/kernel/traps.c.orig linux/arch/mips/kernel/traps.c
--- linux/arch/mips/kernel/traps.c.orig Thu Jul 18 15:39:50 2002
+++ linux/arch/mips/kernel/traps.c Thu Jul 18 16:49:32 2002
@@ -614,8 +614,7 @@
*/
asmlinkage void do_ri(struct pt_regs *regs)
{
- if (!user_mode(regs))
- BUG();
+ die_if_kernel("no ll/sc emulation for kernel code", regs);
#ifndef CONFIG_CPU_HAS_LLSC
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Let us die more gracefully
2002-07-19 21:18 [PATCH] Let us die more gracefully Jun Sun
@ 2002-07-22 13:48 ` Maciej W. Rozycki
2002-07-22 16:40 ` Jun Sun
0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2002-07-22 13:48 UTC (permalink / raw)
To: Jun Sun; +Cc: linux-mips, Ralf Baechle
On Fri, 19 Jul 2002, Jun Sun wrote:
> This patch dumps the offending code context rather than dumping the context of
> do_ri() function call itself.
The message is misleading -- the reason may be any illegal opcode.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Let us die more gracefully
2002-07-22 13:48 ` Maciej W. Rozycki
@ 2002-07-22 16:40 ` Jun Sun
0 siblings, 0 replies; 3+ messages in thread
From: Jun Sun @ 2002-07-22 16:40 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: linux-mips, Ralf Baechle
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
Maciej W. Rozycki wrote:
> On Fri, 19 Jul 2002, Jun Sun wrote:
>
>
>>This patch dumps the offending code context rather than dumping the context of
>>do_ri() function call itself.
>
>
> The message is misleading -- the reason may be any illegal opcode.
>
That is true. Here is the revised one.
Jun
[-- Attachment #2: 020719.b.graceful-death-in-do_ri.patch --]
[-- Type: text/plain, Size: 404 bytes --]
diff -Nru linux/arch/mips/kernel/traps.c.orig linux/arch/mips/kernel/traps.c
--- linux/arch/mips/kernel/traps.c.orig Thu Jul 18 15:39:50 2002
+++ linux/arch/mips/kernel/traps.c Thu Jul 18 16:49:32 2002
@@ -614,8 +614,7 @@
*/
asmlinkage void do_ri(struct pt_regs *regs)
{
- if (!user_mode(regs))
- BUG();
+ die_if_kernel("Reserved instruction in kernel code", regs);
#ifndef CONFIG_CPU_HAS_LLSC
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-07-22 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-19 21:18 [PATCH] Let us die more gracefully Jun Sun
2002-07-22 13:48 ` Maciej W. Rozycki
2002-07-22 16:40 ` Jun Sun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox