public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Denys Vlasenko <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: oleg@redhat.com, mingo@kernel.org, hpa@zytor.com,
	rostedt@goodmis.org, torvalds@linux-foundation.org,
	luto@kernel.org, bp@alien8.de, luto@amacapital.net,
	dvlasenk@redhat.com, tglx@linutronix.de, keescook@chromium.org,
	ast@plumgrid.com, wad@chromium.org, fweisbec@gmail.com,
	linux-kernel@vger.kernel.org
Subject: [tip:x86/vdso] x86/vdso32/syscall.S: Do not load __USER32_DS to %ss
Date: Tue, 31 Mar 2015 05:38:29 -0700	[thread overview]
Message-ID: <tip-e7d6eefaaa443130079d73cd05039d90b3db7a4a@git.kernel.org> (raw)
In-Reply-To: <63da6d778f69fd0f1345d9287f6764d58be519fa.1427482099.git.luto@kernel.org>

Commit-ID:  e7d6eefaaa443130079d73cd05039d90b3db7a4a
Gitweb:     http://git.kernel.org/tip/e7d6eefaaa443130079d73cd05039d90b3db7a4a
Author:     Denys Vlasenko <dvlasenk@redhat.com>
AuthorDate: Fri, 27 Mar 2015 11:48:17 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 31 Mar 2015 10:45:15 +0200

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>
---
 arch/x86/vdso/vdso32/syscall.S | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/vdso/vdso32/syscall.S b/arch/x86/vdso/vdso32/syscall.S
index 5415b56..6b286bb 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:

  reply	other threads:[~2015-03-31 12:39 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26  1:11 [GIT PULL] x86/vdso changes for 4.1 Andy Lutomirski
     [not found] ` <efe1ec29eda830b1d0030882706f3dac99ce1f73.1427482063.git.luto@kernel.org>
2015-03-27 18:47   ` [GIT PULL 2/4] x86: vdso32/syscall.S: do not load __USER32_DS to %ss Andy Lutomirski
2015-03-27 18:48 ` [GIT PULL 1/4] x86,vdso: fix the x86 vdso2c tool includes Andy Lutomirski
2015-03-27 18:48   ` [GIT PULL 2/4] x86: vdso32/syscall.S: do not load __USER32_DS to %ss Andy Lutomirski
2015-03-31 12:38     ` tip-bot for Denys Vlasenko [this message]
2015-04-23  7:37       ` [tip:x86/vdso] x86/vdso32/syscall.S: Do " Brian Gerst
2015-04-23  8:49         ` Andy Lutomirski
2015-04-23  9:07           ` Andy Lutomirski
2015-04-23  9:23           ` Denys Vlasenko
2015-04-23  9:47           ` Borislav Petkov
2015-04-23  9:56           ` Denys Vlasenko
2015-04-23 10:18             ` Borislav Petkov
2015-04-23 10:26               ` Denys Vlasenko
2015-04-23 10:44                 ` Borislav Petkov
2015-04-23 11:05                   ` Denys Vlasenko
2015-04-23 15:48                   ` Andy Lutomirski
2015-04-23 16:41                     ` Denys Vlasenko
2015-04-23 16:50                       ` Andy Lutomirski
2015-04-23 17:14                         ` Borislav Petkov
2015-04-23 18:24                           ` Andy Lutomirski
2015-04-23 18:36                             ` Linus Torvalds
2015-04-23 18:52                             ` Borislav Petkov
2015-04-23 19:20                               ` Andy Lutomirski
2015-04-23 19:50                               ` Denys Vlasenko
2015-04-23  9:20         ` Denys Vlasenko
2015-04-23  9:56           ` Borislav Petkov
2015-04-23 11:11             ` Brian Gerst
2015-04-23 11:28           ` Brian Gerst
2015-04-23 11:46             ` Denys Vlasenko
2015-04-23 12:01               ` Brian Gerst
2015-04-23 12:35                 ` Denys Vlasenko
2015-04-23 11:12         ` Denys Vlasenko
2015-03-27 18:48   ` [GIT PULL 3/4] x86, vdso: teach 'make clean' remove generated vdso-image-*.c files Andy Lutomirski
2015-03-31 12:38     ` [tip:x86/vdso] x86/vdso: Teach 'make clean' to " tip-bot for Andrey Skvortsov
2015-03-27 18:48   ` [GIT PULL 4/4] x86, vdso: Remove x32 intermediates during 'make clean' Andy Lutomirski
2015-03-31 12:39     ` [tip:x86/vdso] x86/vdso: Remove x32 intermediates during ' make clean' tip-bot for Andy Lutomirski
2015-03-31 12:38   ` [tip:x86/vdso] x86/vdso: Fix the x86 vdso2c tool includes tip-bot for Tommi Kyntola
  -- strict thread matches above, loose matches on Subject: below --
2015-02-16 14:15 [PATCH] x86,vdso: fix " Tommi Kyntola
2015-02-16 16:29 ` Andy Lutomirski
     [not found]   ` <CAO2cUkRstHcKzy+sMvaQoXHBjTX1yheN2EMQW-wCd0tDRCLNYQ@mail.gmail.com>
2015-02-16 20:40     ` Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-e7d6eefaaa443130079d73cd05039d90b3db7a4a@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=ast@plumgrid.com \
    --cc=bp@alien8.de \
    --cc=dvlasenk@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=wad@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox