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] [day] [month] [year] [list]
Message-ID: <871u1bxgqt.fsf@tassilo.jf.intel.com>
Date:	Tue, 17 Dec 2013 14:19:38 -0800
From:	Andi Kleen <andi@...stfloor.org>
To:	Dmitry Mikushin <dmitry@...nelgen.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: ia32 emulation on Pentium I

Dmitry Mikushin <dmitry@...nelgen.org> writes:
>
> So, it seems ia32 emulation assumes Pentium II+. Do you see a quick
> way to make it Pentium I -compatible?

The SYSENTER code path should be never executed, so you could either hack the
assembler to allow it, or just open code it.

Something like (totally untested):

From: Andi Kleen <ak@...ux.intel.com>

use .byte to implement SYSEXIT for k1om assembler

diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
index bba3cf8..1ad2378 100644
--- a/arch/x86/include/asm/irqflags.h
+++ b/arch/x86/include/asm/irqflags.h
@@ -130,6 +130,8 @@ static inline notrace unsigned long arch_local_irq_save(void)
 #define PARAVIRT_ADJUST_EXCEPTION_FRAME	/*  */
 
 #define INTERRUPT_RETURN	iretq
+#define SYSEXIT			.byte 0x0f,0x35
+
 #define USERGS_SYSRET64				\
 	swapgs;					\
 	sysretq;
@@ -139,7 +141,7 @@ static inline notrace unsigned long arch_local_irq_save(void)
 #define ENABLE_INTERRUPTS_SYSEXIT32		\
 	swapgs;					\
 	sti;					\
-	sysexit
+	SYSEXIT	
 
 #else
 #define INTERRUPT_RETURN		iret

-- 
ak@...ux.intel.com -- Speaking for myself only
--
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