提交 e7d6eefa 编写于 作者: D Denys Vlasenko 提交者: Ingo Molnar

x86/vdso32/syscall.S: Do not load __USER32_DS to %ss

This vDSO code only gets used by 64-bit kernels, not 32-bit ones.

On 64-bit kernels, the data segment is the same for 32-bit and
64-bit userspace, and the SYSRET instruction loads %ss with its
selector.

So there's no need to repeat it by hand. Segment loads are somewhat
expensive: tens of cycles.
Signed-off-by: NDenys Vlasenko <dvlasenk@redhat.com>
[ Removed unnecessary comment. ]
Signed-off-by: NAndy Lutomirski <luto@kernel.org>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Andy Lutomirski <luto@amacapital.net>
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: Will Drewry <wad@chromium.org>
Link: http://lkml.kernel.org/r/63da6d778f69fd0f1345d9287f6764d58be519fa.1427482099.git.luto@kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
上级 0a4f59d6
...@@ -19,8 +19,6 @@ __kernel_vsyscall: ...@@ -19,8 +19,6 @@ __kernel_vsyscall:
.Lpush_ebp: .Lpush_ebp:
movl %ecx, %ebp movl %ecx, %ebp
syscall syscall
movl $__USER32_DS, %ecx
movl %ecx, %ss
movl %ebp, %ecx movl %ebp, %ecx
popl %ebp popl %ebp
.Lpop_ebp: .Lpop_ebp:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册