[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1263377768-19600-1-git-send-email-ian.campbell@citrix.com>
Date: Wed, 13 Jan 2010 10:16:07 +0000
From: Ian Campbell <ian.campbell@...rix.com>
To: x86@...nel.org, linux-kernel@...r.kernel.org
Cc: Christian Kujau <lists@...dbynature.de>,
Jeremy Fitzhardinge <Jeremy.Fitzhardinge@...rix.com>,
Cyrill Gorcunov <gorcunov@...il.com>,
"H. Peter Anvin" <hpa@...or.com>, Brian Gerst <brgerst@...il.com>,
Cyrill Gorcunov <gorcunov@...nvz.org>,
Ian Campbell <ian.campbell@...rix.com>
Subject: [PATCH] x86: kernel_thread -- initialize SS to a known state
From: Cyrill Gorcunov <gorcunov@...nvz.org>
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@...nvz.org>
Signed-off-by: Ian Campbell <ian.campbell@...rix.com>
---
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;
--
1.5.6.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