lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFx48=K9PjkDnRiHezFe6ePMhc3iVXGMk44keXoKvXaoPA@mail.gmail.com>
Date:	Tue, 31 Mar 2015 16:09:47 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Brian Gerst <brgerst@...il.com>
Cc:	Denys Vlasenko <dvlasenk@...hat.com>,
	Ingo Molnar <mingo@...nel.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>,
	"the arch/x86 maintainers" <x86@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 7/9] x86/asm/entry/32: tidy up some instructions

On Tue, Mar 31, 2015 at 3:21 PM, Brian Gerst <brgerst@...il.com> wrote:
>>
>> @@ -708,7 +708,7 @@ END(sysenter_badsys)
>>  #ifdef CONFIG_X86_ESPFIX32
>>         movl %ss, %eax
>>         /* see if on espfix stack */
>> -       cmpw $__ESPFIX_SS, %ax
>> +       cmpl $__ESPFIX_SS, %eax
>>         jne 27f
>>         movl $__KERNEL_DS, %eax
>>         movl %eax, %ds
>
> This is incorrect.  32-bit reads from a segment register are not
> zero-extended.  The upper 16 bits are implementation-defined.  Most
> processors will clear them but it's not guaranteed.

Indeed. Brian is right. That cmpw needs to stay as a 16-bit compare.

                      Linus
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ