linux-mips
[Top] [All Lists]

Re: [PATCH] [MIPS] Fix order of BRK_BUG in case

To: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Subject: Re: [PATCH] [MIPS] Fix order of BRK_BUG in case
From: Ralf Baechle <ralf@linux-mips.org>
Date: Sun, 20 Apr 2008 12:24:17 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <Pine.LNX.4.64.0804192310460.20623@wrl-59.cs.helsinki.fi>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <Pine.LNX.4.64.0804192310460.20623@wrl-59.cs.helsinki.fi>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.17 (2007-11-01)
On Sat, Apr 19, 2008 at 11:16:36PM +0300, Ilpo Järvinen wrote:

> diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
> index 984c0d0..4dfcd61 100644
> --- a/arch/mips/kernel/traps.c
> +++ b/arch/mips/kernel/traps.c
> @@ -694,7 +694,7 @@ asmlinkage void do_bp(struct pt_regs *regs)
>               info.si_addr = (void __user *) regs->cp0_epc;
>               force_sig_info(SIGFPE, &info, current);
>               break;
> -     case BRK_BUG:
> +     case BRK_BUG << 10:
>               die("Kernel bug detected", regs);
                ^^^

Now what will be happening if with your patch applied a "break BRK_BUG"
instruction is executed in userspace?

  Ralf

<Prev in Thread] Current Thread [Next in Thread>