|
@@ -19,6 +19,7 @@
|
|
#include <linux/security.h>
|
|
#include <linux/security.h>
|
|
#include <linux/compat.h>
|
|
#include <linux/compat.h>
|
|
#include <linux/signal.h>
|
|
#include <linux/signal.h>
|
|
|
|
+#include <linux/audit.h>
|
|
|
|
|
|
#include <asm/uaccess.h>
|
|
#include <asm/uaccess.h>
|
|
#include <asm/pgtable.h>
|
|
#include <asm/pgtable.h>
|
|
@@ -267,11 +268,28 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
|
|
|
|
|
|
long do_syscall_trace_enter(struct pt_regs *regs)
|
|
long do_syscall_trace_enter(struct pt_regs *regs)
|
|
{
|
|
{
|
|
|
|
+ long ret = 0;
|
|
|
|
+
|
|
if (test_thread_flag(TIF_SYSCALL_TRACE) &&
|
|
if (test_thread_flag(TIF_SYSCALL_TRACE) &&
|
|
tracehook_report_syscall_entry(regs))
|
|
tracehook_report_syscall_entry(regs))
|
|
- return -1L;
|
|
|
|
-
|
|
|
|
- return regs->gr[20];
|
|
|
|
|
|
+ ret = -1L;
|
|
|
|
+
|
|
|
|
+#ifdef CONFIG_64BIT
|
|
|
|
+ if (!is_compat_task())
|
|
|
|
+ audit_syscall_entry(AUDIT_ARCH_PARISC64,
|
|
|
|
+ regs->gr[20],
|
|
|
|
+ regs->gr[26], regs->gr[25],
|
|
|
|
+ regs->gr[24], regs->gr[23]);
|
|
|
|
+ else
|
|
|
|
+#endif
|
|
|
|
+ audit_syscall_entry(AUDIT_ARCH_PARISC,
|
|
|
|
+ regs->gr[20] & 0xffffffff,
|
|
|
|
+ regs->gr[26] & 0xffffffff,
|
|
|
|
+ regs->gr[25] & 0xffffffff,
|
|
|
|
+ regs->gr[24] & 0xffffffff,
|
|
|
|
+ regs->gr[23] & 0xffffffff);
|
|
|
|
+
|
|
|
|
+ return ret ? : regs->gr[20];
|
|
}
|
|
}
|
|
|
|
|
|
void do_syscall_trace_exit(struct pt_regs *regs)
|
|
void do_syscall_trace_exit(struct pt_regs *regs)
|
|
@@ -279,6 +297,8 @@ void do_syscall_trace_exit(struct pt_regs *regs)
|
|
int stepping = test_thread_flag(TIF_SINGLESTEP) ||
|
|
int stepping = test_thread_flag(TIF_SINGLESTEP) ||
|
|
test_thread_flag(TIF_BLOCKSTEP);
|
|
test_thread_flag(TIF_BLOCKSTEP);
|
|
|
|
|
|
|
|
+ audit_syscall_exit(regs);
|
|
|
|
+
|
|
if (stepping || test_thread_flag(TIF_SYSCALL_TRACE))
|
|
if (stepping || test_thread_flag(TIF_SYSCALL_TRACE))
|
|
tracehook_report_syscall_exit(regs, stepping);
|
|
tracehook_report_syscall_exit(regs, stepping);
|
|
}
|
|
}
|