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: <1312993762-22774-2-git-send-email-ian.campbell@citrix.com>
Date:	Wed, 10 Aug 2011 17:29:22 +0100
From:	Ian Campbell <ian.campbell@...rix.com>
To:	linux-kernel@...r.kernel.org
CC:	Cyrill Gorcunov <gorcunov@...il.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	"H. Peter Anvin" <hpa@...or.com>,
	Pekka Enberg <penberg@...nel.org>,
	Andi Kleen <ak@...ux.intel.com>, Ingo Molnar <mingo@...e.hu>,
	Brian Gerst <brgerst@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	"x86@...nel.org" <x86@...nel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ian Campbell <ian.campbell@...rix.com>
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 5c1a9197..c134617 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -299,12 +299,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