On Sun 2015-06-14 09:49:22, Ingo Molnar wrote:
* Linus Torvalds [off-list ref] wrote:
quoted
On Jun 13, 2015 8:56 PM, "Ingo Molnar" [off-list ref] wrote:
quoted
Ok, so something like the patch below, right?
movw $__KERNEL_DS, %ax
movw %ax, %ss
- movw %ax, %ds
- movw %ax, %es
movw %ax, %fs
movw %ax, %gs
+ movw $__KERNEL_DS, %ax
+ movw %ax, %ds
+ movw %ax, %es
.. except with less cut-and-paste bugs.
That second KERNEL should be USER.
Yeah, doh :-/ Updated patch below.
Do we want similar patch for 64-bit, too?
Signed-off-by: Pavel Machek <redacted>
diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S
index ae693b5..2ac2bc7 100644
--- a/arch/x86/kernel/acpi/wakeup_64.S
+++ b/arch/x86/kernel/acpi/wakeup_64.S
@@ -18,10 +18,12 @@ ENTRY(wakeup_long64)
cmpq %rdx, %rax
jne bogus_64_magic
- movw $__KERNEL_DS, %ax
- movw %ax, %ss
+ movw $__USER_DS, %ax
movw %ax, %ds
movw %ax, %es
+
+ movw $__KERNEL_DS, %ax
+ movw %ax, %ss
movw %ax, %fs
movw %ax, %gs
movq saved_rsp, %rsp
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html