Commit e7d6eefa authored by Denys Vlasenko's avatar Denys Vlasenko Committed by Ingo Molnar
Browse files

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

So there's no need to repeat it by hand. Segment loads are somewhat
expensive: tens of cycles.
Signed-off-by: default avatarDenys Vlasenko <>
[ Removed unnecessary comment. ]
Signed-off-by: default avatarAndy 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 <>

Signed-off-by: default avatarIngo Molnar <>
parent 0a4f59d6
......@@ -19,8 +19,6 @@ __kernel_vsyscall:
movl %ecx, %ebp
movl $__USER32_DS, %ecx
movl %ecx, %ss
movl %ebp, %ecx
popl %ebp
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment