patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / arch / mips / kernel / ptrace.c
index 7661128..db86feb 100644 (file)
@@ -305,8 +305,17 @@ out:
  * Notification of system call entry/exit
  * - triggered by current->work.syscall_trace
  */
-asmlinkage void do_syscall_trace(void)
+asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit)
 {
+       if (unlikely(current->audit_context)) {
+               if (!entryexit)
+                       audit_syscall_entry(current, regs->orig_eax,
+                                           regs->regs[4], regs->regs[5],
+                                           regs->regs[6], regs->regs[7]);
+               else
+                       audit_syscall_exit(current, regs->regs[2]);
+       }
+
        if (!test_thread_flag(TIF_SYSCALL_TRACE))
                return;
        if (!(current->ptrace & PT_PTRACED))