[S390] ftrace: add system call tracer support
System call tracer support for s390. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
committed by
Martin Schwidefsky
parent
88dbd20372
commit
9bf1226b33
@ -37,6 +37,7 @@
|
||||
#include <linux/regset.h>
|
||||
#include <linux/tracehook.h>
|
||||
#include <linux/seccomp.h>
|
||||
#include <trace/syscall.h>
|
||||
#include <asm/compat.h>
|
||||
#include <asm/segment.h>
|
||||
#include <asm/page.h>
|
||||
@ -661,6 +662,9 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
if (unlikely(test_thread_flag(TIF_SYSCALL_FTRACE)))
|
||||
ftrace_syscall_enter(regs);
|
||||
|
||||
if (unlikely(current->audit_context))
|
||||
audit_syscall_entry(is_compat_task() ?
|
||||
AUDIT_ARCH_S390 : AUDIT_ARCH_S390X,
|
||||
@ -676,6 +680,9 @@ asmlinkage void do_syscall_trace_exit(struct pt_regs *regs)
|
||||
audit_syscall_exit(AUDITSC_RESULT(regs->gprs[2]),
|
||||
regs->gprs[2]);
|
||||
|
||||
if (unlikely(test_thread_flag(TIF_SYSCALL_FTRACE)))
|
||||
ftrace_syscall_exit(regs);
|
||||
|
||||
if (test_thread_flag(TIF_SYSCALL_TRACE))
|
||||
tracehook_report_syscall_exit(regs, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user