summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/i387.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-11-28 03:58:46 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-11-28 03:58:46 +0000
commitb63ad0882a16a5d28003e57f2b0b81dee3fb322b (patch)
tree0a343ce219e2b8b38a5d702d66032c57b83d9720 /arch/i386/kernel/i387.c
parenta9d7bff9a84dba79609a0002e5321b74c4d64c64 (diff)
Merge with 2.4.0-test11.
Diffstat (limited to 'arch/i386/kernel/i387.c')
-rw-r--r--arch/i386/kernel/i387.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/i386/kernel/i387.c b/arch/i386/kernel/i387.c
index c3d052e8a..3031432d0 100644
--- a/arch/i386/kernel/i387.c
+++ b/arch/i386/kernel/i387.c
@@ -442,6 +442,8 @@ int set_fpxregs( struct task_struct *tsk, struct user_fxsr_struct *buf )
if ( HAVE_FXSR ) {
__copy_from_user( &tsk->thread.i387.fxsave, (void *)buf,
sizeof(struct user_fxsr_struct) );
+ /* mxcsr bit 6 and 31-16 must be zero for security reasons */
+ tsk->thread.i387.fxsave.mxcsr &= 0xffbf;
return 0;
} else {
return -EIO;