[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACnwZYeFL9Ne=89-A1MuyTrAUA_m=C35DSYStVDNxb-wzUx0-A@mail.gmail.com>
Date: Fri, 15 May 2015 15:17:45 -0300
From: Thiago Farina <tfransosi@...il.com>
To: Denys Vlasenko <dvlasenk@...hat.com>
Cc: Ingo Molnar <mingo@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...capital.net>,
Oleg Nesterov <oleg@...hat.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Alexei Starovoitov <ast@...mgrid.com>,
Will Drewry <wad@...omium.org>,
Kees Cook <keescook@...omium.org>, x86@...nel.org,
linux list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/asm/entry/64: Use shorter MOVs from segmers registers
On Thu, May 14, 2015 at 1:55 PM, Denys Vlasenko <dvlasenk@...hat.com> wrote:
> "movw %ds,%cx" insn needs a 0x66 prefix, while "movw %ds,%ecx" does not.
did you mean 'movl %ds,%ecx' here as is in your patch below?
> Signed-off-by: Denys Vlasenko <dvlasenk@...hat.com>
> CC: Linus Torvalds <torvalds@...ux-foundation.org>
> CC: Steven Rostedt <rostedt@...dmis.org>
> CC: Ingo Molnar <mingo@...nel.org>
> CC: Borislav Petkov <bp@...en8.de>
> CC: "H. Peter Anvin" <hpa@...or.com>
> CC: Andy Lutomirski <luto@...capital.net>
> CC: Oleg Nesterov <oleg@...hat.com>
> CC: Frederic Weisbecker <fweisbec@...il.com>
> CC: Alexei Starovoitov <ast@...mgrid.com>
> CC: Will Drewry <wad@...omium.org>
> CC: Kees Cook <keescook@...omium.org>
> CC: x86@...nel.org
> CC: linux-kernel@...r.kernel.org
> ---
> arch/x86/kernel/entry_64.S | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
> index 62b4c5f..ef2651d 100644
> --- a/arch/x86/kernel/entry_64.S
> +++ b/arch/x86/kernel/entry_64.S
> @@ -1195,19 +1195,19 @@ ENTRY(xen_failsafe_callback)
> /*CFI_REL_OFFSET ds,DS*/
> CFI_REL_OFFSET r11,8
> CFI_REL_OFFSET rcx,0
> - movw %ds,%cx
> + movl %ds,%ecx
> cmpw %cx,0x10(%rsp)
> CFI_REMEMBER_STATE
> jne 1f
> - movw %es,%cx
> + movl %es,%ecx
> cmpw %cx,0x18(%rsp)
> jne 1f
> - movw %fs,%cx
> + movl %fs,%ecx
> cmpw %cx,0x20(%rsp)
> jne 1f
> - movw %gs,%cx
> + movl %gs,%ecx
> cmpw %cx,0x28(%rsp)
> jne 1f
> /* All segments match their saved values => Category 2 (Bad IRET). */
> movq (%rsp),%rcx
> CFI_RESTORE rcx
> movq 8(%rsp),%r11
> --
> 1.8.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Thiago Farina
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists