summaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/ptrace.c
diff options
context:
space:
mode:
author蔡正龙 <zhenglong.cai@cs2c.com.cn>2013-12-20 03:04:10 +0100
committerMatt Turner <mattst88@gmail.com>2014-01-31 18:21:55 +0100
commita9302e8439445710552886e7b623dbcfa943a1f2 (patch)
treef81ad376d8143a745d6f3c1d775ab28f353e75ae /arch/alpha/kernel/ptrace.c
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mas... (diff)
downloadlinux-a9302e8439445710552886e7b623dbcfa943a1f2.tar.xz
linux-a9302e8439445710552886e7b623dbcfa943a1f2.zip
alpha: Enable system-call auditing support.
Signed-off-by: Zhenglong.cai <zhenglong.cai@cs2c.com.cn> Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'arch/alpha/kernel/ptrace.c')
-rw-r--r--arch/alpha/kernel/ptrace.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c
index 2a4a80ff4a20..86d835157b54 100644
--- a/arch/alpha/kernel/ptrace.c
+++ b/arch/alpha/kernel/ptrace.c
@@ -14,6 +14,7 @@
#include <linux/security.h>
#include <linux/signal.h>
#include <linux/tracehook.h>
+#include <linux/audit.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
@@ -316,15 +317,18 @@ long arch_ptrace(struct task_struct *child, long request,
asmlinkage unsigned long syscall_trace_enter(void)
{
unsigned long ret = 0;
+ struct pt_regs *regs = current_pt_regs();
if (test_thread_flag(TIF_SYSCALL_TRACE) &&
tracehook_report_syscall_entry(current_pt_regs()))
ret = -1UL;
+ audit_syscall_entry(AUDIT_ARCH_ALPHA, regs->r0, regs->r16, regs->r17, regs->r18, regs->r19);
return ret ?: current_pt_regs()->r0;
}
asmlinkage void
syscall_trace_leave(void)
{
+ audit_syscall_exit(current_pt_regs());
if (test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall_exit(current_pt_regs(), 0);
}