lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20061002213809.7a3f995f.rdunlap@xenotime.net>
Date:	Mon, 2 Oct 2006 21:38:09 -0700
From:	Randy Dunlap <rdunlap@...otime.net>
To:	Linus Torvalds <torvalds@...l.org>
Cc:	akpm <akpm@...l.org>, Jesper Juhl <jesper.juhl@...il.com>,
	Andi Kleen <ak@...e.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH/RFC] Math-emu kills the kernel on Athlon64 X2


OK, how about something more direct and less obtrusive, like this?

---
From: Randy Dunlap <rdunlap@...otime.net>

Honor "nofxsr" boot option during init.
Eliminates the math fault during boot.

Signed-off-by: Randy Dunlap <rdunlap@...otime.net>
---
 arch/i386/kernel/cpu/common.c |    2 +-
 arch/i386/kernel/i387.c       |    2 +-
 include/asm-i386/i387.h       |    2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

--- linux-2618-g18.orig/arch/i386/kernel/cpu/common.c
+++ linux-2618-g18/arch/i386/kernel/cpu/common.c
@@ -28,7 +28,7 @@ DEFINE_PER_CPU(unsigned char, cpu_16bit_
 EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack);
 
 static int cachesize_override __cpuinitdata = -1;
-static int disable_x86_fxsr __cpuinitdata;
+int disable_x86_fxsr __cpuinitdata;
 static int disable_x86_serial_nr __cpuinitdata = 1;
 static int disable_x86_sep __cpuinitdata;
 
--- linux-2618-g18.orig/arch/i386/kernel/i387.c
+++ linux-2618-g18/arch/i386/kernel/i387.c
@@ -30,7 +30,7 @@ void mxcsr_feature_mask_init(void)
 {
 	unsigned long mask = 0;
 	clts();
-	if (cpu_has_fxsr) {
+	if (cpu_has_fxsr && !disable_x86_fxsr) {
 		memset(&current->thread.i387.fxsave, 0, sizeof(struct i387_fxsave_struct));
 		asm volatile("fxsave %0" : : "m" (current->thread.i387.fxsave)); 
 		mask = current->thread.i387.fxsave.mxcsr_mask;
--- linux-2618-g18.orig/include/asm-i386/i387.h
+++ linux-2618-g18/include/asm-i386/i387.h
@@ -18,6 +18,8 @@
 #include <asm/sigcontext.h>
 #include <asm/user.h>
 
+extern int disable_x86_fxsr;
+
 extern void mxcsr_feature_mask_init(void);
 extern void init_fpu(struct task_struct *);
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ