]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
x86/entry/64: Remove all remaining direct thread_struct::sp0 reads
authorAndy Lutomirski <luto@kernel.org>
Thu, 2 Nov 2017 07:59:14 +0000 (00:59 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Sat, 6 Jan 2018 12:22:55 +0000 (13:22 +0100)
commitcc87284caa7d31d9d5a55c418eb5278cab6e2db1
tree68619ab72d99e718da7cff204beea4189cd1fcce
parent8c6b12e88bd87433087ea1f1cd5a9a4975e4623c
x86/entry/64: Remove all remaining direct thread_struct::sp0 reads

CVE-2017-5754

The only remaining readers in context switch code or vm86(), and
they all just want to update TSS.sp0 to match the current task.
Replace them all with a new helper update_sp0().

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
Cc: Borislav Petkov <bpetkov@suse.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/2d231687f4ff288c9d9e98d7861b7df374246ac3.1509609304.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 46f5a10a721ce8dce8cc8fe55279b49e1c6b3288)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/x86/include/asm/switch_to.h
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c
arch/x86/kernel/vm86_32.c