summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Marineau <marineam@gentoo.org>2008-02-22 23:43:19 +0000
committerMichael Marineau <marineam@gentoo.org>2008-02-22 23:43:19 +0000
commit02b964da3e6fbab007089403c9b2d9277e43a614 (patch)
tree646c40cfd2b15aabba77a674fc473b1a37101ced /trunk/2.6.21/30037_amd64-zero-extend-32bit-ptrace-xen.patch
parentFix CVE-2008-0600 for 2.6.20 (diff)
downloadxen-02b964da3e6fbab007089403c9b2d9277e43a614.tar.gz
xen-02b964da3e6fbab007089403c9b2d9277e43a614.tar.bz2
xen-02b964da3e6fbab007089403c9b2d9277e43a614.zip
Update 2.6.21 patches to the latest from fedora 8, sync up with other things from our 2.6.20 patche set
svn path=/patches/; revision=71
Diffstat (limited to 'trunk/2.6.21/30037_amd64-zero-extend-32bit-ptrace-xen.patch')
-rw-r--r--trunk/2.6.21/30037_amd64-zero-extend-32bit-ptrace-xen.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/trunk/2.6.21/30037_amd64-zero-extend-32bit-ptrace-xen.patch b/trunk/2.6.21/30037_amd64-zero-extend-32bit-ptrace-xen.patch
new file mode 100644
index 0000000..25e56d3
--- /dev/null
+++ b/trunk/2.6.21/30037_amd64-zero-extend-32bit-ptrace-xen.patch
@@ -0,0 +1,50 @@
+Adjusted to apply to Debian's 2.6.18 Xen
+
+--- linux-source-2.6.18.orig/arch/x86_64/ia32/ia32entry-xen.S 2006-09-19 21:42:06.000000000 -0600
++++ linux-source-2.6.18/arch/x86_64/ia32/ia32entry-xen.S 2007-09-25 00:10:16.089100799 -0600
+@@ -38,6 +38,18 @@
+ #define __sti sti
+ #endif
+
++ .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
++
+ .macro CFI_STARTPROC32 simple
+ CFI_STARTPROC \simple
+ CFI_UNDEFINED r8
+@@ -151,7 +163,7 @@ sysenter_tracesys:
+ 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
+@@ -253,7 +265,7 @@ cstar_tracesys:
+ 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
+@@ -330,7 +342,7 @@ ia32_tracesys:
+ 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)