From: Ian Campbell <ian.campbell@citrix.com>
To: linux-kernel@vger.kernel.org
Cc: Cyrill Gorcunov <gorcunov@gmail.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Pekka Enberg <penberg@kernel.org>,
Andi Kleen <ak@linux.intel.com>,
Ian Campbell <ian.campbell@citrix.com>,
x86@kernel.org
Subject: [PATCH 2/2] x86: make 32 bit ret_from_fork a little more similar to 64 bit
Date: Wed, 31 Aug 2011 10:22:40 +0100 [thread overview]
Message-ID: <1314782560-19146-2-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1314782541.28989.37.camel@zakaz.uk.xensource.com>
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
next prev parent reply other threads:[~2011-08-31 9:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 9:22 [PATCH 0/2] minor cleanups to EFLAGS initialisation in ret_from_fork Ian Campbell
2011-08-31 9:22 ` [PATCH 1/2] x86: drop unnecessary kernel_eflags variable from 64 bit Ian Campbell
2011-08-31 9:22 ` Ian Campbell [this message]
2011-08-31 9:31 ` [PATCH 0/2] minor cleanups to EFLAGS initialisation in ret_from_fork Cyrill Gorcunov
-- strict thread matches above, loose matches on Subject: below --
2011-08-10 16:29 [PATCH 0/2 v2] " Ian Campbell
2011-08-10 16:29 ` [PATCH 2/2] x86: make 32 bit ret_from_fork a little more similar to 64 bit Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314782560-19146-2-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=a.p.zijlstra@chello.nl \
--cc=ak@linux.intel.com \
--cc=gorcunov@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®