From: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
To: roland@redhat.com, linux-kernel@vger.kernel.org
Cc: mingo@elte.hu, tglx@linutronix.de
Subject: [patch] x86, i387: use convert_to_fxsr() in fpregs_set()
Date: Thu, 24 Jan 2008 17:40:59 -0800 [thread overview]
Message-ID: <20080125014059.GA5342@linux-os.sc.intel.com> (raw)
Roland, Just happen to notice this bug. Can you please ack the bug fix which
needs to goto x86 mm tree.
thanks.
---
[patch] x86, i387: use convert_to_fxsr() in fpregs_set()
This fixes the bug introduced recently during the revamp of the code.
fpregs_set() need to use convert_to_fxsr() rather than copying into the
fxsave struct directly.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c
index 7e354a3..93a1706 100644
--- a/arch/x86/kernel/i387.c
+++ b/arch/x86/kernel/i387.c
@@ -327,6 +327,7 @@ int fpregs_set(struct task_struct *target, const struct user_regset *regset,
const void *kbuf, const void __user *ubuf)
{
int ret;
+ struct user_i387_ia32_struct env;
if (!HAVE_HWFP)
return fpregs_soft_set(target, regset, pos, count, kbuf, ubuf);
@@ -339,13 +340,9 @@ int fpregs_set(struct task_struct *target, const struct user_regset *regset,
&target->thread.i387.fsave, 0, -1);
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
- &target->thread.i387.fxsave, 0, -1);
-
- /*
- * mxcsr reserved bits must be masked to zero for security reasons.
- */
- target->thread.i387.fxsave.mxcsr &= mxcsr_feature_mask;
+ &env, 0, -1);
+ convert_to_fxsr(target, &env);
return ret;
}
next reply other threads:[~2008-01-25 1:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-25 1:40 Siddha, Suresh B [this message]
2008-01-25 1:59 ` [PATCH x86/mm] x86: i387 fpregs_set convert_to_fxsr Roland McGrath
2008-01-25 18:04 ` Siddha, Suresh B
2008-01-25 20:38 ` Roland McGrath
2008-01-25 10:49 ` [patch] x86, i387: use convert_to_fxsr() in fpregs_set() Ingo Molnar
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=20080125014059.GA5342@linux-os.sc.intel.com \
--to=suresh.b.siddha@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=roland@redhat.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.