X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=lttng-syscalls.c;h=a5b5f403fe359e6531650111fc05cb82a6c60aba;hb=4f47ccf08dfac3d5db7553eb8b40bdab19764727;hp=ebd9246c32ef8b4e0ce1c469d1876b443166d67f;hpb=1b7b9c650ebb94358365512199559b0ece3e657c;p=lttng-modules.git diff --git a/lttng-syscalls.c b/lttng-syscalls.c index ebd9246c..a5b5f403 100644 --- a/lttng-syscalls.c +++ b/lttng-syscalls.c @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1) +/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) * * lttng-syscalls.c * @@ -18,15 +18,16 @@ #include #include #include +#include #include #include -#include +#include #include #include #include #include -#include +#include #ifndef CONFIG_COMPAT # ifndef is_compat_task @@ -73,6 +74,18 @@ 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 (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) +typedef __kernel_old_time_t time_t; +#endif + #ifdef IA32_NR_syscalls #define NR_compat_syscalls IA32_NR_syscalls #else @@ -748,7 +761,7 @@ int lttng_syscalls_register(struct lttng_channel *chan, void *filter) struct lttng_kernel_event ev; int ret; - wrapper_vmalloc_sync_all(); + wrapper_vmalloc_sync_mappings(); if (!chan->sc_table) { /* create syscall table mapping syscall to events */ @@ -905,15 +918,15 @@ int lttng_syscalls_unregister(struct lttng_channel *chan) if (!chan->sc_table) return 0; if (chan->sys_enter_registered) { - ret = lttng_wrapper_tracepoint_probe_unregister("sys_exit", - (void *) syscall_exit_probe, chan); + ret = lttng_wrapper_tracepoint_probe_unregister("sys_enter", + (void *) syscall_entry_probe, chan); if (ret) return ret; chan->sys_enter_registered = 0; } if (chan->sys_exit_registered) { - ret = lttng_wrapper_tracepoint_probe_unregister("sys_enter", - (void *) syscall_entry_probe, chan); + ret = lttng_wrapper_tracepoint_probe_unregister("sys_exit", + (void *) syscall_exit_probe, chan); if (ret) return ret; chan->sys_exit_registered = 0;