From: tip-bot for Cyrill Gorcunov <gorcunov@openvz.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
gorcunov@openvz.org, brgerst@gmail.com, ian.campbell@citrix.com,
lists@nerdbynature.de, Jeremy.Fitzhardinge@citrix.com,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:x86/urgent] x86: kernel_thread() -- initialize SS to a known state
Date: Wed, 13 Jan 2010 16:39:35 GMT [thread overview]
Message-ID: <tip-864a0922dd128392467611d9857e5138c6a91999@git.kernel.org> (raw)
In-Reply-To: <1263377768-19600-1-git-send-email-ian.campbell@citrix.com>
Commit-ID: 864a0922dd128392467611d9857e5138c6a91999
Gitweb: http://git.kernel.org/tip/864a0922dd128392467611d9857e5138c6a91999
Author: Cyrill Gorcunov <gorcunov@openvz.org>
AuthorDate: Wed, 13 Jan 2010 10:16:07 +0000
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 13 Jan 2010 11:23:45 +0100
x86: kernel_thread() -- initialize SS to a known state
Before the kernel_thread was converted into "C" we had
pt_regs::ss set to __KERNEL_DS (by SAVE_ALL asm macro).
Though I must admit I didn't find any *explicit* load of
%ss from this structure the better to be on a safe side
and set it to a known value.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Christian Kujau <lists@nerdbynature.de>
Cc: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>
Cc: Brian Gerst <brgerst@gmail.com>
LKML-Reference: <1263377768-19600-1-git-send-email-ian.campbell@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/process.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index c6ee241..02c3ee0 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -288,6 +288,8 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
regs.es = __USER_DS;
regs.fs = __KERNEL_PERCPU;
regs.gs = __KERNEL_STACK_CANARY;
+#else
+ regs.ss = __KERNEL_DS;
#endif
regs.orig_ax = -1;
next prev parent reply other threads:[~2010-01-13 16:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-13 10:15 [GIT PULL] update paravirt after f443ff42 "x86: Sync 32/64-bit kernel_thread" and related Ian Campbell
2010-01-13 10:16 ` [PATCH] x86: kernel_thread -- initialize SS to a known state Ian Campbell
2010-01-13 16:39 ` tip-bot for Cyrill Gorcunov [this message]
2010-01-13 10:16 ` [PATCH] xen: 64 bit kernel RPL should be 0 Ian Campbell
2010-01-13 16:39 ` [tip:x86/urgent] x86: xen: 64-bit " tip-bot for 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=tip-864a0922dd128392467611d9857e5138c6a91999@git.kernel.org \
--to=gorcunov@openvz.org \
--cc=Jeremy.Fitzhardinge@citrix.com \
--cc=brgerst@gmail.com \
--cc=hpa@zytor.com \
--cc=ian.campbell@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=lists@nerdbynature.de \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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
Powered by JetHome