Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/arch/x86/x86 Pull up following revision(s) (requested...
details: https://anonhg.NetBSD.org/src/rev/a0e43475565c
branches: netbsd-8
changeset: 434496:a0e43475565c
user: snj <snj%NetBSD.org@localhost>
date: Thu Dec 21 19:33:15 2017 +0000
description:
Pull up following revision(s) (requested by maxv in ticket #442):
sys/arch/x86/x86/fpu.c: 1.19 via patch
Mask mxcsr, otherwise userland could set reserved bits to 1 and make
xrstor fault.
diffstat:
sys/arch/x86/x86/fpu.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r ff4abf0f1039 -r a0e43475565c sys/arch/x86/x86/fpu.c
--- a/sys/arch/x86/x86/fpu.c Thu Dec 21 19:28:53 2017 +0000
+++ b/sys/arch/x86/x86/fpu.c Thu Dec 21 19:33:15 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.c,v 1.12 2016/09/29 17:01:43 maxv Exp $ */
+/* $NetBSD: fpu.c,v 1.12.8.1 2017/12/21 19:33:15 snj Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc. All
@@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.12 2016/09/29 17:01:43 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.12.8.1 2017/12/21 19:33:15 snj Exp $");
#include "opt_multiprocessor.h"
@@ -591,6 +591,7 @@
memcpy(&fpu_save->sv_xmm, fpregs, sizeof(fpu_save->sv_xmm));
/* Invalid bits in the mxcsr_mask will cause faults */
fpu_save->sv_xmm.fx_mxcsr_mask &= __INITIAL_MXCSR_MASK__;
+ fpu_save->sv_xmm.fx_mxcsr &= fpu_save->sv_xmm.fx_mxcsr_mask;
} else {
process_xmm_to_s87(fpregs, &fpu_save->sv_87);
}
Home |
Main Index |
Thread Index |
Old Index