From: Lionel Sambuc Date: Fri, 31 Oct 2014 21:40:23 +0000 (+0100) Subject: Fix iopl flag when sysenter/exit are used X-Git-Url: http://zhaoyanbai.com/repos/man.dnssec-importkey.html?a=commitdiff_plain;h=9393439a2026e4f08e99a30854a71517c1e57b79;p=minix.git Fix iopl flag when sysenter/exit are used Change-Id: If8c12f987c3adb8f329ae163da6b2f1cb8cc772f --- diff --git a/minix/kernel/arch/i386/mpx.S b/minix/kernel/arch/i386/mpx.S index 4617bfdc2..81fb696a3 100644 --- a/minix/kernel/arch/i386/mpx.S +++ b/minix/kernel/arch/i386/mpx.S @@ -402,7 +402,12 @@ ENTRY(restore_user_context_sysenter) mov SPREG(%ebp), %ecx /* sysexit restores ESP using ECX */ mov AXREG(%ebp), %eax /* trap return value */ mov BXREG(%ebp), %ebx /* secondary return value */ - movl PSWREG(%ebp), %edi /* load desired PSW to EDI */ + + /* restore PSW */ + movl PSWREG(%ebp), %edi /* load desired PSW to EDI */ + push %edi + popf + sti /* enable interrupts */ sysexit /* jump to EIP in user */