projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64b028b
)
x86, 64-bit: Set data segments to null after switching to 64-bit mode
author
Brian Gerst
<
[email protected]
>
Wed, 25 Nov 2009 16:17:36 +0000
(11:17 -0500)
committer
Ingo Molnar
<
[email protected]
>
Thu, 26 Nov 2009 09:44:30 +0000
(10:44 +0100)
This prevents kernel threads from inheriting non-null segment
selectors, and causing optimizations in __switch_to() to be
ineffective.
Signed-off-by: Brian Gerst <
[email protected]
>
Cc: Tim Blechmann <
[email protected]
>
Cc: Linus Torvalds <
[email protected]
>
Cc: H. Peter Anvin <
[email protected]
>
Cc: Jeremy Fitzhardinge <
[email protected]
>
Cc: Jan Beulich <
[email protected]
>
LKML-Reference: <
1259165856
[email protected]
>
Signed-off-by: Ingo Molnar <
[email protected]
>
arch/x86/kernel/head_64.S
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/head_64.S
b/arch/x86/kernel/head_64.S
index 26406601031c9a3a3b6ee54cbf112f2599a42633..17ba9ecf27c5072aeece45e3f34ba3e0c7cc1afc 100644
(file)
--- a/
arch/x86/kernel/head_64.S
+++ b/
arch/x86/kernel/head_64.S
@@
-212,8
+212,8
@@
ENTRY(secondary_startup_64)
*/
lgdt early_gdt_descr(%rip)
- /* set up data segments
. actually 0 would do too
*/
-
movl $__KERNEL_DS
,%eax
+ /* set up data segments */
+
xorl %eax
,%eax
movl %eax,%ds
movl %eax,%ss
movl %eax,%es