]> git.proxmox.com Git - pve-kernel.git/blame - patches/kernel/0103-x86-entry-32-Fix-cpu_current_top_of_stack-initializa.patch
revert buggy SCSI error handler commit
[pve-kernel.git] / patches / kernel / 0103-x86-entry-32-Fix-cpu_current_top_of_stack-initializa.patch
CommitLineData
321d628a
FG
1From 870277eb767ecec9293c5dd5ba5bf1c912251e85 Mon Sep 17 00:00:00 2001
2From: Andy Lutomirski <luto@kernel.org>
3Date: Thu, 2 Nov 2017 00:59:15 -0700
633c5ed1 4Subject: [PATCH 103/242] x86/entry/32: Fix cpu_current_top_of_stack
321d628a
FG
5 initialization at boot
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10CVE-2017-5754
11
12cpu_current_top_of_stack's initialization forgot about
13TOP_OF_KERNEL_STACK_PADDING. This bug didn't matter because the
14idle threads never enter user mode.
15
16Signed-off-by: Andy Lutomirski <luto@kernel.org>
17Reviewed-by: Borislav Petkov <bp@suse.de>
18Cc: Borislav Petkov <bpetkov@suse.de>
19Cc: Brian Gerst <brgerst@gmail.com>
20Cc: Dave Hansen <dave.hansen@intel.com>
21Cc: Linus Torvalds <torvalds@linux-foundation.org>
22Cc: Peter Zijlstra <peterz@infradead.org>
23Cc: Thomas Gleixner <tglx@linutronix.de>
24Link: http://lkml.kernel.org/r/e5e370a7e6e4fddd1c4e4cf619765d96bb874b21.1509609304.git.luto@kernel.org
25Signed-off-by: Ingo Molnar <mingo@kernel.org>
26(cherry picked from commit cd493a6deb8b78eca280d05f7fa73fd69403ae29)
27Signed-off-by: Andy Whitcroft <apw@canonical.com>
28Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
29(cherry picked from commit 258c98e7d4b8f1459772e656cd736c028a13add9)
30Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
31---
32 arch/x86/kernel/smpboot.c | 3 +--
33 1 file changed, 1 insertion(+), 2 deletions(-)
34
35diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
36index d05006f6c31c..8ea3b18cbdc1 100644
37--- a/arch/x86/kernel/smpboot.c
38+++ b/arch/x86/kernel/smpboot.c
39@@ -961,8 +961,7 @@ void common_cpu_up(unsigned int cpu, struct task_struct *idle)
40 #ifdef CONFIG_X86_32
41 /* Stack for startup_32 can be just as for start_secondary onwards */
42 irq_ctx_init(cpu);
43- per_cpu(cpu_current_top_of_stack, cpu) =
44- (unsigned long)task_stack_page(idle) + THREAD_SIZE;
45+ per_cpu(cpu_current_top_of_stack, cpu) = task_top_of_stack(idle);
46 #else
47 initial_gs = per_cpu_offset(cpu);
48 #endif
49--
502.14.2
51