summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/ptrace.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-05-05 22:39:49 +0100
committerAnton Altaparmakov <aia21@cantab.net>2005-05-05 22:39:49 +0100
commit450cbfbbbd88876e3ccec1d277f613221ca82bb7 (patch)
treeaf0f1b4c706ba7e725cd4e877a8b7ecf021d76c2 /arch/x86_64/kernel/ptrace.c
parentd53ee3222459f347cb18985a845864bc81a44eaf (diff)
parentbfd4bda097f8758d28e632ff2035e25577f6b060 (diff)
downloadtalos-op-linux-450cbfbbbd88876e3ccec1d277f613221ca82bb7.tar.gz
talos-op-linux-450cbfbbbd88876e3ccec1d277f613221ca82bb7.zip
Merge with /usr/src/ntfs-2.6.git
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)
/* do the secure computing check first */
secure_computing(regs->orig_rax);
- if (unlikely(current->audit_context))
- audit_syscall_entry(current, regs->orig_rax,
- regs->rdi, regs->rsi,
- regs->rdx, regs->r10);
-
if (test_thread_flag(TIF_SYSCALL_TRACE)
&& (current->ptrace & PT_PTRACED))
syscall_trace(regs);
+
+ if (unlikely(current->audit_context)) {
+ if (test_thread_flag(TIF_IA32)) {
+ audit_syscall_entry(current, AUDIT_ARCH_I386,
+ regs->orig_rax,
+ regs->rbx, regs->rcx,
+ regs->rdx, regs->rsi);
+ } else {
+ audit_syscall_entry(current, AUDIT_ARCH_X86_64,
+ regs->orig_rax,
+ regs->rdi, regs->rsi,
+ regs->rdx, regs->r10);
+ }
+ }
}
asmlinkage void syscall_trace_leave(struct pt_regs *regs)
{
if (unlikely(current->audit_context))
- audit_syscall_exit(current, regs->rax);
+ audit_syscall_exit(current, AUDITSC_RESULT(regs->rax), regs->rax);
if ((test_thread_flag(TIF_SYSCALL_TRACE)
|| test_thread_flag(TIF_SINGLESTEP))
OpenPOWER on IntegriCloud