aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/ptrace.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-05-05 15:43:19 -0400
committerDave Kleikamp <shaggy@austin.ibm.com>2005-05-05 15:43:19 -0400
commit6f817abc643ec84cf07c99f964d04976212e1fd3 (patch)
tree982d6e35796cf0c3c01899db1a8dc062d95c92c2 /arch/x86_64/kernel/ptrace.c
parentf77165df5ba75461b491a9f20f778307f1b4a0ac (diff)
parentbfd4bda097f8758d28e632ff2035e25577f6b060 (diff)
Merge with /home/shaggy/git/linus-clean/
Diffstat (limited to 'arch/x86_64/kernel/ptrace.c')
-rw-r--r--arch/x86_64/kernel/ptrace.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c
index c64b9c97c745..e26e86bb56fe 100644
--- a/arch/x86_64/kernel/ptrace.c
+++ b/arch/x86_64/kernel/ptrace.c
@@ -635,20 +635,29 @@ asmlinkage void syscall_trace_enter(struct pt_regs *regs)
635 /* do the secure computing check first */ 635 /* do the secure computing check first */
636 secure_computing(regs->orig_rax); 636 secure_computing(regs->orig_rax);
637 637
638 if (unlikely(current->audit_context))
639 audit_syscall_entry(current, regs->orig_rax,
640 regs->rdi, regs->rsi,
641 regs->rdx, regs->r10);
642
643 if (test_thread_flag(TIF_SYSCALL_TRACE) 638 if (test_thread_flag(TIF_SYSCALL_TRACE)
644 && (current->ptrace & PT_PTRACED)) 639 && (current->ptrace & PT_PTRACED))
645 syscall_trace(regs); 640 syscall_trace(regs);
641
642 if (unlikely(current->audit_context)) {
643 if (test_thread_flag(TIF_IA32)) {
644 audit_syscall_entry(current, AUDIT_ARCH_I386,
645 regs->orig_rax,
646 regs->rbx, regs->rcx,
647 regs->rdx, regs->rsi);
648 } else {
649 audit_syscall_entry(current, AUDIT_ARCH_X86_64,
650 regs->orig_rax,
651 regs->rdi, regs->rsi,
652 regs->rdx, regs->r10);
653 }
654 }
646} 655}
647 656
648asmlinkage void syscall_trace_leave(struct pt_regs *regs) 657asmlinkage void syscall_trace_leave(struct pt_regs *regs)
649{ 658{
650 if (unlikely(current->audit_context)) 659 if (unlikely(current->audit_context))
651 audit_syscall_exit(current, regs->rax); 660 audit_syscall_exit(current, AUDITSC_RESULT(regs->rax), regs->rax);
652 661
653 if ((test_thread_flag(TIF_SYSCALL_TRACE) 662 if ((test_thread_flag(TIF_SYSCALL_TRACE)
654 || test_thread_flag(TIF_SINGLESTEP)) 663 || test_thread_flag(TIF_SINGLESTEP))