Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2dead15f authored by Lans Zhang's avatar Lans Zhang Committed by H. Peter Anvin
Browse files

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: default avatarLans Zhang <lans.zhang2008@gmail.com>
Link: http://lkml.kernel.org/r/51300267.6000008@gmail.com


Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent de1a2262
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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