summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot
diff options
context:
space:
mode:
authorLans Zhang2013-03-01 02:20:39 +0100
committerH. Peter Anvin2013-03-01 19:18:33 +0100
commit2dead15fb8f6522b96c913603b5ad0b5c7d01f49 (patch)
treeeaefab90bf50b16bf8c6a62d7168d48c7a9a3130 /arch/x86/boot
parentMerge tag 'writeback-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff)
downloadkernel-qcow2-linux-2dead15fb8f6522b96c913603b5ad0b5c7d01f49.tar.gz
kernel-qcow2-linux-2dead15fb8f6522b96c913603b5ad0b5c7d01f49.tar.xz
kernel-qcow2-linux-2dead15fb8f6522b96c913603b5ad0b5c7d01f49.zip
x86_64: Use __BOOT_DS instead_of __KERNEL_DS for safety
In startup_32, the running code still uses the initial GDT located in setup. Thus, __BOOT_DS is preferred. Currently __KERNEL_DS is lucky to equal to __BOOT_DS, but this is not always a safe way. Signed-off-by: Lans Zhang <lans.zhang2008@gmail.com> Link: http://lkml.kernel.org/r/51300267.6000008@gmail.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/boot')
-rw-r--r--arch/x86/boot/compressed/head_64.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index c1d383d1fb7e..16f24e6dad79 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -52,7 +52,7 @@ ENTRY(startup_32)
jnz 1f
cli
- movl $(__KERNEL_DS), %eax
+ movl $(__BOOT_DS), %eax
movl %eax, %ds
movl %eax, %es
movl %eax, %ss