x86/asm/entry/64: Enable interrupts *after* we fetch PER_CPU_VAR(old_rsp)
x86/asm/entry/64: Enable interrupts *after* we fetch PER_CPU_VAR(old_rsp)

We want to use PER_CPU_VAR(old_rsp) as a simple temporary register,
to shuffle user-space RSP into (and from) when we set up the system
call stack frame. At that point we cannot shuffle values into general
purpose registers, because we have not saved them yet.

To be able to do this shuffling into a memory location, we must be
atomic and must not be preempted while we do the shuffling, otherwise
the 'temporary' register gets overwritten by some other task's
temporary register contents ...

Tested-by: Borislav Petkov <0691a664b24b6f15b20cd5aee64b72271db08be1@alien8.de>
Signed-off-by: Denys Vlasenko <50fbbd36fe0f9c8261d4a3c762c8c29ffb35e48f@redhat.com>
Acked-by: Borislav Petkov <0691a664b24b6f15b20cd5aee64b72271db08be1@alien8.de>
Cc: Alexei Starovoitov <c24c0248770ae98831f8a654310d4c2e07514c61@plumgrid.com>
Cc: Andy Lutomirski <2cc0d0d76de2e6f37b92deeb83c85cb306fc5dc1@amacapital.net>
Cc: Frederic Weisbecker <e8a1bf9163cb25e93cfd6540f223b3872ea7ee55@gmail.com>
Cc: H. Peter Anvin <8a453bad9912ffe59bc0f0b8abe03df9be19379e@zytor.com>
Cc: Kees Cook <50cb10d2be062154b17ab4d66a4eab34f1cf1c84@chromium.org>
Cc: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>
Cc: Oleg Nesterov <20b70f0af00562e63758b9ee42012ecc96c58590@redhat.com>
Cc: Steven Rostedt <43232e92d70cc7aa53504ad0397085ee47bad87f@goodmis.org>
Cc: Will Drewry <72416dde44ea762d19e3a7a555e3b59ce98f8eea@chromium.org>
Link: http://lkml.kernel.org/r/1426600344-8254-1-git-send-email-50fbbd36fe0f9c8261d4a3c762c8c29ffb35e48f@redhat.com
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@kernel.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs