From: Denys Vlasenko Date: Tue, 17 Mar 2015 13:52:24 +0000 (+0100) Subject: x86/asm/entry/64: Enable interrupts *after* we fetch PER_CPU_VAR(old_rsp) X-Git-Tag: omap-for-v4.1/fixes-rc1~195^2~81 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33db1fd48ac3d90385b412b41a8a6525096ac6d5;p=pandora-kernel.git 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 Signed-off-by: Denys Vlasenko Acked-by: Borislav Petkov Cc: Alexei Starovoitov Cc: Andy Lutomirski Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Steven Rostedt Cc: Will Drewry Link: http://lkml.kernel.org/r/1426600344-8254-1-git-send-email-dvlasenk@redhat.com Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed