提交 2dead15f 编写于 作者: L Lans Zhang 提交者: H. Peter Anvin

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: NLans Zhang <lans.zhang2008@gmail.com>
Link: http://lkml.kernel.org/r/51300267.6000008@gmail.comSigned-off-by: NH. Peter Anvin <hpa@linux.intel.com>
上级 de1a2262
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册