|
@@ -42,6 +42,9 @@
|
|
#include <asm/traps.h>
|
|
#include <asm/traps.h>
|
|
#include <asm/system_misc.h>
|
|
#include <asm/system_misc.h>
|
|
|
|
|
|
|
|
+#define CREATE_TRACE_POINTS
|
|
|
|
+#include <trace/events/syscalls.h>
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* TODO: does not yet catch signals sent when the child dies.
|
|
* TODO: does not yet catch signals sent when the child dies.
|
|
* in exit.c or in signal.c.
|
|
* in exit.c or in signal.c.
|
|
@@ -1093,11 +1096,17 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
|
|
if (test_thread_flag(TIF_SYSCALL_TRACE))
|
|
if (test_thread_flag(TIF_SYSCALL_TRACE))
|
|
tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER);
|
|
tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER);
|
|
|
|
|
|
|
|
+ if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
|
|
|
|
+ trace_sys_enter(regs, regs->syscallno);
|
|
|
|
+
|
|
return regs->syscallno;
|
|
return regs->syscallno;
|
|
}
|
|
}
|
|
|
|
|
|
asmlinkage void syscall_trace_exit(struct pt_regs *regs)
|
|
asmlinkage void syscall_trace_exit(struct pt_regs *regs)
|
|
{
|
|
{
|
|
|
|
+ if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
|
|
|
|
+ trace_sys_exit(regs, regs_return_value(regs));
|
|
|
|
+
|
|
if (test_thread_flag(TIF_SYSCALL_TRACE))
|
|
if (test_thread_flag(TIF_SYSCALL_TRACE))
|
|
tracehook_report_syscall(regs, PTRACE_SYSCALL_EXIT);
|
|
tracehook_report_syscall(regs, PTRACE_SYSCALL_EXIT);
|
|
}
|
|
}
|