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]
Date:	Tue, 18 Dec 2012 19:53:59 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Borislav Petkov <bp@...en8.de>, Yinghai Lu <yinghai@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Zachary Amsden <zamsden@...il.com>,
	Matt Fleming <matt.fleming@...el.com>
Subject: Re: [PATCH v6 04/27] x86, boot: Move lldt/ltr out of 64bit code section

On Sat, Dec 15, 2012 at 9:28 AM, Borislav Petkov <bp@...en8.de> wrote:
> On Thu, Dec 13, 2012 at 02:01:58PM -0800, Yinghai Lu wrote:
>> commit 08da5a2ca
>>
>>     x86_64: Early segment setup for VT
>>
>> add lldt/ltr to clean more segments.
>>
>> Those code are put in code64, and it is using gdt that is only
>> loaded from code32 path.
>>
>> That breaks booting with 64bit bootloader that does not go through
>> code32 path. It get at startup_64 directly,  and it has different
>> gdt.
>>
>> Move those lines into code32 after their gdt is loaded.
>
> Let me rewrite that commit message for ya, you tell me whether I got it
> right:
>
> "08da5a2ca479 ("x86_64: Early segment setup for VT") sets up LDT and TR
> into a valid state in order to speed up boot decompression under VT. The
> code which loads the GDT is executed in the 32-bit startup code while
> the above change in the 64-bit part.
>
> However, this breaks 64-bit bootloaders which jump straight to the
> 64-bit startup entry point and thus skip LDR and TR setup because they
> use a different GDT.
>
> Fix this by moving the LDT and TR setup to the 32-bit section."
>
> Is that correct?
yes

update to:

---
Subject: [PATCH] x86, boot: Move lldt/ltr out of 64bit code section

commit 08da5a2ca

    x86_64: Early segment setup for VT

sets up LDT and TR into a valid state in order to speed up boot
decompression under VT.

Those code are put in code64, and it is using GDT that is only
loaded from code32 path.

That breaks booting with 64bit bootloader that does not go through
code32 path and jump to startup_64 directly, and it has different
GDT.

Move those lines into code32 after their GDT is loaded.
---
--
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