--- linux-2.6.11-rc1/arch/alpha/kernel/ptrace.c 2004-12-25 01:54:42 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/alpha/kernel/ptrace.c 2005-01-15 11:27:51 +0100 @@ -288,6 +288,8 @@ do_sys_ptrace(long request, long pid, lo read_unlock(&tasklist_lock); if (!child) goto out_notsk; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out; if (request == PTRACE_ATTACH) { ret = ptrace_attach(child); --- linux-2.6.11-rc1/arch/arm/kernel/ptrace.c 2004-12-25 01:54:42 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/arm/kernel/ptrace.c 2005-01-15 11:27:51 +0100 @@ -754,6 +754,8 @@ asmlinkage int sys_ptrace(long request, read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; ret = -EPERM; if (pid == 1) /* you may not mess with init */ --- linux-2.6.11-rc1/arch/arm26/kernel/ptrace.c 2004-12-25 01:54:43 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/arm26/kernel/ptrace.c 2005-01-15 11:27:51 +0100 @@ -691,6 +691,8 @@ asmlinkage int sys_ptrace(long request, read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; ret = -EPERM; if (pid == 1) /* you may not mess with init */ --- linux-2.6.11-rc1/arch/h8300/kernel/ptrace.c 2004-12-25 01:54:43 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/h8300/kernel/ptrace.c 2005-01-15 11:27:51 +0100 @@ -80,6 +80,8 @@ asmlinkage int sys_ptrace(long request, read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; ret = -EPERM; if (pid == 1) /* you may not mess with init */ --- linux-2.6.11-rc1/arch/i386/kernel/ptrace.c 2005-01-14 12:35:31 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/i386/kernel/ptrace.c 2005-01-15 11:27:51 +0100 @@ -379,6 +379,8 @@ asmlinkage int sys_ptrace(long request, read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; ret = -EPERM; if (pid == 1) /* you may not mess with init */ --- linux-2.6.11-rc1/arch/ia64/kernel/ptrace.c 2004-12-25 01:54:44 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/ia64/kernel/ptrace.c 2005-01-15 11:27:52 +0100 @@ -1326,6 +1326,9 @@ sys_ptrace (long request, pid_t pid, uns read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; + ret = -EPERM; if (pid == 1) /* no messing around with init! */ goto out_tsk; --- linux-2.6.11-rc1/arch/m68k/kernel/ptrace.c 2004-12-25 01:54:45 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/m68k/kernel/ptrace.c 2005-01-15 11:27:52 +0100 @@ -140,6 +140,8 @@ asmlinkage int sys_ptrace(long request, read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; ret = -EPERM; if (pid == 1) /* you may not mess with init */ --- linux-2.6.11-rc1/arch/m68knommu/kernel/ptrace.c 2004-12-25 01:54:45 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/m68knommu/kernel/ptrace.c 2005-01-15 11:27:52 +0100 @@ -124,6 +124,8 @@ asmlinkage int sys_ptrace(long request, read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; ret = -EPERM; if (pid == 1) /* you may not mess with init */ --- linux-2.6.11-rc1/arch/mips/kernel/ptrace.c 2004-12-25 01:54:46 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/mips/kernel/ptrace.c 2005-01-15 11:27:52 +0100 @@ -76,6 +76,8 @@ asmlinkage int sys_ptrace(long request, read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; ret = -EPERM; if (pid == 1) /* you may not mess with init */ --- linux-2.6.11-rc1/arch/parisc/kernel/ptrace.c 2004-12-25 01:54:47 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/parisc/kernel/ptrace.c 2005-01-15 11:27:52 +0100 @@ -110,6 +110,9 @@ long sys_ptrace(long request, pid_t pid, read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; + ret = -EPERM; if (pid == 1) /* no messing around with init! */ goto out_tsk; --- linux-2.6.11-rc1/arch/ppc/kernel/ptrace.c 2004-12-25 01:54:48 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/ppc/kernel/ptrace.c 2005-01-15 11:27:52 +0100 @@ -262,6 +262,8 @@ int sys_ptrace(long request, long pid, l read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; ret = -EPERM; if (pid == 1) /* you may not mess with init */ --- linux-2.6.11-rc1/arch/ppc64/kernel/ptrace.c 2004-12-25 01:54:49 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/ppc64/kernel/ptrace.c 2005-01-15 11:27:52 +0100 @@ -76,6 +76,8 @@ int sys_ptrace(long request, long pid, l read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; ret = -EPERM; if (pid == 1) /* you may not mess with init */ --- linux-2.6.11-rc1/arch/s390/kernel/ptrace.c 2005-01-14 12:35:42 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/s390/kernel/ptrace.c 2005-01-15 11:27:52 +0100 @@ -698,9 +698,11 @@ sys_ptrace(long request, long pid, long read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; ret = do_ptrace(child, request, addr, data); - +out_tsk: put_task_struct(child); out: unlock_kernel(); --- linux-2.6.11-rc1/arch/sh/kernel/ptrace.c 2004-12-25 01:54:49 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/sh/kernel/ptrace.c 2005-01-15 11:27:52 +0100 @@ -108,6 +108,8 @@ asmlinkage int sys_ptrace(long request, read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; ret = -EPERM; if (pid == 1) /* you may not mess with init */ --- linux-2.6.11-rc1/arch/sparc/kernel/ptrace.c 2004-12-25 01:54:50 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/sparc/kernel/ptrace.c 2005-01-15 11:27:52 +0100 @@ -321,6 +321,10 @@ asmlinkage void do_ptrace(struct pt_regs pt_error_return(regs, ESRCH); goto out; } + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) { + pt_error_return(regs, ESRCH); + goto out_tsk; + } if ((current->personality == PER_SUNOS && request == PTRACE_SUNATTACH) || (current->personality != PER_SUNOS && request == PTRACE_ATTACH)) { --- linux-2.6.11-rc1/arch/sparc64/kernel/ptrace.c 2004-12-25 01:54:50 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/sparc64/kernel/ptrace.c 2005-01-15 11:27:52 +0100 @@ -172,6 +172,10 @@ asmlinkage void do_ptrace(struct pt_regs pt_error_return(regs, ESRCH); goto out; } + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) { + pt_error_return(regs, ESRCH); + goto out_tsk; + } if ((current->personality == PER_SUNOS && request == PTRACE_SUNATTACH) || (current->personality != PER_SUNOS && request == PTRACE_ATTACH)) { --- linux-2.6.11-rc1/arch/um/kernel/ptrace.c 2005-01-14 12:35:43 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/um/kernel/ptrace.c 2005-01-15 11:27:52 +0100 @@ -56,6 +56,8 @@ long sys_ptrace(long request, long pid, read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; ret = -EPERM; if (pid == 1) /* you may not mess with init */ --- linux-2.6.11-rc1/arch/v850/kernel/ptrace.c 2004-12-25 01:54:50 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/v850/kernel/ptrace.c 2005-01-15 11:27:52 +0100 @@ -138,6 +138,8 @@ int sys_ptrace(long request, long pid, l read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; rval = -EPERM; if (pid == 1) /* you may not mess with init */ --- linux-2.6.11-rc1/arch/x86_64/kernel/ptrace.c 2004-12-25 01:54:50 +0100 +++ linux-2.6.11-rc1-vs1.9.4-rc2/arch/x86_64/kernel/ptrace.c 2005-01-15 11:27:52 +0100 @@ -209,6 +209,8 @@ asmlinkage long sys_ptrace(long request, read_unlock(&tasklist_lock); if (!child) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; ret = -EPERM; if (pid == 1) /* you may not mess with init */