From: Denys Vlasenko <dvlasenk@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
Andy Lutomirski <luto@amacapital.net>,
Oleg Nesterov <oleg@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Alexei Starovoitov <ast@plumgrid.com>,
Will Drewry <wad@chromium.org>, Kees Cook <keescook@chromium.org>,
the arch/x86 maintainers <x86@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/asm/entry/64: Use shorter MOVs from segmers registers
Date: Thu, 14 May 2015 19:41:42 +0200 [thread overview]
Message-ID: <5554DE56.5030202@redhat.com> (raw)
In-Reply-To: <CA+55aFwe4ODQo=VzM+hbM+NJamF7MvMhFAvfUiyTdBFtA5yzLg@mail.gmail.com>
On 05/14/2015 07:08 PM, Linus Torvalds wrote:
> On Thu, May 14, 2015 at 10:05 AM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>>
>> I don't object to the patch, but did we actually confirm that it
>> always overwrites all of %ecx?
>
> Just to clarify: I don't object to the patch because the code doesn't
> actually end up *depending* on the high bits anyway, and does
> word-sized compares etc. And the instruction size and speed things I
> don't doubt. So it's just the commit message I wanted to check wrt
> that whole "always overwrites all of %ecx". Because older CPU's didn't
> necessarily (things like partial register writes are much less of an
> issue when you're in-order and stupid ;)
This is 64-bit code, and all 64-bit CPUs zero-extend moves from
segment registers. As you said, in this particular code it wouldn't
matter anyway since subsequent code doesn't care about high bits of %ecx...
next prev parent reply other threads:[~2015-05-14 17:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-14 16:55 [PATCH] x86/asm/entry/64: Use shorter MOVs from segmers registers Denys Vlasenko
2015-05-14 17:05 ` Linus Torvalds
2015-05-14 17:08 ` Linus Torvalds
2015-05-14 17:41 ` Denys Vlasenko [this message]
2015-05-14 17:46 ` Ingo Molnar
2015-05-15 18:17 ` Thiago Farina
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=5554DE56.5030202@redhat.com \
--to=dvlasenk@redhat.com \
--cc=ast@plumgrid.com \
--cc=bp@alien8.de \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
--cc=wad@chromium.org \
--cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.