From: Richard Henderson <rth@redhat.com>
To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Jay.Estabrook@compaq.com, linux-kernel@vger.kernel.org
Subject: Re: [alpha] cleanup opDEC workaround
Date: Tue, 20 Nov 2001 09:08:18 -0800 [thread overview]
Message-ID: <20011120090818.A16366@redhat.com> (raw)
In-Reply-To: <20011119232355.C16091@redhat.com> <20011120133150.A9033@jurassic.park.msu.ru>
In-Reply-To: <20011120133150.A9033@jurassic.park.msu.ru>; from ink@jurassic.park.msu.ru on Tue, Nov 20, 2001 at 01:31:50PM +0300
On Tue, Nov 20, 2001 at 01:31:50PM +0300, Ivan Kokshaysky wrote:
> On Mon, Nov 19, 2001 at 11:23:55PM -0800, Richard Henderson wrote:
> > --- 2.4.15-7/arch/alpha/kernel/traps.c.~2~ Mon Nov 19 23:05:50 2001
> > +++ 2.4.15-7/arch/alpha/kernel/traps.c Mon Nov 19 23:07:32 2001
>
> It seems to be the wrong diff:
Oh, it depended on this one.
r~
--- 2.4.15-7/arch/alpha/kernel/traps.c.~1~ Mon Nov 19 23:03:26 2001
+++ 2.4.15-7/arch/alpha/kernel/traps.c Mon Nov 19 23:05:50 2001
@@ -20,6 +20,7 @@
#include <asm/unaligned.h>
#include <asm/sysinfo.h>
#include <asm/hwrpb.h>
+#include <asm/mmu_context.h>
#include "proto.h"
@@ -311,8 +312,22 @@ do_entIF(unsigned long type, unsigned lo
if (alpha_fp_emul(regs.pc-4))
return;
}
- /* fallthrough as illegal instruction .. */
+ break;
+
case 3: /* FEN fault */
+ /* Irritating users can call PAL_clrfen to disable the
+ FPU for the process. The kernel will then trap in
+ do_switch_stack and undo_switch_stack when we try
+ to save and restore the FP registers.
+
+ Given that GCC by default generates code that uses the
+ FP registers, PAL_clrfen is not useful except for DoS
+ attacks. So turn the bleeding FPU back on and be done
+ with it. */
+ current->thread.pal_flags |= 1;
+ __reload_thread(¤t->thread);
+ return;
+
case 5: /* illoc */
default: /* unexpected instruction-fault type */
;
next prev parent reply other threads:[~2001-11-20 17:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-20 7:23 [alpha] cleanup opDEC workaround Richard Henderson
2001-11-20 10:31 ` Ivan Kokshaysky
2001-11-20 17:08 ` Richard Henderson [this message]
2001-11-20 17:51 ` Ivan Kokshaysky
2001-11-20 18:47 ` Richard Henderson
2001-11-21 12:15 ` Ivan Kokshaysky
2001-11-21 22:27 ` Richard Henderson
2001-11-22 10:55 ` Ivan Kokshaysky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011120090818.A16366@redhat.com \
--to=rth@redhat.com \
--cc=Jay.Estabrook@compaq.com \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox