From: Denys Vlasenko Date: Fri, 27 Mar 2015 18:48:17 +0000 (-0700) Subject: x86/vdso32/syscall.S: Do not load __USER32_DS to %ss X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e7d6eefaaa44;p=linux-beck.git 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 [ Removed unnecessary comment. ] Signed-off-by: Andy Lutomirski Cc: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov 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/63da6d778f69fd0f1345d9287f6764d58be519fa.1427482099.git.luto@kernel.org Signed-off-by: Ingo Molnar --- 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: .Lpush_ebp: movl %ecx, %ebp syscall - movl $__USER32_DS, %ecx - movl %ecx, %ss movl %ebp, %ecx popl %ebp .Lpop_ebp: