aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-grsec/pax-fpu-regression.patch
blob: 7ec5b337400adc6f9861d4b88ce29006660f147b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff -u linux-3.6.9-pax/arch/x86/include/asm/fpu-internal.h linux-3.6.9-pax/arch/x86/include/asm/fpu-internal.h
--- linux-3.6.9-pax/arch/x86/include/asm/fpu-internal.h	2012-11-30 20:11:38.909016648 +0100
+++ linux-3.6.9-pax/arch/x86/include/asm/fpu-internal.h	2012-12-10 00:53:24.196782810 +0100
@@ -254,7 +254,14 @@
 
 static inline int fpu_fxrstor_checking(struct fpu *fpu)
 {
-	return fxrstor_checking(&fpu->state->fxsave);
+	int ret;
+	mm_segment_t fs;
+
+	fs = get_fs();
+	set_fs(KERNEL_DS);
+	ret = fxrstor_checking(&fpu->state->fxsave);
+	set_fs(fs);
+	return ret;
 }
 
 static inline int fpu_restore_checking(struct fpu *fpu)