projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de1a226
)
x86_64: Use __BOOT_DS instead_of __KERNEL_DS for safety
author
Lans Zhang
<lans.zhang2008@gmail.com>
Fri, 1 Mar 2013 01:20:39 +0000
(09:20 +0800)
committer
H. Peter Anvin
<hpa@linux.intel.com>
Fri, 1 Mar 2013 18:18:33 +0000
(10:18 -0800)
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>
arch/x86/boot/compressed/head_64.S
patch
|
blob
|
history
diff --git
a/arch/x86/boot/compressed/head_64.S
b/arch/x86/boot/compressed/head_64.S
index c1d383d1fb7ed8d8bae3280698669a9caf1ce14c..16f24e6dad79826e8714a01fb5db750c1551dc6f 100644
(file)
--- 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