Update for kernel 5.7: use vmalloc_sync_mappings on kernels >= 5.7
[lttng-modules.git] / lttng-syscalls.c
index 6d232d53831b889b758e4195a9898406516c1b6a..7720f4ea77a1c22e7f879a69c7f75fbc791ad89a 100644 (file)
@@ -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,6 +18,7 @@
 #include <linux/stringify.h>
 #include <linux/file.h>
 #include <linux/anon_inodes.h>
+#include <linux/fcntl.h>
 #include <asm/ptrace.h>
 #include <asm/syscall.h>
 
@@ -77,6 +78,13 @@ 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
@@ -753,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 */
This page took 0.025362 seconds and 4 git commands to generate.