* [PATCH] x86/boot/compressed/64: Do not truncate gdt address
@ 2018-02-13 17:40 Kirill A. Shutemov
0 siblings, 0 replies; only message in thread
From: Kirill A. Shutemov @ 2018-02-13 17:40 UTC (permalink / raw)
To: Ingo Molnar, x86, Thomas Gleixner, H. Peter Anvin
Cc: Andrei Vagin, linux-kernel, Kirill A. Shutemov
Before going to 32-bit trampoline we need to load GDT to make sure that
we have the table with 32-bit code segment.
The load was implemented incorrectly and the table address is truncated
to 32-bit. It causes problems if gdt is above 4G.
Reported-and-tested-by: Andrei Vagin <avagin@virtuozzo.com>
Fixes: b4b56015ed1c ("x86/boot/compressed/64: Handle 5-level paging boot if kernel is above 4G")
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
arch/x86/boot/compressed/head_64.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index 70b30f2bc9e0..99a0e7993252 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -332,7 +332,7 @@ ENTRY(startup_64)
/* Make sure we have GDT with 32-bit code segment */
leaq gdt(%rip), %rax
- movl %eax, gdt64+2(%rip)
+ movq %rax, gdt64+2(%rip)
lgdt gdt64(%rip)
/*
--
2.15.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-02-13 17:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-13 17:40 [PATCH] x86/boot/compressed/64: Do not truncate gdt address Kirill A. Shutemov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®