diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2015-03-17 16:52:24 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-03-17 18:01:40 +0300 |
commit | 33db1fd48ac3d90385b412b41a8a6525096ac6d5 (patch) | |
tree | 4cefb59f4ec2913069f94d8a6b1398637f39752d /arch/x86/include/asm/processor.h | |
parent | 8b6c0ab1a1296ef6922160fa27018f25c60b8940 (diff) | |
download | linux-33db1fd48ac3d90385b412b41a8a6525096ac6d5.tar.xz |
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 <bp@alien8.de>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Acked-by: Borislav Petkov <bp@alien8.de>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Will Drewry <wad@chromium.org>
Link: http://lkml.kernel.org/r/1426600344-8254-1-git-send-email-dvlasenk@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/processor.h')
0 files changed, 0 insertions, 0 deletions