summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process.c
diff options
context:
space:
mode:
authorAndy Lutomirski2015-03-10 19:05:59 +0100
committerIngo Molnar2015-03-17 09:25:27 +0100
commitd9e05cc5a53246e074dc2b84956252e4bbe392cd (patch)
tree8c65d6e6cfc5587c54934c5ee633277e5d2f6e8b /arch/x86/kernel/process.c
parentx86/asm/entry: Create and use a 'TOP_OF_KERNEL_STACK_PADDING' macro (diff)
downloadkernel-qcow2-linux-d9e05cc5a53246e074dc2b84956252e4bbe392cd.tar.gz
kernel-qcow2-linux-d9e05cc5a53246e074dc2b84956252e4bbe392cd.tar.xz
kernel-qcow2-linux-d9e05cc5a53246e074dc2b84956252e4bbe392cd.zip
x86/asm/entry: Unify and fix initial thread_struct::sp0 values
x86_32 and x86_64 need slightly different thread_struct::sp0 values, and x86_32's was incorrect for init. This never mattered -- the init thread never runs user code, so we never used thread_struct::sp0 for anything. Fix it and mostly unify them. Signed-off-by: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1b810c1d2e797e27bb4a7708c426101161edd1f6.1426009661.git.luto@amacapital.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r--arch/x86/kernel/process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index f4c0af7fc3a0..12b1cf606ddf 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -39,7 +39,7 @@
*/
__visible DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, cpu_tss) = {
.x86_tss = {
- .sp0 = (unsigned long)&init_stack + sizeof(init_stack),
+ .sp0 = TOP_OF_INIT_STACK,
#ifdef CONFIG_X86_32
.ss0 = __KERNEL_DS,
.ss1 = __KERNEL_CS,