This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / um / kernel / ptrace.c
index c68c937..5ca4ef0 100644 (file)
@@ -58,6 +58,8 @@ int sys_ptrace(long request, long pid, long addr, long data)
        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 */
@@ -302,8 +304,17 @@ int sys_ptrace(long request, long pid, long addr, long data)
        return ret;
 }
 
-void syscall_trace(void)
+void syscall_trace(union uml_pt_regs *regs, int entryexit)
 {
+       if (unlikely(current->audit_context)) {
+               if (!entryexit)
+                       audit_syscall_entry(current, regs->orig_eax,
+                                           regs->ebx, regs->ecx,
+                                           regs->edx, regs->esi);
+               else
+                       audit_syscall_exit(current, regs->eax);
+       }
+
        if (!test_thread_flag(TIF_SYSCALL_TRACE))
                return;
        if (!(current->ptrace & PT_PTRACED))
@@ -311,11 +322,8 @@ void syscall_trace(void)
 
        /* the 0x80 provides a way for the tracing parent to distinguish
           between a syscall stop and SIGTRAP delivery */
-       current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
-                                       ? 0x80 : 0);
-       current->state = TASK_STOPPED;
-       notify_parent(current, SIGCHLD);
-       schedule();
+       ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
+                                ? 0x80 : 0));
 
        /*
         * this isn't the same as continuing with a signal, but it will do