Commit | Line | Data |
---|---|---|
5bcf4dbd FD |
1 | /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) |
2 | * | |
3 | * lttng-syscalls.h | |
4 | * | |
5 | * LTTng syscall header. | |
6 | * | |
7 | * Copyright (C) 2021 Francis Deslauriers <francis.deslauriers@efficios.com> | |
8 | */ | |
9 | ||
f385fc5f FD |
10 | #ifndef LTTNG_SYSCALLS_H |
11 | #define LTTNG_SYSCALLS_H | |
12 | ||
5bcf4dbd | 13 | #include <asm/ptrace.h> |
e85d1a7f FD |
14 | #include <linux/compat.h> |
15 | #include <linux/fcntl.h> | |
16 | #include <linux/in.h> | |
17 | #include <linux/in6.h> | |
18 | #include <linux/mman.h> | |
5bcf4dbd | 19 | |
f385fc5f | 20 | #include <lttng/events.h> |
5bcf4dbd FD |
21 | #include <lttng/kernel-version.h> |
22 | ||
23 | ||
24 | /* | |
25 | * Forward declarations for old kernels. | |
26 | */ | |
27 | struct mmsghdr; | |
28 | struct rlimit64; | |
29 | struct oldold_utsname; | |
30 | struct old_utsname; | |
31 | struct sel_arg_struct; | |
32 | struct mmap_arg_struct; | |
33 | struct file_handle; | |
34 | struct user_msghdr; | |
35 | ||
36 | /* | |
37 | * Forward declaration for kernels >= 5.6 | |
38 | */ | |
39 | struct timex; | |
40 | struct timeval; | |
41 | struct itimerval; | |
42 | struct itimerspec; | |
43 | ||
44 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0)) | |
45 | typedef __kernel_old_time_t time_t; | |
46 | #endif | |
47 | ||
f385fc5f FD |
48 | struct trace_syscall_entry { |
49 | void *event_func; | |
50 | const struct lttng_kernel_event_desc *desc; | |
87c1e467 | 51 | const struct lttng_kernel_event_field * const *fields; |
f385fc5f FD |
52 | unsigned int nrargs; |
53 | }; | |
54 | ||
55 | struct trace_syscall_table { | |
56 | const struct trace_syscall_entry *table; | |
57 | const size_t len; | |
58 | }; | |
5bcf4dbd FD |
59 | |
60 | extern | |
61 | void syscall_entry_event_probe(void *__data, struct pt_regs *regs, long id); | |
62 | ||
63 | extern | |
64 | void syscall_exit_event_probe(void *__data, struct pt_regs *regs, long ret); | |
65 | ||
66 | extern | |
67 | void syscall_entry_event_notifier_probe(void *__data, struct pt_regs *regs, | |
68 | long id); | |
69 | extern | |
70 | void syscall_exit_event_notifier_probe(void *__data, struct pt_regs *regs, | |
71 | long ret); | |
72 | ||
f385fc5f | 73 | #endif /* LTTNG_SYSCALLS_H */ |