]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
x86/entry/64: Simplify reg restore code in the standard IRET paths
authorAndy Lutomirski <luto@kernel.org>
Thu, 2 Nov 2017 07:59:01 +0000 (00:59 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Sat, 6 Jan 2018 12:22:49 +0000 (13:22 +0100)
commitf926575cd370de4052e89477582b349af5664a56
treeb3cfe77825e51bc7d5c880ac2d7ee063e3695e05
parent62a85594f9be3baeb2495089f1c2980bc497d03b
x86/entry/64: Simplify reg restore code in the standard IRET paths

CVE-2017-5754

The old code restored all the registers with movq instead of pop.

In theory, this was done because some CPUs have higher movq
throughput, but any gain there would be tiny and is almost certainly
outweighed by the higher text size.

This saves 96 bytes of text.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
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/ad82520a207ccd851b04ba613f4f752b33ac05f7.1509609304.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit e872045bfd9c465a8555bab4b8567d56a4d2d3bb)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/x86/entry/calling.h
arch/x86/entry/entry_64.S