Skip to content

Commit e7d6eef

Browse files
dvlasenkIngo Molnar
authored andcommitted
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 <[email protected]> [ Removed unnecessary comment. ] Signed-off-by: Andy Lutomirski <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Kees Cook <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Will Drewry <[email protected]> Link: http://lkml.kernel.org/r/63da6d778f69fd0f1345d9287f6764d58be519fa.1427482099.git.luto@kernel.org Signed-off-by: Ingo Molnar <[email protected]>
1 parent 0a4f59d commit e7d6eef

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

arch/x86/vdso/vdso32/syscall.S

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ __kernel_vsyscall:
1919
.Lpush_ebp:
2020
movl %ecx, %ebp
2121
syscall
22-
movl $__USER32_DS, %ecx
23-
movl %ecx, %ss
2422
movl %ebp, %ecx
2523
popl %ebp
2624
.Lpop_ebp:

0 commit comments

Comments
 (0)