blob: b8eac9efb6fdd7e24b207b81cdc0687c728b5296 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// SPDX-License-Identifier: GPL-2.0
#include <linux/audit.h>
#include <linux/entry-common.h>
#define CREATE_TRACE_POINTS
#include <trace/events/syscalls.h>
/* Out of line to prevent tracepoint code duplication */
void trace_syscall_enter(struct pt_regs *regs)
{
trace_sys_enter(regs, syscall_get_nr(current, regs));
}
void trace_syscall_exit(struct pt_regs *regs, long ret)
{
trace_sys_exit(regs, ret);
}
#ifdef CONFIG_AUDITSYSCALL
void syscall_enter_audit(struct pt_regs *regs)
{
long syscall = syscall_get_nr(current, regs);
unsigned long args[6];
syscall_get_arguments(current, regs, args);
__audit_syscall_entry(syscall, args[0], args[1], args[2], args[3]);
}
#endif
|