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]
Date:	Wed, 31 Aug 2011 10:22:40 +0100
From:	Ian Campbell <ian.campbell@...rix.com>
To:	linux-kernel@...r.kernel.org
CC:	Cyrill Gorcunov <gorcunov@...il.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Pekka Enberg <penberg@...nel.org>,
	Andi Kleen <ak@...ux.intel.com>,
	Ian Campbell <ian.campbell@...rix.com>, x86@...nel.org
Subject: [PATCH 2/2] x86: make 32 bit ret_from_fork a little more similar to 64 bit

The 64 bit version resets EFLAGS before calling schedule_tail() and
therefore leaves EFLAGS.IF clear. 32 bit resets EFLAGS after calling
schedule_tail() and therefore leaves EFLAGS.IF set.

Since the 64 bit version seems more obviously correct (although I think both
are actually right) make the 32 bit version look like that.

Signed-off-by: Ian Campbell <ian.campbell@...rix.com>
Cc: Pekka Enberg <penberg@...nel.org>
Cc: Cyrill Gorcunov <gorcunov@...il.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: x86@...nel.org
---
 arch/x86/kernel/entry_32.S |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index f3f6f53..8b8794b 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -300,12 +300,12 @@
 
 ENTRY(ret_from_fork)
 	CFI_STARTPROC
+	pushl_cfi $0x0002		# Reset kernel eflags
+	popfl_cfi
 	pushl_cfi %eax
 	call schedule_tail
 	GET_THREAD_INFO(%ebp)
 	popl_cfi %eax
-	pushl_cfi $0x0202		# Reset kernel eflags
-	popfl_cfi
 	jmp syscall_exit
 	CFI_ENDPROC
 END(ret_from_fork)
-- 
1.7.2.5

--
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