aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2015-03-27 14:48:17 -0400
committerIngo Molnar <mingo@kernel.org>2015-03-31 04:45:15 -0400
commite7d6eefaaa443130079d73cd05039d90b3db7a4a (patch)
treea4d3bc5bb4690e7d40a26fd4c113c60e1a4bf1ce
parent0a4f59d6e09ef16fbb7d213cfa1bf472c7845fda (diff)
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: Denys Vlasenko <dvlasenk@redhat.com> [ Removed unnecessary comment. ] Signed-off-by: Andy 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.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/vdso/vdso32/syscall.S2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/vdso/vdso32/syscall.S b/arch/x86/vdso/vdso32/syscall.S
index 5415b5613d55..6b286bb5251c 100644
--- a/arch/x86/vdso/vdso32/syscall.S
+++ b/arch/x86/vdso/vdso32/syscall.S
@@ -19,8 +19,6 @@ __kernel_vsyscall:
19.Lpush_ebp: 19.Lpush_ebp:
20 movl %ecx, %ebp 20 movl %ecx, %ebp
21 syscall 21 syscall
22 movl $__USER32_DS, %ecx
23 movl %ecx, %ss
24 movl %ebp, %ecx 22 movl %ebp, %ecx
25 popl %ebp 23 popl %ebp
26.Lpop_ebp: 24.Lpop_ebp: