lkml.org 
[lkml]   [2011]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] x86: make 32 bit ret_from_fork a little more similar to 64 bit
Date
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@citrix.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: x86@kernel.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


\
 
 \ /
  Last update: 2011-08-31 11:25    [W:0.025 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site