x86/boot/compressed/64: Make sure we have a 32-bit code segment
commit7beebaccd5083d61e975acb581bd528b9326e7c4
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Mon, 12 Mar 2018 10:02:43 +0000 (12 13:02 +0300)
committerIngo Molnar <mingo@kernel.org>
Mon, 12 Mar 2018 10:49:24 +0000 (12 11:49 +0100)
tree4a17c5059fa6911392237317aef8261bceb9f6f6
parenta5b162b2ecb013ed517ab5ce90079117ada743f4
x86/boot/compressed/64: Make sure we have a 32-bit code segment

When kernel starts in 64-bit mode we inherit the GDT from the bootloader.
It may cause a problem if the GDT doesn't have a 32-bit code segment
where we expect it to be.

Load our own GDT with known segments.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Borislav Petkov <bp@suse.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/20180312100246.89175-2-kirill.shutemov@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/boot/compressed/head_64.S