x86/asm/entry/64: Simplify optimistic SYSRET
authorDenys Vlasenko <dvlasenk@redhat.com>
Thu, 26 Feb 2015 22:40:38 +0000 (14:40 -0800)
committerIngo Molnar <mingo@kernel.org>
Wed, 4 Mar 2015 21:50:52 +0000 (22:50 +0100)
commitd441c1f2b73ec742c2e55be804ebc6fee130c77f
treef7e1cee1c0507c57368e582c9eacc7c26dc96467
parentb3ab90b333e94659e7c351843ab41ec0004f73e8
x86/asm/entry/64: Simplify optimistic SYSRET

Avoid redundant load of %r11 (it is already loaded a few
instructions before).

Also simplify %rsp restoration, instead of two steps:

         add $0x80, %rsp
         mov 0x18(%rsp), %rsp

we can do a simplified single step to restore user-space RSP:

         mov 0x98(%rsp), %rsp

and get the same result.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
[ Clarified the changelog. ]
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Borislav Petkov <bp@alien8.de>
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: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Drewry <wad@chromium.org>
Link: http://lkml.kernel.org/r/1aef69b346a6db0d99cdfb0f5ba83e8c985e27d7.1424989793.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/calling.h
arch/x86/kernel/entry_64.S
This page took 0.028792 seconds and 5 git commands to generate.