/[pkg-src]/trunk/kernel26-xen/patches-2.6.25-r1/1093-2.6.25-xen-Use-__KERNEL_DS-as-SS-when-returning-to-a-kernel-thr.patch |
Contents of /trunk/kernel26-xen/patches-2.6.25-r1/1093-2.6.25-xen-Use-__KERNEL_DS-as-SS-when-returning-to-a-kernel-thr.patch
Parent Directory | Revision Log
Revision 606 -
(show annotations)
(download)
Thu May 22 23:13:13 2008 UTC (15 years, 11 months ago) by niro
File size: 1194 byte(s)
Thu May 22 23:13:13 2008 UTC (15 years, 11 months ago) by niro
File size: 1194 byte(s)
-ver bump to 2.6.25-magellan-r1: - linux-2.6.25.4 - fbcondecor-0.9.4 - squashfs-3.3 - unionfs-2.3.3 - tuxonice-3.0-rc7 - linux-phc-0.3.0 - acpi-dstd-0.9a - reiser4 - xen-3.2.0 . ipw3945-1.2.2
1 | From 480c680899ff2e22897fc8fea1c7ca9c53315649 Mon Sep 17 00:00:00 2001 |
2 | From: Eduardo Habkost <ehabkost@redhat.com> |
3 | Date: Fri, 4 Jan 2008 11:35:15 -0200 |
4 | Subject: [PATCH] Use __KERNEL_DS as SS when returning to a kernel thread (VERIFY) |
5 | |
6 | This is needed when the kernel is running on RING3, such as under Xen. |
7 | x86_64 has a weird feature that makes it #GP on iret when SS is a null |
8 | descriptor. |
9 | |
10 | This need to be tested on bare metal to make sure it doesn't cause any |
11 | problems. AMD specs say SS is always ignored (except on iret?). |
12 | |
13 | Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> |
14 | --- |
15 | arch/x86/kernel/entry_64.S | 3 ++- |
16 | 1 files changed, 2 insertions(+), 1 deletions(-) |
17 | |
18 | diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S |
19 | index db76caa..9f31c00 100644 |
20 | --- a/arch/x86/kernel/entry_64.S |
21 | +++ b/arch/x86/kernel/entry_64.S |
22 | @@ -104,7 +104,8 @@ ENTRY(native_irq_enable_syscall_ret) |
23 | .macro FAKE_STACK_FRAME child_rip |
24 | /* push in order ss, rsp, eflags, cs, rip */ |
25 | xorl %eax, %eax |
26 | - pushq %rax /* ss */ |
27 | + /*FIXME: check if this causes problems on bare metal */ |
28 | + pushq $__KERNEL_DS /* ss */ |
29 | CFI_ADJUST_CFA_OFFSET 8 |
30 | /*CFI_REL_OFFSET ss,0*/ |
31 | pushq %rax /* rsp */ |
32 | -- |
33 | 1.5.4.1 |
34 |