summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/2.6.22/20003_fix-ia32entry-xen.patch')
-rw-r--r--trunk/2.6.22/20003_fix-ia32entry-xen.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/trunk/2.6.22/20003_fix-ia32entry-xen.patch b/trunk/2.6.22/20003_fix-ia32entry-xen.patch
new file mode 100644
index 0000000..0e3cf88
--- /dev/null
+++ b/trunk/2.6.22/20003_fix-ia32entry-xen.patch
@@ -0,0 +1,49 @@
+diff -Nur custom-source-xen.orig/arch/x86_64/ia32/ia32entry-xen.S custom-source-xen/arch/x86_64/ia32/ia32entry-xen.S
+--- custom-source-xen.orig/arch/x86_64/ia32/ia32entry-xen.S 2007-10-03 00:32:28.000000000 -0400
++++ custom-source-xen/arch/x86_64/ia32/ia32entry-xen.S 2007-10-03 00:38:23.000000000 -0400
+@@ -40,6 +40,18 @@
+ movq %rax,R8(%rsp)
+ .endm
+
++ .macro LOAD_ARGS32 offset
++ movl \offset(%rsp),%r11d
++ movl \offset+8(%rsp),%r10d
++ movl \offset+16(%rsp),%r9d
++ movl \offset+24(%rsp),%r8d
++ movl \offset+40(%rsp),%ecx
++ movl \offset+48(%rsp),%edx
++ movl \offset+56(%rsp),%esi
++ movl \offset+64(%rsp),%edi
++ movl \offset+72(%rsp),%eax
++ .endm
++
+ #if defined (__XEN_X86_64)
+ #include "../kernel/xen_entry.S"
+
+@@ -172,7 +184,7 @@
+ movq $-ENOSYS,RAX(%rsp) /* really needed? */
+ movq %rsp,%rdi /* &pt_regs -> arg1 */
+ call syscall_trace_enter
+- LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
++ LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
+ RESTORE_REST
+ movl %ebp, %ebp
+ /* no need to do an access_ok check here because rbp has been
+@@ -277,7 +289,7 @@
+ movq $-ENOSYS,RAX(%rsp) /* really needed? */
+ movq %rsp,%rdi /* &pt_regs -> arg1 */
+ call syscall_trace_enter
+- LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
++ LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
+ RESTORE_REST
+ movl RSP-ARGOFFSET(%rsp), %r8d
+ /* no need to do an access_ok check here because r8 has been
+@@ -360,7 +372,7 @@
+ movq $-ENOSYS,RAX(%rsp) /* really needed? */
+ movq %rsp,%rdi /* &pt_regs -> arg1 */
+ call syscall_trace_enter
+- LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
++ LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
+ RESTORE_REST
+ jmp ia32_do_syscall
+ END(ia32_syscall)