mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kirill Korotaev <dev@sw.ru>
To: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: i387 oops and
Date: Sat, 06 Aug 2005 17:39:19 +0400	[thread overview]
Message-ID: <42F4BD87.80300@sw.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]

Hello,

we recently obtained the oops below in restore_fpu() which makes us 
believe that there was lost correct masking of the hardcoded constant:
0x1f80 with mxcsr_feature_mask in init_fpu().
Can someone check that patch attached?

general protection fault: 0000 [#1]
SMP
Modules linked in: e100 mii ipt_length ipt_ttl ipt_tcpmss ipt_TCPMSS 
iptable_mangle iptable_filter ipt_multiport ipt_limit ipt_tos ipt_REJECT 
ip_tables
CPU:    1
EIP:    0060:[<c010cc80>]    Tainted:  P
EFLAGS: 00010206   (2.6.8-dev-smp)
EIP is at restore_fpu+0x10/0x20
eax: 0383fbff   ebx: c34178ec   ecx: 00000000   edx: c34178ec
esi: ce163000   edi: 00000067   ebp: bffffcd8   esp: ce163fb0
ds: 007b   es: 007b   ss: 0068
Process cp (pid: 821, threadinfo=ce163000 task=c34178ec)
Stack: c0107298 c34178ec 08055038 08052ce4 c039ed70 08055038 00000031 
08055038
        08052ce4 00000067 bffffcd8 00000000 0000007b 0000007b ffffffff 
0804df06
        00000073 00010246 bffffcd8 0000007b
Call Trace:
  [<c0107298>] math_state_restore+0x28/0x50
  [<c039ed70>] device_not_available+0x24/0x29
Code: 0f ae 8a e0 02 00 00 c3 dd a2 e0 02 00 00 c3 90 a1 4c fb 3f


[-- Attachment #2: diff-fpu-mxcsr-20050804 --]
[-- Type: text/plain, Size: 607 bytes --]

--- linux-2.6.8.1-t028/arch/i386/kernel/i387.c.xxx	2005-08-01 11:20:06.000000000 +0400
+++ linux-2.6.8.1-t028/arch/i386/kernel/i387.c	2005-08-04 14:12:19.000000000 +0400
@@ -52,7 +52,8 @@ void init_fpu(struct task_struct *tsk)
 		memset(&tsk->thread.i387.fxsave, 0, sizeof(struct i387_fxsave_struct));
 		tsk->thread.i387.fxsave.cwd = 0x37f;
 		if (cpu_has_xmm)
-			tsk->thread.i387.fxsave.mxcsr = 0x1f80;
+			tsk->thread.i387.fxsave.mxcsr =
+				(0x1f80 & mxcsr_feature_mask);
 	} else {
 		memset(&tsk->thread.i387.fsave, 0, sizeof(struct i387_fsave_struct));
 		tsk->thread.i387.fsave.cwd = 0xffff037fu;

                 reply	other threads:[~2005-08-06 13:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=42F4BD87.80300@sw.ru \
    --to=dev@sw.ru \
    --cc=akpm@osdl.org \
    --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

Powered by JetHome