x86/entry/64: Move SWAPGS into the common IRET-to-usermode path
authorAndy Lutomirski <luto@kernel.org>
Thu, 2 Nov 2017 07:59:00 +0000 (00:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Dec 2017 13:26:17 +0000 (14:26 +0100)
commit7d4bb32bc6fded10ff2874ae1d6d655b5511829c
tree045396a778864488d8cf811c97f7ddd6f43a9e53
parent65236abc42b068506720f4a5168e5e63636138dd
x86/entry/64: Move SWAPGS into the common IRET-to-usermode path

commit 8a055d7f411d41755ce30db5bb65b154777c4b78 upstream.

All of the code paths that ended up doing IRET to usermode did
SWAPGS immediately beforehand.  Move the SWAPGS into the common
code.

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/27fd6f45b7cd640de38fb9066fd0349bcd11f8e1.1509609304.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/entry/entry_64.S
arch/x86/entry/entry_64_compat.S