X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Flttng-syscalls.h;h=7cbdd0ffeeac00c85aa431c1b1efa9e8a36c29b9;hb=57acf405913f8c4d8ac7d57943805b1aaeb51daa;hp=9a9d9173312fd9143872b6a882a62b82b5efff86;hpb=f385fc5fb55e1ea6a7e290e7bdf0c8852e20cec8;p=lttng-modules.git diff --git a/src/lttng-syscalls.h b/src/lttng-syscalls.h index 9a9d9173..7cbdd0ff 100644 --- a/src/lttng-syscalls.h +++ b/src/lttng-syscalls.h @@ -1,13 +1,56 @@ +/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) + * + * lttng-syscalls.h + * + * LTTng syscall header. + * + * Copyright (C) 2021 Francis Deslauriers + */ + #ifndef LTTNG_SYSCALLS_H #define LTTNG_SYSCALLS_H #include +#include +#include +#include +#include +#include +#include + #include +#include + + +/* + * Forward declarations for old kernels. + */ +struct mmsghdr; +struct rlimit64; +struct oldold_utsname; +struct old_utsname; +struct sel_arg_struct; +struct mmap_arg_struct; +struct file_handle; +struct user_msghdr; + +/* + * Forward declaration for kernels >= 5.6 + */ +struct timex; +struct timeval; +struct itimerval; +struct itimerspec; + +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0)) +typedef __kernel_old_time_t time_t; +#endif + struct trace_syscall_entry { void *event_func; const struct lttng_kernel_event_desc *desc; - const struct lttng_kernel_event_field **fields; + const struct lttng_kernel_event_field * const *fields; unsigned int nrargs; }; @@ -15,4 +58,18 @@ struct trace_syscall_table { const struct trace_syscall_entry *table; const size_t len; }; + +extern +void syscall_entry_event_probe(void *__data, struct pt_regs *regs, long id); + +extern +void syscall_exit_event_probe(void *__data, struct pt_regs *regs, long ret); + +extern +void syscall_entry_event_notifier_probe(void *__data, struct pt_regs *regs, + long id); +extern +void syscall_exit_event_notifier_probe(void *__data, struct pt_regs *regs, + long ret); + #endif /* LTTNG_SYSCALLS_H */