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)
committerIngo Molnar <mingo@kernel.org>
Thu, 2 Nov 2017 10:04:38 +0000 (11:04 +0100)
commit8a055d7f411d41755ce30db5bb65b154777c4b78
treee4ccf57a6d2d08d18c96c7a5703be93c5cea09d4
parent26c4ef9c49d8a0341f6d97ce2cfdd55d1236ed29
x86/entry/64: Move SWAPGS into the common IRET-to-usermode path

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>
arch/x86/entry/entry_64.S
arch/x86/entry/entry_64_compat.S