--- Begin Message ---
Package: lttng-modules-dkms
Version: 2.12.0-1
Severity: important
Dear Maintainer,
lttngs FTBFS with Linux-5.7 is several different ways: since upstream upstream
has several fixes for it (all queed in the stable 2.12 branch): cherry pick all
of them (see the attached debdiff).
-- System Information:
Debian Release: bullseye/sid
APT prefers focal-updates
APT policy: (500, 'focal-updates'), (500, 'focal-security'), (500,
'focal-proposed'), (500, 'focal'), (100, 'focal-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 5.4.0-31-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL
set to C.UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) (ignored: LC_ALL set to
C.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages lttng-modules-dkms depends on:
ii dkms 2.8.1-5ubuntu1
Versions of packages lttng-modules-dkms recommends:
pn lttng-tools <none>
lttng-modules-dkms suggests no packages.
diff -Nru lttng-modules-2.12.0/debian/changelog
lttng-modules-2.12.0/debian/changelog
--- lttng-modules-2.12.0/debian/changelog 2020-04-08 19:49:55.000000000
+0000
+++ lttng-modules-2.12.0/debian/changelog 2020-05-14 14:25:14.000000000
+0000
@@ -1,3 +1,9 @@
+lttng-modules (2.12.0-2) unstable; urgency=medium
+
+ * cherry-picks all Linux-5.7 fixes from upstream stable-2.12 branch
+
+ -- Paolo Pisati <[email protected]> Thu, 14 May 2020 14:25:14 +0000
+
lttng-modules (2.12.0-1) unstable; urgency=medium
* [e5929d1] New upstream version 2.12.0
diff -Nru
lttng-modules-2.12.0/debian/patches/0001-instrumentation-update-mm_vmscan-for-kernel-5.7.0.patch
lttng-modules-2.12.0/debian/patches/0001-instrumentation-update-mm_vmscan-for-kernel-5.7.0.patch
---
lttng-modules-2.12.0/debian/patches/0001-instrumentation-update-mm_vmscan-for-kernel-5.7.0.patch
1970-01-01 00:00:00.000000000 +0000
+++
lttng-modules-2.12.0/debian/patches/0001-instrumentation-update-mm_vmscan-for-kernel-5.7.0.patch
2020-05-14 14:25:14.000000000 +0000
@@ -0,0 +1,41 @@
+From 1b174681e3bdc296cc7bad67861796bd51abb18f Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <[email protected]>
+Date: Mon, 13 Apr 2020 11:38:48 -0400
+Subject: [PATCH] instrumentation: update mm_vmscan for kernel >= 5.7.0
+
+Signed-off-by: Mathieu Desnoyers <[email protected]>
+(cherry picked from commit 9eae8438a31af1a91f73436f8383e2a8b3d162a3)
+Signed-off-by: Paolo Pisati <[email protected]>
+---
+ instrumentation/events/lttng-module/mm_vmscan.h | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/instrumentation/events/lttng-module/mm_vmscan.h
b/instrumentation/events/lttng-module/mm_vmscan.h
+index f99767a8..9f8a2782 100644
+--- a/instrumentation/events/lttng-module/mm_vmscan.h
++++ b/instrumentation/events/lttng-module/mm_vmscan.h
+@@ -568,7 +568,20 @@
LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_
+ )
+ #endif
+
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
++LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage,
++
++ TP_PROTO(struct page *page),
++
++ TP_ARGS(page),
++
++ TP_FIELDS(
++ ctf_integer_hex(struct page *, page, page)
++ ctf_integer(int, reclaim_flags, trace_reclaim_flags(
++ page_is_file_lru(page)))
++ )
++)
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0))
+ LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage,
+
+ TP_PROTO(struct page *page),
+--
+2.25.1
+
diff -Nru
lttng-modules-2.12.0/debian/patches/0002-instrumentation-update-x86-kvm-instrumentation-for-k.patch
lttng-modules-2.12.0/debian/patches/0002-instrumentation-update-x86-kvm-instrumentation-for-k.patch
---
lttng-modules-2.12.0/debian/patches/0002-instrumentation-update-x86-kvm-instrumentation-for-k.patch
1970-01-01 00:00:00.000000000 +0000
+++
lttng-modules-2.12.0/debian/patches/0002-instrumentation-update-x86-kvm-instrumentation-for-k.patch
2020-05-14 14:25:14.000000000 +0000
@@ -0,0 +1,141 @@
+From e73c44de63994670d85677146afbe76dd98d890d Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <[email protected]>
+Date: Mon, 13 Apr 2020 11:44:23 -0400
+Subject: [PATCH 2/8] instrumentation: update x86 kvm instrumentation for
+ kernel >= 5.7.0
+
+Signed-off-by: Mathieu Desnoyers <[email protected]>
+(cherry picked from commit b732ab4d46f77bbe26880131295ad6eb47b10138)
+Signed-off-by: Paolo Pisati <[email protected]>
+---
+ .../events/lttng-module/arch/x86/kvm/trace.h | 20 ++++++++-
+ probes/Kbuild | 42 +++++++++++++------
+ probes/lttng-probe-kvm-x86.c | 4 ++
+ 3 files changed, 52 insertions(+), 14 deletions(-)
+
+diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
+index 57ac7f48..4416ae02 100644
+--- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
++++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
+@@ -124,8 +124,13 @@ LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
+ ),
+
+ TP_code_pre(
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
++ kvm_x86_ops.get_exit_info(vcpu, &tp_locvar->info1,
++ &tp_locvar->info2);
++#else
+ kvm_x86_ops->get_exit_info(vcpu, &tp_locvar->info1,
+ &tp_locvar->info2);
++#endif
+ ),
+
+ TP_FIELDS(
+@@ -430,13 +435,15 @@ LTTNG_TRACEPOINT_EVENT_MAP(kvm_emulate_insn,
kvm_x86_emulate_insn,
+ ctf_integer(__u8, len, vcpu->arch.emulate_ctxt.decode.eip
+ - vcpu->arch.emulate_ctxt.decode.fetch.start)
+ ctf_array(__u8, insn,
vcpu->arch.emulate_ctxt.decode.fetch.data, 15)
++ ctf_integer(__u8, flags,
kei_decode_mode(vcpu->arch.emulate_ctxt.mode))
+ #elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0))
+ ctf_integer(__u64, rip, vcpu->arch.emulate_ctxt.fetch.start)
+ ctf_integer(__u32, csbase, kvm_x86_ops->get_segment_base(vcpu,
VCPU_SREG_CS))
+ ctf_integer(__u8, len, vcpu->arch.emulate_ctxt._eip
+ - vcpu->arch.emulate_ctxt.fetch.start)
+ ctf_array(__u8, insn, vcpu->arch.emulate_ctxt.fetch.data, 15)
+-#else
++ ctf_integer(__u8, flags,
kei_decode_mode(vcpu->arch.emulate_ctxt.mode))
++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5,7,0))
+ ctf_integer(__u64, rip, vcpu->arch.emulate_ctxt._eip -
+ (vcpu->arch.emulate_ctxt.fetch.ptr -
+ vcpu->arch.emulate_ctxt.fetch.data))
+@@ -444,8 +451,17 @@ LTTNG_TRACEPOINT_EVENT_MAP(kvm_emulate_insn,
kvm_x86_emulate_insn,
+ ctf_integer(__u8, len, vcpu->arch.emulate_ctxt.fetch.ptr -
+ vcpu->arch.emulate_ctxt.fetch.data)
+ ctf_array(__u8, insn, vcpu->arch.emulate_ctxt.fetch.data, 15)
+-#endif
+ ctf_integer(__u8, flags,
kei_decode_mode(vcpu->arch.emulate_ctxt.mode))
++#else
++ ctf_integer(__u64, rip, vcpu->arch.emulate_ctxt->_eip -
++ (vcpu->arch.emulate_ctxt->fetch.ptr -
++ vcpu->arch.emulate_ctxt->fetch.data))
++ ctf_integer(__u32, csbase, kvm_x86_ops.get_segment_base(vcpu,
VCPU_SREG_CS))
++ ctf_integer(__u8, len, vcpu->arch.emulate_ctxt->fetch.ptr -
++ vcpu->arch.emulate_ctxt->fetch.data)
++ ctf_array(__u8, insn, vcpu->arch.emulate_ctxt->fetch.data, 15)
++ ctf_integer(__u8, flags,
kei_decode_mode(vcpu->arch.emulate_ctxt->mode))
++#endif
+ ctf_integer(__u8, failed, failed)
+ )
+ )
+diff --git a/probes/Kbuild b/probes/Kbuild
+index c5371881..18766855 100644
+--- a/probes/Kbuild
++++ b/probes/Kbuild
+@@ -30,19 +30,37 @@ ifneq ($(CONFIG_KVM),)
+ obj-$(CONFIG_LTTNG) += lttng-probe-kvm.o
+ ifneq ($(CONFIG_X86),)
+ kvm_dep_lapic = $(srctree)/arch/x86/kvm/lapic.h
+- ifneq ($(wildcard $(kvm_dep_lapic)),)
+- kvm_dep = $(srctree)/virt/kvm/iodev.h $(srctree)/include/kvm/iodev.h
+- ifneq ($(wildcard $(kvm_dep)),)
+- CFLAGS_lttng-probe-kvm-x86.o += -I$(srctree)/virt/kvm
+- CFLAGS_lttng-probe-kvm-x86-mmu.o += -I$(srctree)/virt/kvm
+- obj-$(CONFIG_LTTNG) += lttng-probe-kvm-x86.o
+- obj-$(CONFIG_LTTNG) += lttng-probe-kvm-x86-mmu.o
+- else
+- $(warning File $(kvm_dep) not found. Probe "kvm" x86-specific is
disabled. Use full kernel source tree to enable it.)
+- endif # $(wildcard $(kvm_dep))
+- else
++ kvm_dep_lapic_check = $(wildcard $(kvm_dep_lapic))
++ ifneq ($(kvm_dep_lapic_check),)
++ # search for iodev.h in any of its known locations
++ kvm_dep_iodev = $(srctree)/virt/kvm/iodev.h
$(srctree)/include/kvm/iodev.h
++ kvm_dep_iodev_check = $(wildcard $(kvm_dep_iodev))
++ ifneq ($(kvm_dep_iodev_check),)
++ kvm_dep_emulate = $(srctree)/arch/x86/kvm/kvm_emulate.h
++ kvm_dep_emulate_wildcard = $(wildcard $(kvm_dep_emulate))
++ kvm_dep_emulate_check = $(shell \
++ if [ \( $(VERSION) -ge 6 \
++ -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -eq 7 \) \) -a \
++ -z "$(kvm_dep_emulate_wildcard)" ] ; then \
++ echo "warn" ; \
++ else \
++ echo "ok" ; \
++ fi ;)
++ ifeq ($(kvm_dep_emulate_check),ok)
++ CFLAGS_lttng-probe-kvm-x86.o += -I$(srctree)/virt/kvm \
++ -I$(srctree)/arch/x86/kvm
++ CFLAGS_lttng-probe-kvm-x86-mmu.o += -I$(srctree)/virt/kvm
++ obj-$(CONFIG_LTTNG) += lttng-probe-kvm-x86.o
++ obj-$(CONFIG_LTTNG) += lttng-probe-kvm-x86-mmu.o
++ else # ($(kvm_dep_emulate_check),ok)
++ $(warning File $(kvm_dep_emulate) not found. Probe "kvm"
x86-specific is disabled. Use full kernel source tree to enable it.)
++ endif # ($(kvm_dep_emulate_check),ok)
++ else # $(kvm_dep_iodev_check)
++ $(warning File $(kvm_dep_iodev) not found. Probe "kvm" x86-specific
is disabled. Use full kernel source tree to enable it.)
++ endif # $(kvm_dep_iodev_check)
++ else # $(kvm_dep_lapic_check)
+ $(warning File $(kvm_dep_lapic) not found. Probe "kvm" x86-specific is
disabled. Use full kernel source tree to enable it.)
+- endif # $(wildcard $(kvm_dep_lapic))
++ endif # $(kvm_dep_lapic_check)
+ endif # CONFIG_X86
+ endif # CONFIG_KVM
+
+diff --git a/probes/lttng-probe-kvm-x86.c b/probes/lttng-probe-kvm-x86.c
+index f081cdd5..6dfaa31e 100644
+--- a/probes/lttng-probe-kvm-x86.c
++++ b/probes/lttng-probe-kvm-x86.c
+@@ -12,6 +12,10 @@
+ #include <lttng-tracer.h>
+ #include <lttng-kernel-version.h>
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
++#include <kvm_emulate.h>
++#endif
++
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
+ #include <kvm/iodev.h>
+ #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */
+--
+2.25.1
+
diff -Nru
lttng-modules-2.12.0/debian/patches/0003-Introduce-lttng_guid_gen-wrapper-for-kernels-5.7.0.patch
lttng-modules-2.12.0/debian/patches/0003-Introduce-lttng_guid_gen-wrapper-for-kernels-5.7.0.patch
---
lttng-modules-2.12.0/debian/patches/0003-Introduce-lttng_guid_gen-wrapper-for-kernels-5.7.0.patch
1970-01-01 00:00:00.000000000 +0000
+++
lttng-modules-2.12.0/debian/patches/0003-Introduce-lttng_guid_gen-wrapper-for-kernels-5.7.0.patch
2020-05-14 14:25:14.000000000 +0000
@@ -0,0 +1,75 @@
+From da7f4db25d662cb51ce91f7338b429aa2327e214 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <[email protected]>
+Date: Mon, 13 Apr 2020 12:16:43 -0400
+Subject: [PATCH 3/8] Introduce lttng_guid_gen wrapper for kernels >= 5.7.0
+
+Signed-off-by: Mathieu Desnoyers <[email protected]>
+(cherry picked from commit 8b7bb83e1100aa3c3e22148b27358b0d9a81786b)
+Signed-off-by: Paolo Pisati <[email protected]>
+---
+ lttng-events.c | 4 ++--
+ wrapper/uuid.h | 28 ++++++++++++++++++++++++++++
+ 2 files changed, 30 insertions(+), 2 deletions(-)
+ create mode 100644 wrapper/uuid.h
+
+diff --git a/lttng-events.c b/lttng-events.c
+index a1c8445a..8e8e65a5 100644
+--- a/lttng-events.c
++++ b/lttng-events.c
+@@ -27,9 +27,9 @@
+ #include <linux/jhash.h>
+ #include <linux/uaccess.h>
+ #include <linux/vmalloc.h>
+-#include <linux/uuid.h>
+ #include <linux/dmi.h>
+
++#include <wrapper/uuid.h>
+ #include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_all() */
+ #include <wrapper/random.h>
+ #include <wrapper/tracepoint.h>
+@@ -130,7 +130,7 @@ struct lttng_session *lttng_session_create(void)
+ goto err;
+ INIT_LIST_HEAD(&session->chan);
+ INIT_LIST_HEAD(&session->events);
+- uuid_le_gen(&session->uuid);
++ lttng_guid_gen(&session->uuid);
+
+ metadata_cache = kzalloc(sizeof(struct lttng_metadata_cache),
+ GFP_KERNEL);
+diff --git a/wrapper/uuid.h b/wrapper/uuid.h
+new file mode 100644
+index 00000000..74946e23
+--- /dev/null
++++ b/wrapper/uuid.h
+@@ -0,0 +1,28 @@
++/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
++ *
++ * wrapper/uuid.h
++ *
++ * Copyright (C) 2020 Mathieu Desnoyers <[email protected]>
++ */
++
++#ifndef _LTTNG_WRAPPER_UUID_H
++#define _LTTNG_WRAPPER_UUID_H
++
++#include <linux/version.h>
++#include <linux/uuid.h>
++
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
++static inline
++void lttng_guid_gen(guid_t *u)
++{
++ return guid_gen(u);
++}
++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
++static inline
++void lttng_guid_gen(guid_t *u)
++{
++ return uuid_le_gen(u);
++}
++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
++
++#endif /* _LTTNG_WRAPPER_UUID_H */
+--
+2.25.1
+
diff -Nru
lttng-modules-2.12.0/debian/patches/0004-Move-lttng-wrappers-into-own-module.patch
lttng-modules-2.12.0/debian/patches/0004-Move-lttng-wrappers-into-own-module.patch
---
lttng-modules-2.12.0/debian/patches/0004-Move-lttng-wrappers-into-own-module.patch
1970-01-01 00:00:00.000000000 +0000
+++
lttng-modules-2.12.0/debian/patches/0004-Move-lttng-wrappers-into-own-module.patch
2020-05-14 14:25:14.000000000 +0000
@@ -0,0 +1,192 @@
+From c719616a9a9f11955ec69c73c04eb5efd564ed30 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <[email protected]>
+Date: Mon, 4 May 2020 14:52:13 -0400
+Subject: [PATCH 4/8] Move lttng wrappers into own module
+
+Currently, we only pull the wrapper symbols into a single sub-module,
+either:
+
+lttng-tracer.o:
+ - wrapper/random.o
+ - wrapper/trace-clock.o
+ - wrapper/page_alloc.o
+
+or
+
+lttng-statedump.o:
+ - wrapper/irqdesc.o
+ - wrapper/fdtable.o
+
+Because lttng-tracer depends on lttng-statedump, we cannot just put all
+wrappers into lttng-tracer.o, because it would create a circular
+dependency. This will be an issue if we introduce common wrappers which
+are used in both lttng-tracer.o and in lttng-statedump.o.
+
+Introduce a new lttng-wrapper.o to contain all wrapper symbols for all
+lttng modules.
+
+Signed-off-by: Mathieu Desnoyers <[email protected]>
+(cherry picked from commit d4d4da49b06f3000a70ce246a3ac991a0f9d6cc5)
+Signed-off-by: Paolo Pisati <[email protected]>
+---
+ Makefile | 19 +++++++++++++------
+ lttng-wrapper-impl.c | 37 +++++++++++++++++++++++++++++++++++++
+ wrapper/irqdesc.c | 2 ++
+ wrapper/page_alloc.c | 2 ++
+ wrapper/random.c | 2 ++
+ 5 files changed, 56 insertions(+), 6 deletions(-)
+ create mode 100644 lttng-wrapper-impl.c
+
+diff --git a/Makefile b/Makefile
+index 4a6ddbc5..210923de 100644
+--- a/Makefile
++++ b/Makefile
+@@ -41,6 +41,8 @@ ifneq ($(KERNELRELEASE),)
+
+ obj-$(CONFIG_LTTNG) += lttng-tracer.o
+
++ obj-$(CONFIG_LTTNG) += lttng-wrapper.o
++
+ lttng-tracer-objs := lttng-events.o lttng-abi.o lttng-string-utils.o \
+ lttng-probes.o lttng-context.o \
+ lttng-context-pid.o lttng-context-procname.o \
+@@ -63,15 +65,21 @@ ifneq ($(KERNELRELEASE),)
+ lttng-context-interruptible.o \
+ lttng-context-need-reschedule.o \
+ lttng-context-callstack.o lttng-calibrate.o \
+- lttng-context-hostname.o wrapper/random.o \
+- probes/lttng.o wrapper/trace-clock.o \
+- wrapper/page_alloc.o \
++ lttng-context-hostname.o \
++ probes/lttng.o \
+ lttng-tracker-id.o \
+ lttng-filter.o lttng-filter-interpreter.o \
+ lttng-filter-specialize.o \
+ lttng-filter-validator.o \
+ probes/lttng-probe-user.o \
+- lttng-tp-mempool.o
++ lttng-tp-mempool.o \
++
++ lttng-wrapper-objs := wrapper/page_alloc.o \
++ wrapper/random.o \
++ wrapper/trace-clock.o \
++ wrapper/irqdesc.o \
++ wrapper/fdtable.o \
++ lttng-wrapper-impl.o
+
+ ifneq ($(CONFIG_HAVE_SYSCALL_TRACEPOINTS),)
+ lttng-tracer-objs += lttng-syscalls.o
+@@ -122,8 +130,7 @@ ifneq ($(KERNELRELEASE),)
+ endif
+
+ obj-$(CONFIG_LTTNG) += lttng-statedump.o
+- lttng-statedump-objs := lttng-statedump-impl.o wrapper/irqdesc.o \
+- wrapper/fdtable.o
++ lttng-statedump-objs := lttng-statedump-impl.o
+
+ obj-$(CONFIG_LTTNG) += probes/
+ obj-$(CONFIG_LTTNG) += lib/
+diff --git a/lttng-wrapper-impl.c b/lttng-wrapper-impl.c
+new file mode 100644
+index 00000000..61319699
+--- /dev/null
++++ b/lttng-wrapper-impl.c
+@@ -0,0 +1,37 @@
++/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
++ *
++ * lttng-wrapper.c
++ *
++ * Copyright (C) 2020 Mathieu Desnoyers <[email protected]>
++ */
++
++#include <linux/module.h>
++#include <lttng-tracer.h>
++
++static int __init lttng_wrapper_init(void)
++{
++ return 0;
++}
++
++module_init(lttng_wrapper_init);
++
++static void __exit lttng_exit(void)
++{
++}
++
++module_exit(lttng_exit);
++
++#include "extra_version/patches.i"
++#ifdef LTTNG_EXTRA_VERSION_GIT
++MODULE_INFO(extra_version_git, LTTNG_EXTRA_VERSION_GIT);
++#endif
++#ifdef LTTNG_EXTRA_VERSION_NAME
++MODULE_INFO(extra_version_name, LTTNG_EXTRA_VERSION_NAME);
++#endif
++MODULE_LICENSE("GPL and additional rights");
++MODULE_AUTHOR("Mathieu Desnoyers <[email protected]>");
++MODULE_DESCRIPTION("LTTng wrapper");
++MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "."
++ __stringify(LTTNG_MODULES_MINOR_VERSION) "."
++ __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION)
++ LTTNG_MODULES_EXTRAVERSION);
+diff --git a/wrapper/irqdesc.c b/wrapper/irqdesc.c
+index 29427d47..d524c633 100644
+--- a/wrapper/irqdesc.c
++++ b/wrapper/irqdesc.c
+@@ -34,6 +34,7 @@ struct irq_desc *wrapper_irq_to_desc(unsigned int irq)
+ return NULL;
+ }
+ }
++EXPORT_SYMBOL_GPL(wrapper_irq_to_desc);
+
+ #else
+
+@@ -44,5 +45,6 @@ struct irq_desc *wrapper_irq_to_desc(unsigned int irq)
+ {
+ return irq_to_desc(irq);
+ }
++EXPORT_SYMBOL_GPL(wrapper_irq_to_desc);
+
+ #endif
+diff --git a/wrapper/page_alloc.c b/wrapper/page_alloc.c
+index baa8603f..40998199 100644
+--- a/wrapper/page_alloc.c
++++ b/wrapper/page_alloc.c
+@@ -52,6 +52,7 @@ int wrapper_get_pfnblock_flags_mask_init(void)
+ return -1;
+ return 0;
+ }
++EXPORT_SYMBOL_GPL(wrapper_get_pfnblock_flags_mask_init);
+
+ #else
+
+@@ -94,6 +95,7 @@ int wrapper_get_pageblock_flags_mask_init(void)
+ return -1;
+ return 0;
+ }
++EXPORT_SYMBOL_GPL(wrapper_get_pfnblock_flags_mask_init);
+
+ #else
+
+diff --git a/wrapper/random.c b/wrapper/random.c
+index c938ae35..eb41769c 100644
+--- a/wrapper/random.c
++++ b/wrapper/random.c
+@@ -55,6 +55,7 @@ end:
+ filp_close(file, current->files);
+ return ret;
+ }
++EXPORT_SYMBOL_GPL(wrapper_get_bootid);
+
+ #else
+
+@@ -62,5 +63,6 @@ int wrapper_get_bootid(char *bootid)
+ {
+ return -ENOSYS;
+ }
++EXPORT_SYMBOL_GPL(wrapper_get_bootid);
+
+ #endif
+--
+2.25.1
+
diff -Nru
lttng-modules-2.12.0/debian/patches/0005-Unbreak-LTTng-for-kernel-5.7.patch
lttng-modules-2.12.0/debian/patches/0005-Unbreak-LTTng-for-kernel-5.7.patch
--- lttng-modules-2.12.0/debian/patches/0005-Unbreak-LTTng-for-kernel-5.7.patch
1970-01-01 00:00:00.000000000 +0000
+++ lttng-modules-2.12.0/debian/patches/0005-Unbreak-LTTng-for-kernel-5.7.patch
2020-05-14 14:25:14.000000000 +0000
@@ -0,0 +1,207 @@
+From ac198647c7132bc1e540e302724d79308bbd35af Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <[email protected]>
+Date: Mon, 4 May 2020 15:00:53 -0400
+Subject: [PATCH 5/8] Unbreak LTTng for kernel 5.7
+
+Linux commit 0bd476e6c67190b5eb7b6e105c8db8ff61103281 ("kallsyms:
+unexport kallsyms_lookup_name() and kallsyms_on_each_symbol()") breaks
+LTTng-modules by removing symbols used by the LTTng-modules out-of-tree
+tracer.
+
+I pointed this out when the change was originally considered before the
+5.7 merge window. This generated some discussion but it did not lead to
+any concrete proposal to fix the issue. [1]
+
+The commit has been merged in the 5.7 merge window. At that point, as
+maintainer of LTTng, I immediately raised a flag about this issue,
+proposing an alternative approach to solve this: expose the few symbols
+needed by LTTng to GPL modules. This was NACKed on the ground that the
+Linux kernel cannot export GPL symbols when there are no in-tree
+users. [2]
+
+Steven Rostedt has shown interest in merging LTTng-modules upstream.
+LTTng-modules being LGPL, this is very much doable. I have prepared a
+tree of LTTng-modules "for upstreaming" and sent it to him privately so
+he can review it. Even if in an ideal scenario LTTng-modules is merged
+for the following merge window, it leaves LTTng-modules broken on the
+5.7 kernel.
+
+In order to ensure that the LTTng-modules kernel tracer continues working
+for my end users on kernels 5.7 onwards, as a very last resort, this is
+with great reluctance that I created this fix for LTTng modules. It
+basically uses kprobes to lookup the kallsyms_lookup_name symbol, and
+continues using kallsyms_lookup_name as before.
+
+Link: https://lore.kernel.org/r/20200302192811.n6o5645rsib44vco@localhost [1]
+Link:
https://lore.kernel.org/r/[email protected]
[2]
+Link: https://lwn.net/Articles/817988/
+Signed-off-by: Mathieu Desnoyers <[email protected]>
+CC: Thomas Gleixner <[email protected]>
+CC: Will Deacon <[email protected]>
+CC: [email protected]
+CC: Greg Kroah-Hartman <[email protected]>
+CC: Masami Hiramatsu <[email protected]>
+CC: [email protected]
+CC: Alexei Starovoitov <[email protected]>
+(cherry picked from commit d551a26d9a6bf87e80708ad8a35f49111442bf11)
+Signed-off-by: Paolo Pisati <[email protected]>
+---
+ Makefile | 1 +
+ README.md | 1 +
+ wrapper/kallsyms.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++
+ wrapper/kallsyms.h | 20 +++++++++++--
+ 4 files changed, 90 insertions(+), 2 deletions(-)
+ create mode 100644 wrapper/kallsyms.c
+
+diff --git a/Makefile b/Makefile
+index 210923de..a9aff3f1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -77,6 +77,7 @@ ifneq ($(KERNELRELEASE),)
+ lttng-wrapper-objs := wrapper/page_alloc.o \
+ wrapper/random.o \
+ wrapper/trace-clock.o \
++ wrapper/kallsyms.o \
+ wrapper/irqdesc.o \
+ wrapper/fdtable.o \
+ lttng-wrapper-impl.o
+diff --git a/README.md b/README.md
+index 450f3630..7b04cd83 100644
+--- a/README.md
++++ b/README.md
+@@ -66,6 +66,7 @@ Make sure your target kernel has the following config
options enabled:
+ - `CONFIG_TRACEPOINTS`: kernel tracepoint instrumentation
+ (enabled as a side-effect of any of the perf/ftrace/blktrace
+ instrumentation features).
++ - `CONFIG_KPROBES` (5.7+): use kallsyms for kernel 5.7 and newer.
+
+
+ ### Supported (optional) kernel config options
+diff --git a/wrapper/kallsyms.c b/wrapper/kallsyms.c
+new file mode 100644
+index 00000000..6af77f53
+--- /dev/null
++++ b/wrapper/kallsyms.c
+@@ -0,0 +1,70 @@
++/* SPDX-License-Identifier: (GPL-2.0-only OR LGPL-2.1-only)
++ *
++ * wrapper/kallsyms.c
++ *
++ * Wrapper around kallsyms. Using kprobes to get its address when available.
++ *
++ * Can we mainline LTTng already so we don't have to waste our time doing this
++ * kind of hack ?
++ *
++ * Copyright (C) 2020 Mathieu Desnoyers <[email protected]>
++ */
++
++#include <linux/kprobes.h>
++#include <linux/module.h>
++#include <wrapper/kallsyms.h>
++
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
++
++#ifndef CONFIG_KPROBES
++# error "LTTng-modules requires CONFIG_KPROBES on kernels >= 5.7.0"
++#endif
++
++static
++unsigned long (*kallsyms_lookup_name_sym)(const char *name);
++
++static
++int dummy_kprobe_handler(struct kprobe *p, struct pt_regs *regs)
++{
++ return 0;
++}
++
++static
++unsigned long do_get_kallsyms(void)
++{
++ struct kprobe probe;
++ int ret;
++ unsigned long addr;
++
++ memset(&probe, 0, sizeof(probe));
++ probe.pre_handler = dummy_kprobe_handler;
++ probe.symbol_name = "kallsyms_lookup_name";
++ ret = register_kprobe(&probe);
++ if (ret)
++ return 0;
++ addr = (unsigned long)probe.addr;
++#ifdef CONFIG_ARM
++#ifdef CONFIG_THUMB2_KERNEL
++ if (addr)
++ addr |= 1; /* set bit 0 in address for thumb mode */
++#endif
++#endif
++ unregister_kprobe(&probe);
++ return addr;
++}
++
++unsigned long wrapper_kallsyms_lookup_name(const char *name)
++{
++ if (!kallsyms_lookup_name_sym) {
++ kallsyms_lookup_name_sym = (void *)do_get_kallsyms();
++ }
++ if (kallsyms_lookup_name_sym)
++ return kallsyms_lookup_name_sym(name);
++ else {
++ printk_once(KERN_WARNING "LTTng requires
kallsyms_lookup_name\n");
++ return 0;
++ }
++}
++EXPORT_SYMBOL_GPL(wrapper_kallsyms_lookup_name);
++
++#endif
+diff --git a/wrapper/kallsyms.h b/wrapper/kallsyms.h
+index e60fe363..5f48847f 100644
+--- a/wrapper/kallsyms.h
++++ b/wrapper/kallsyms.h
+@@ -14,6 +14,7 @@
+ #define _LTTNG_WRAPPER_KALLSYMS_H
+
+ #include <linux/kallsyms.h>
++#include <linux/version.h>
+
+ /*
+ * PowerPC ABIv1 needs KALLSYMS_ALL to get the function descriptor,
+@@ -25,12 +26,26 @@
+ # endif
+ #endif
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
++
++unsigned long wrapper_kallsyms_lookup_name(const char *name);
++
++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
++
++static inline
++unsigned long wrapper_kallsyms_lookup_name(const char *name)
++{
++ return kallsyms_lookup_name(name);
++}
++
++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
++
+ static inline
+ unsigned long kallsyms_lookup_funcptr(const char *name)
+ {
+ unsigned long addr;
+
+- addr = kallsyms_lookup_name(name);
++ addr = wrapper_kallsyms_lookup_name(name);
+ #ifdef CONFIG_ARM
+ #ifdef CONFIG_THUMB2_KERNEL
+ if (addr)
+@@ -43,6 +58,7 @@ unsigned long kallsyms_lookup_funcptr(const char *name)
+ static inline
+ unsigned long kallsyms_lookup_dataptr(const char *name)
+ {
+- return kallsyms_lookup_name(name);
++ return wrapper_kallsyms_lookup_name(name);
+ }
++
+ #endif /* _LTTNG_WRAPPER_KALLSYMS_H */
+--
+2.25.1
+
diff -Nru
lttng-modules-2.12.0/debian/patches/0006-Update-for-kernel-5.7-use-vmalloc_sync_mappings-on-k.patch
lttng-modules-2.12.0/debian/patches/0006-Update-for-kernel-5.7-use-vmalloc_sync_mappings-on-k.patch
---
lttng-modules-2.12.0/debian/patches/0006-Update-for-kernel-5.7-use-vmalloc_sync_mappings-on-k.patch
1970-01-01 00:00:00.000000000 +0000
+++
lttng-modules-2.12.0/debian/patches/0006-Update-for-kernel-5.7-use-vmalloc_sync_mappings-on-k.patch
2020-05-14 14:25:14.000000000 +0000
@@ -0,0 +1,852 @@
+From 15a73ec9dac1e4eaf8830b87b41eaeebedcce0b6 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <[email protected]>
+Date: Tue, 5 May 2020 13:38:31 -0400
+Subject: [PATCH 6/8] Update for kernel 5.7: use vmalloc_sync_mappings on
+ kernels >= 5.7
+
+Signed-off-by: Mathieu Desnoyers <[email protected]>
+(cherry picked from commit ea53823c42a70a80566a340834e2b00e650406b9)
+Signed-off-by: Paolo Pisati <[email protected]>
+---
+ lib/ringbuffer/ring_buffer_backend.c | 4 +--
+ lttng-abi.c | 4 +--
+ lttng-context-callstack.c | 2 +-
+ lttng-context-cgroup-ns.c | 2 +-
+ lttng-context-cpu-id.c | 2 +-
+ lttng-context-egid.c | 2 +-
+ lttng-context-euid.c | 2 +-
+ lttng-context-gid.c | 2 +-
+ lttng-context-hostname.c | 2 +-
+ lttng-context-interruptible.c | 2 +-
+ lttng-context-ipc-ns.c | 2 +-
+ lttng-context-migratable.c | 2 +-
+ lttng-context-mnt-ns.c | 2 +-
+ lttng-context-need-reschedule.c | 2 +-
+ lttng-context-net-ns.c | 2 +-
+ lttng-context-nice.c | 2 +-
+ lttng-context-perf-counters.c | 2 +-
+ lttng-context-pid-ns.c | 2 +-
+ lttng-context-pid.c | 2 +-
+ lttng-context-ppid.c | 2 +-
+ lttng-context-preemptible.c | 2 +-
+ lttng-context-prio.c | 2 +-
+ lttng-context-procname.c | 2 +-
+ lttng-context-sgid.c | 2 +-
+ lttng-context-suid.c | 2 +-
+ lttng-context-tid.c | 2 +-
+ lttng-context-uid.c | 2 +-
+ lttng-context-user-ns.c | 2 +-
+ lttng-context-uts-ns.c | 2 +-
+ lttng-context-vegid.c | 2 +-
+ lttng-context-veuid.c | 2 +-
+ lttng-context-vgid.c | 2 +-
+ lttng-context-vpid.c | 2 +-
+ lttng-context-vppid.c | 2 +-
+ lttng-context-vsgid.c | 2 +-
+ lttng-context-vsuid.c | 2 +-
+ lttng-context-vtid.c | 2 +-
+ lttng-context-vuid.c | 2 +-
+ lttng-context.c | 2 +-
+ lttng-events.c | 10 +++---
+ lttng-ring-buffer-client.h | 4 +--
+ lttng-ring-buffer-metadata-client.h | 4 +--
+ lttng-syscalls.c | 2 +-
+ probes/lttng-kprobes.c | 2 +-
+ probes/lttng-kretprobes.c | 2 +-
+ probes/lttng-tracepoint-event-impl.h | 4 +--
+ probes/lttng-uprobes.c | 2 +-
+ probes/lttng.c | 2 +-
+ tests/probes/lttng-test.c | 2 +-
+ wrapper/vmalloc.h | 49 ++++++++++++++++++++++++++--
+ 50 files changed, 104 insertions(+), 61 deletions(-)
+
+diff --git a/lib/ringbuffer/ring_buffer_backend.c
b/lib/ringbuffer/ring_buffer_backend.c
+index d4bec25f..d232b7f2 100644
+--- a/lib/ringbuffer/ring_buffer_backend.c
++++ b/lib/ringbuffer/ring_buffer_backend.c
+@@ -17,7 +17,7 @@
+ #include <linux/vmalloc.h>
+
+ #include <wrapper/mm.h>
+-#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_all() */
++#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_mappings() */
+ #include <wrapper/ringbuffer/config.h>
+ #include <wrapper/ringbuffer/backend.h>
+ #include <wrapper/ringbuffer/frontend.h>
+@@ -156,7 +156,7 @@ int lib_ring_buffer_backend_allocate(const struct
lib_ring_buffer_config *config
+ * If kmalloc ever uses vmalloc underneath, make sure the buffer pages
+ * will not fault.
+ */
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ wrapper_clear_current_oom_origin();
+ vfree(pages);
+ return 0;
+diff --git a/lttng-abi.c b/lttng-abi.c
+index b63e3764..826ecab4 100644
+--- a/lttng-abi.c
++++ b/lttng-abi.c
+@@ -30,7 +30,7 @@
+ #include <linux/uaccess.h>
+ #include <linux/slab.h>
+ #include <linux/err.h>
+-#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_all() */
++#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_mappings() */
+ #include <wrapper/ringbuffer/vfs.h>
+ #include <wrapper/ringbuffer/backend.h>
+ #include <wrapper/ringbuffer/frontend.h>
+@@ -1938,7 +1938,7 @@ int __init lttng_abi_init(void)
+ {
+ int ret = 0;
+
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ lttng_clock_ref();
+
+ ret = lttng_tp_mempool_init();
+diff --git a/lttng-context-callstack.c b/lttng-context-callstack.c
+index 195990a6..ba35a394 100644
+--- a/lttng-context-callstack.c
++++ b/lttng-context-callstack.c
+@@ -141,7 +141,7 @@ int __lttng_add_callstack_generic(struct lttng_ctx **ctx,
+ field->record = lttng_callstack_record;
+ field->priv = fdata;
+ field->destroy = lttng_callstack_destroy;
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+
+ error_create:
+diff --git a/lttng-context-cgroup-ns.c b/lttng-context-cgroup-ns.c
+index 81486e51..f324b7e7 100644
+--- a/lttng-context-cgroup-ns.c
++++ b/lttng-context-cgroup-ns.c
+@@ -97,7 +97,7 @@ int lttng_add_cgroup_ns_to_ctx(struct lttng_ctx **ctx)
+ field->record = cgroup_ns_record;
+ field->get_value = cgroup_ns_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_cgroup_ns_to_ctx);
+diff --git a/lttng-context-cpu-id.c b/lttng-context-cpu-id.c
+index 37782251..6e2f3f45 100644
+--- a/lttng-context-cpu-id.c
++++ b/lttng-context-cpu-id.c
+@@ -68,7 +68,7 @@ int lttng_add_cpu_id_to_ctx(struct lttng_ctx **ctx)
+ field->record = cpu_id_record;
+ field->get_value = cpu_id_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_cpu_id_to_ctx);
+diff --git a/lttng-context-egid.c b/lttng-context-egid.c
+index 51536e28..bdcebb98 100644
+--- a/lttng-context-egid.c
++++ b/lttng-context-egid.c
+@@ -70,7 +70,7 @@ int lttng_add_egid_to_ctx(struct lttng_ctx **ctx)
+ field->record = egid_record;
+ field->get_value = egid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_egid_to_ctx);
+diff --git a/lttng-context-euid.c b/lttng-context-euid.c
+index 1bcd53f6..c2b8dcd7 100644
+--- a/lttng-context-euid.c
++++ b/lttng-context-euid.c
+@@ -70,7 +70,7 @@ int lttng_add_euid_to_ctx(struct lttng_ctx **ctx)
+ field->record = euid_record;
+ field->get_value = euid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_euid_to_ctx);
+diff --git a/lttng-context-gid.c b/lttng-context-gid.c
+index da54207e..c355e8ca 100644
+--- a/lttng-context-gid.c
++++ b/lttng-context-gid.c
+@@ -70,7 +70,7 @@ int lttng_add_gid_to_ctx(struct lttng_ctx **ctx)
+ field->record = gid_record;
+ field->get_value = gid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_gid_to_ctx);
+diff --git a/lttng-context-hostname.c b/lttng-context-hostname.c
+index e485aa97..17dbd577 100644
+--- a/lttng-context-hostname.c
++++ b/lttng-context-hostname.c
+@@ -101,7 +101,7 @@ int lttng_add_hostname_to_ctx(struct lttng_ctx **ctx)
+ field->record = hostname_record;
+ field->get_value = hostname_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_hostname_to_ctx);
+diff --git a/lttng-context-interruptible.c b/lttng-context-interruptible.c
+index f3da1990..8bd279a3 100644
+--- a/lttng-context-interruptible.c
++++ b/lttng-context-interruptible.c
+@@ -75,7 +75,7 @@ int lttng_add_interruptible_to_ctx(struct lttng_ctx **ctx)
+ field->record = interruptible_record;
+ field->get_value = interruptible_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_interruptible_to_ctx);
+diff --git a/lttng-context-ipc-ns.c b/lttng-context-ipc-ns.c
+index 78d59660..40b901b4 100644
+--- a/lttng-context-ipc-ns.c
++++ b/lttng-context-ipc-ns.c
+@@ -96,7 +96,7 @@ int lttng_add_ipc_ns_to_ctx(struct lttng_ctx **ctx)
+ field->record = ipc_ns_record;
+ field->get_value = ipc_ns_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_ipc_ns_to_ctx);
+diff --git a/lttng-context-migratable.c b/lttng-context-migratable.c
+index e3d8ede5..65154b8b 100644
+--- a/lttng-context-migratable.c
++++ b/lttng-context-migratable.c
+@@ -68,7 +68,7 @@ int lttng_add_migratable_to_ctx(struct lttng_ctx **ctx)
+ field->record = migratable_record;
+ field->get_value = migratable_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_migratable_to_ctx);
+diff --git a/lttng-context-mnt-ns.c b/lttng-context-mnt-ns.c
+index b5bb955a..cb59776c 100644
+--- a/lttng-context-mnt-ns.c
++++ b/lttng-context-mnt-ns.c
+@@ -98,7 +98,7 @@ int lttng_add_mnt_ns_to_ctx(struct lttng_ctx **ctx)
+ field->record = mnt_ns_record;
+ field->get_value = mnt_ns_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_mnt_ns_to_ctx);
+diff --git a/lttng-context-need-reschedule.c b/lttng-context-need-reschedule.c
+index f29fb28d..94efaa5c 100644
+--- a/lttng-context-need-reschedule.c
++++ b/lttng-context-need-reschedule.c
+@@ -68,7 +68,7 @@ int lttng_add_need_reschedule_to_ctx(struct lttng_ctx **ctx)
+ field->record = need_reschedule_record;
+ field->get_value = need_reschedule_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_need_reschedule_to_ctx);
+diff --git a/lttng-context-net-ns.c b/lttng-context-net-ns.c
+index 6694037f..37de09f7 100644
+--- a/lttng-context-net-ns.c
++++ b/lttng-context-net-ns.c
+@@ -97,7 +97,7 @@ int lttng_add_net_ns_to_ctx(struct lttng_ctx **ctx)
+ field->record = net_ns_record;
+ field->get_value = net_ns_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_net_ns_to_ctx);
+diff --git a/lttng-context-nice.c b/lttng-context-nice.c
+index 563e8058..acaba855 100644
+--- a/lttng-context-nice.c
++++ b/lttng-context-nice.c
+@@ -68,7 +68,7 @@ int lttng_add_nice_to_ctx(struct lttng_ctx **ctx)
+ field->record = nice_record;
+ field->get_value = nice_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_nice_to_ctx);
+diff --git a/lttng-context-perf-counters.c b/lttng-context-perf-counters.c
+index 43c4077b..6b04d123 100644
+--- a/lttng-context-perf-counters.c
++++ b/lttng-context-perf-counters.c
+@@ -321,7 +321,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type,
+ field->u.perf_counter = perf_field;
+ lttng_context_update(*ctx);
+
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+diff --git a/lttng-context-pid-ns.c b/lttng-context-pid-ns.c
+index f039f260..ccf629d4 100644
+--- a/lttng-context-pid-ns.c
++++ b/lttng-context-pid-ns.c
+@@ -98,7 +98,7 @@ int lttng_add_pid_ns_to_ctx(struct lttng_ctx **ctx)
+ field->record = pid_ns_record;
+ field->get_value = pid_ns_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_pid_ns_to_ctx);
+diff --git a/lttng-context-pid.c b/lttng-context-pid.c
+index b3caabb4..326eabe8 100644
+--- a/lttng-context-pid.c
++++ b/lttng-context-pid.c
+@@ -68,7 +68,7 @@ int lttng_add_pid_to_ctx(struct lttng_ctx **ctx)
+ field->record = pid_record;
+ field->get_value = pid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_pid_to_ctx);
+diff --git a/lttng-context-ppid.c b/lttng-context-ppid.c
+index ef84ad11..ff25288f 100644
+--- a/lttng-context-ppid.c
++++ b/lttng-context-ppid.c
+@@ -90,7 +90,7 @@ int lttng_add_ppid_to_ctx(struct lttng_ctx **ctx)
+ field->record = ppid_record;
+ field->get_value = ppid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_ppid_to_ctx);
+diff --git a/lttng-context-preemptible.c b/lttng-context-preemptible.c
+index 328f2a43..867805b7 100644
+--- a/lttng-context-preemptible.c
++++ b/lttng-context-preemptible.c
+@@ -86,7 +86,7 @@ int lttng_add_preemptible_to_ctx(struct lttng_ctx **ctx)
+ field->record = preemptible_record;
+ field->get_value = preemptible_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_preemptible_to_ctx);
+diff --git a/lttng-context-prio.c b/lttng-context-prio.c
+index b5d21e7e..367f7bd6 100644
+--- a/lttng-context-prio.c
++++ b/lttng-context-prio.c
+@@ -89,7 +89,7 @@ int lttng_add_prio_to_ctx(struct lttng_ctx **ctx)
+ field->record = prio_record;
+ field->get_value = prio_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_prio_to_ctx);
+diff --git a/lttng-context-procname.c b/lttng-context-procname.c
+index 54007d15..8f18ca2c 100644
+--- a/lttng-context-procname.c
++++ b/lttng-context-procname.c
+@@ -72,7 +72,7 @@ int lttng_add_procname_to_ctx(struct lttng_ctx **ctx)
+ field->record = procname_record;
+ field->get_value = procname_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_procname_to_ctx);
+diff --git a/lttng-context-sgid.c b/lttng-context-sgid.c
+index 61c8d533..2a58cbd4 100644
+--- a/lttng-context-sgid.c
++++ b/lttng-context-sgid.c
+@@ -70,7 +70,7 @@ int lttng_add_sgid_to_ctx(struct lttng_ctx **ctx)
+ field->record = sgid_record;
+ field->get_value = sgid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_sgid_to_ctx);
+diff --git a/lttng-context-suid.c b/lttng-context-suid.c
+index 66d3ef5a..ab3e2a95 100644
+--- a/lttng-context-suid.c
++++ b/lttng-context-suid.c
+@@ -70,7 +70,7 @@ int lttng_add_suid_to_ctx(struct lttng_ctx **ctx)
+ field->record = suid_record;
+ field->get_value = suid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_suid_to_ctx);
+diff --git a/lttng-context-tid.c b/lttng-context-tid.c
+index d2a20e60..f6defc46 100644
+--- a/lttng-context-tid.c
++++ b/lttng-context-tid.c
+@@ -71,7 +71,7 @@ int lttng_add_tid_to_ctx(struct lttng_ctx **ctx)
+ field->record = tid_record;
+ field->get_value = tid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_tid_to_ctx);
+diff --git a/lttng-context-uid.c b/lttng-context-uid.c
+index 5f11de23..55938525 100644
+--- a/lttng-context-uid.c
++++ b/lttng-context-uid.c
+@@ -70,7 +70,7 @@ int lttng_add_uid_to_ctx(struct lttng_ctx **ctx)
+ field->record = uid_record;
+ field->get_value = uid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_uid_to_ctx);
+diff --git a/lttng-context-user-ns.c b/lttng-context-user-ns.c
+index 746e4d9d..0ed62e36 100644
+--- a/lttng-context-user-ns.c
++++ b/lttng-context-user-ns.c
+@@ -82,7 +82,7 @@ int lttng_add_user_ns_to_ctx(struct lttng_ctx **ctx)
+ field->record = user_ns_record;
+ field->get_value = user_ns_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_user_ns_to_ctx);
+diff --git a/lttng-context-uts-ns.c b/lttng-context-uts-ns.c
+index 7352a3df..283bc73e 100644
+--- a/lttng-context-uts-ns.c
++++ b/lttng-context-uts-ns.c
+@@ -96,7 +96,7 @@ int lttng_add_uts_ns_to_ctx(struct lttng_ctx **ctx)
+ field->record = uts_ns_record;
+ field->get_value = uts_ns_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_uts_ns_to_ctx);
+diff --git a/lttng-context-vegid.c b/lttng-context-vegid.c
+index 604da2a0..1431dacb 100644
+--- a/lttng-context-vegid.c
++++ b/lttng-context-vegid.c
+@@ -70,7 +70,7 @@ int lttng_add_vegid_to_ctx(struct lttng_ctx **ctx)
+ field->record = vegid_record;
+ field->get_value = vegid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_vegid_to_ctx);
+diff --git a/lttng-context-veuid.c b/lttng-context-veuid.c
+index 983ae6a3..a1b5b70e 100644
+--- a/lttng-context-veuid.c
++++ b/lttng-context-veuid.c
+@@ -70,7 +70,7 @@ int lttng_add_veuid_to_ctx(struct lttng_ctx **ctx)
+ field->record = veuid_record;
+ field->get_value = veuid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_veuid_to_ctx);
+diff --git a/lttng-context-vgid.c b/lttng-context-vgid.c
+index e08c77df..0eed24e1 100644
+--- a/lttng-context-vgid.c
++++ b/lttng-context-vgid.c
+@@ -70,7 +70,7 @@ int lttng_add_vgid_to_ctx(struct lttng_ctx **ctx)
+ field->record = vgid_record;
+ field->get_value = vgid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_vgid_to_ctx);
+diff --git a/lttng-context-vpid.c b/lttng-context-vpid.c
+index 982ce558..b5b6ce0a 100644
+--- a/lttng-context-vpid.c
++++ b/lttng-context-vpid.c
+@@ -83,7 +83,7 @@ int lttng_add_vpid_to_ctx(struct lttng_ctx **ctx)
+ field->record = vpid_record;
+ field->get_value = vpid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_vpid_to_ctx);
+diff --git a/lttng-context-vppid.c b/lttng-context-vppid.c
+index 66d63824..347ac634 100644
+--- a/lttng-context-vppid.c
++++ b/lttng-context-vppid.c
+@@ -112,7 +112,7 @@ int lttng_add_vppid_to_ctx(struct lttng_ctx **ctx)
+ field->record = vppid_record;
+ field->get_value = vppid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_vppid_to_ctx);
+diff --git a/lttng-context-vsgid.c b/lttng-context-vsgid.c
+index aca5eda0..3daf889a 100644
+--- a/lttng-context-vsgid.c
++++ b/lttng-context-vsgid.c
+@@ -70,7 +70,7 @@ int lttng_add_vsgid_to_ctx(struct lttng_ctx **ctx)
+ field->record = vsgid_record;
+ field->get_value = vsgid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_vsgid_to_ctx);
+diff --git a/lttng-context-vsuid.c b/lttng-context-vsuid.c
+index 66c1300c..d7fb0db4 100644
+--- a/lttng-context-vsuid.c
++++ b/lttng-context-vsuid.c
+@@ -70,7 +70,7 @@ int lttng_add_vsuid_to_ctx(struct lttng_ctx **ctx)
+ field->record = vsuid_record;
+ field->get_value = vsuid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_vsuid_to_ctx);
+diff --git a/lttng-context-vtid.c b/lttng-context-vtid.c
+index 8fd68a8c..e81ba0e2 100644
+--- a/lttng-context-vtid.c
++++ b/lttng-context-vtid.c
+@@ -83,7 +83,7 @@ int lttng_add_vtid_to_ctx(struct lttng_ctx **ctx)
+ field->record = vtid_record;
+ field->get_value = vtid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_vtid_to_ctx);
+diff --git a/lttng-context-vuid.c b/lttng-context-vuid.c
+index 6ae575f5..33e22d35 100644
+--- a/lttng-context-vuid.c
++++ b/lttng-context-vuid.c
+@@ -70,7 +70,7 @@ int lttng_add_vuid_to_ctx(struct lttng_ctx **ctx)
+ field->record = vuid_record;
+ field->get_value = vuid_get_value;
+ lttng_context_update(*ctx);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(lttng_add_vuid_to_ctx);
+diff --git a/lttng-context.c b/lttng-context.c
+index eb4534cb..a6d4ee6f 100644
+--- a/lttng-context.c
++++ b/lttng-context.c
+@@ -11,7 +11,7 @@
+ #include <linux/list.h>
+ #include <linux/mutex.h>
+ #include <linux/slab.h>
+-#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_all() */
++#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_mappings() */
+ #include <lttng-events.h>
+ #include <lttng-tracer.h>
+
+diff --git a/lttng-events.c b/lttng-events.c
+index 8e8e65a5..5a64f5b2 100644
+--- a/lttng-events.c
++++ b/lttng-events.c
+@@ -30,7 +30,7 @@
+ #include <linux/dmi.h>
+
+ #include <wrapper/uuid.h>
+-#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_all() */
++#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_mappings() */
+ #include <wrapper/random.h>
+ #include <wrapper/tracepoint.h>
+ #include <wrapper/list.h>
+@@ -2753,9 +2753,9 @@ end:
+ * Registers a transport which can be used as output to extract the data out
of
+ * LTTng. The module calling this registration function must ensure that no
+ * trap-inducing code will be executed by the transport functions. E.g.
+- * vmalloc_sync_all() must be called between a vmalloc and the moment the
memory
++ * vmalloc_sync_mappings() must be called between a vmalloc and the moment
the memory
+ * is made visible to the transport function. This registration acts as a
+- * vmalloc_sync_all. Therefore, only if the module allocates virtual memory
++ * vmalloc_sync_mappings. Therefore, only if the module allocates virtual
memory
+ * after its registration must it synchronize the TLBs.
+ */
+ void lttng_transport_register(struct lttng_transport *transport)
+@@ -2763,9 +2763,9 @@ void lttng_transport_register(struct lttng_transport
*transport)
+ /*
+ * Make sure no page fault can be triggered by the module about to be
+ * registered. We deal with this here so we don't have to call
+- * vmalloc_sync_all() in each module's init.
++ * vmalloc_sync_mappings() in each module's init.
+ */
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+
+ mutex_lock(&sessions_mutex);
+ list_add_tail(&transport->node, <tng_transport_list);
+diff --git a/lttng-ring-buffer-client.h b/lttng-ring-buffer-client.h
+index d5c512c5..ff628308 100644
+--- a/lttng-ring-buffer-client.h
++++ b/lttng-ring-buffer-client.h
+@@ -10,7 +10,7 @@
+ #include <linux/module.h>
+ #include <linux/types.h>
+ #include <lib/bitfield.h>
+-#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_all() */
++#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_mappings() */
+ #include <wrapper/trace-clock.h>
+ #include <lttng-events.h>
+ #include <lttng-tracer.h>
+@@ -766,7 +766,7 @@ static int __init lttng_ring_buffer_client_init(void)
+ * This vmalloc sync all also takes care of the lib ring buffer
+ * vmalloc'd module pages when it is built as a module into LTTng.
+ */
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ lttng_transport_register(<tng_relay_transport);
+ return 0;
+ }
+diff --git a/lttng-ring-buffer-metadata-client.h
b/lttng-ring-buffer-metadata-client.h
+index 17ffd759..a098b8d8 100644
+--- a/lttng-ring-buffer-metadata-client.h
++++ b/lttng-ring-buffer-metadata-client.h
+@@ -9,7 +9,7 @@
+
+ #include <linux/module.h>
+ #include <linux/types.h>
+-#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_all() */
++#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_mappings() */
+ #include <lttng-events.h>
+ #include <lttng-tracer.h>
+
+@@ -428,7 +428,7 @@ static int __init lttng_ring_buffer_client_init(void)
+ * This vmalloc sync all also takes care of the lib ring buffer
+ * vmalloc'd module pages when it is built as a module into LTTng.
+ */
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ lttng_transport_register(<tng_relay_transport);
+ return 0;
+ }
+diff --git a/lttng-syscalls.c b/lttng-syscalls.c
+index fb14f6b0..97f1ba94 100644
+--- a/lttng-syscalls.c
++++ b/lttng-syscalls.c
+@@ -760,7 +760,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 */
+diff --git a/probes/lttng-kprobes.c b/probes/lttng-kprobes.c
+index c0a15e47..a44eaa11 100644
+--- a/probes/lttng-kprobes.c
++++ b/probes/lttng-kprobes.c
+@@ -132,7 +132,7 @@ int lttng_kprobes_register(const char *name,
+ * Well.. kprobes itself puts the page fault handler on the blacklist,
+ * but we can never be too careful.
+ */
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+
+ ret = register_kprobe(&event->u.kprobe.kp);
+ if (ret)
+diff --git a/probes/lttng-kretprobes.c b/probes/lttng-kretprobes.c
+index 4b18d460..ab98ff22 100644
+--- a/probes/lttng-kretprobes.c
++++ b/probes/lttng-kretprobes.c
+@@ -221,7 +221,7 @@ int lttng_kretprobes_register(const char *name,
+ * Well.. kprobes itself puts the page fault handler on the blacklist,
+ * but we can never be too careful.
+ */
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+
+ ret = register_kretprobe(<tng_krp->krp);
+ if (ret)
+diff --git a/probes/lttng-tracepoint-event-impl.h
b/probes/lttng-tracepoint-event-impl.h
+index 321cdfa4..77b86389 100644
+--- a/probes/lttng-tracepoint-event-impl.h
++++ b/probes/lttng-tracepoint-event-impl.h
+@@ -15,7 +15,7 @@
+ #include <probes/lttng.h>
+ #include <probes/lttng-types.h>
+ #include <probes/lttng-probe-user.h>
+-#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_all() */
++#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_mappings() */
+ #include <wrapper/ringbuffer/frontend_types.h>
+ #include <wrapper/ringbuffer/backend.h>
+ #include <wrapper/rcu.h>
+@@ -1391,7 +1391,7 @@ static __used struct lttng_probe_desc
TP_ID(__probe_desc___, TRACE_SYSTEM) = {
+ #ifndef TP_MODULE_NOINIT
+ static int TP_ID(__lttng_events_init__, TRACE_SYSTEM)(void)
+ {
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ return lttng_probe_register(&TP_ID(__probe_desc___, TRACE_SYSTEM));
+ }
+
+diff --git a/probes/lttng-uprobes.c b/probes/lttng-uprobes.c
+index 64d8237c..bc101289 100644
+--- a/probes/lttng-uprobes.c
++++ b/probes/lttng-uprobes.c
+@@ -161,7 +161,7 @@ int lttng_uprobes_add_callsite(struct lttng_event *event,
+ }
+
+ /* Ensure the memory we just allocated don't trigger page faults. */
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+
+ uprobe_handler->event = event;
+ uprobe_handler->up_consumer.handler = lttng_uprobes_handler_pre;
+diff --git a/probes/lttng.c b/probes/lttng.c
+index 383202c6..05bc1388 100644
+--- a/probes/lttng.c
++++ b/probes/lttng.c
+@@ -116,7 +116,7 @@ int __init lttng_logger_init(void)
+ {
+ int ret = 0;
+
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+
+ /* /dev/lttng-logger */
+ ret = misc_register(&logger_dev);
+diff --git a/tests/probes/lttng-test.c b/tests/probes/lttng-test.c
+index e3476393..b450e7d7 100644
+--- a/tests/probes/lttng-test.c
++++ b/tests/probes/lttng-test.c
+@@ -97,7 +97,7 @@ int __init lttng_test_init(void)
+ int ret = 0;
+
+ (void) wrapper_lttng_fixup_sig(THIS_MODULE);
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ lttng_test_filter_event_dentry =
+ proc_create_data(LTTNG_TEST_FILTER_EVENT_FILE,
+ S_IRUGO | S_IWUGO, NULL,
+diff --git a/wrapper/vmalloc.h b/wrapper/vmalloc.h
+index 0c3eb86b..54715b57 100644
+--- a/wrapper/vmalloc.h
++++ b/wrapper/vmalloc.h
+@@ -21,8 +21,35 @@
+ #include <linux/kallsyms.h>
+ #include <wrapper/kallsyms.h>
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
++
++static inline
++void wrapper_vmalloc_sync_mappings(void)
++{
++ void (*vmalloc_sync_mappings_sym)(void);
++
++ vmalloc_sync_mappings_sym = (void *)
kallsyms_lookup_funcptr("vmalloc_sync_mappings");
++ if (vmalloc_sync_mappings_sym) {
++ vmalloc_sync_mappings_sym();
++ } else {
++#ifdef CONFIG_X86
++ /*
++ * Only x86 needs vmalloc_sync_mappings to make sure LTTng does
not
++ * trigger recursive page faults.
++ */
++ printk_once(KERN_WARNING "LTTng: vmalloc_sync_mappings symbol
lookup failed.\n");
++ printk_once(KERN_WARNING "Page fault handler and NMI tracing
might trigger faults.\n");
++#endif
++ }
++}
++
++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
++
++/*
++ * Map vmalloc_sync_mappings to vmalloc_sync_all() on kernels before 5.7.
++ */
+ static inline
+-void wrapper_vmalloc_sync_all(void)
++void wrapper_vmalloc_sync_mappings(void)
+ {
+ void (*vmalloc_sync_all_sym)(void);
+
+@@ -40,13 +67,29 @@ void wrapper_vmalloc_sync_all(void)
+ #endif
+ }
+ }
++
++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
++
+ #else
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
++
++static inline
++void wrapper_vmalloc_sync_mappings(void)
++{
++ return vmalloc_sync_mappings();
++}
++
++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
++
+ static inline
+-void wrapper_vmalloc_sync_all(void)
++void wrapper_vmalloc_sync_mappings(void)
+ {
+ return vmalloc_sync_all();
+ }
++
++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
++
+ #endif
+
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
+@@ -61,7 +104,7 @@ void *lttng_kvmalloc_node(unsigned long size, gfp_t flags,
int node)
+ * Make sure we don't trigger recursive page faults in the
+ * tracing fast path.
+ */
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ }
+ return ret;
+ }
+--
+2.25.1
+
diff -Nru
lttng-modules-2.12.0/debian/patches/0007-Fix-missing-wrapper-rename-to-wrapper_vmalloc_sync_m.patch
lttng-modules-2.12.0/debian/patches/0007-Fix-missing-wrapper-rename-to-wrapper_vmalloc_sync_m.patch
---
lttng-modules-2.12.0/debian/patches/0007-Fix-missing-wrapper-rename-to-wrapper_vmalloc_sync_m.patch
1970-01-01 00:00:00.000000000 +0000
+++
lttng-modules-2.12.0/debian/patches/0007-Fix-missing-wrapper-rename-to-wrapper_vmalloc_sync_m.patch
2020-05-14 14:25:14.000000000 +0000
@@ -0,0 +1,31 @@
+From 402e8daf4f5099da566334e4eafd5eec741d83d0 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <[email protected]>
+Date: Wed, 6 May 2020 11:03:32 -0400
+Subject: [PATCH 7/8] Fix: missing wrapper rename to
+ wrapper_vmalloc_sync_mappings
+
+Signed-off-by: Michael Jeanson <[email protected]>
+Signed-off-by: Mathieu Desnoyers <[email protected]>
+Change-Id: Idf7082a980c5a604bfef5c69906678b5083a9bbf
+(cherry picked from commit 4d1817c129310945bf0b8227ebc0fbb4f6299dc7)
+Signed-off-by: Paolo Pisati <[email protected]>
+---
+ wrapper/vmalloc.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/wrapper/vmalloc.h b/wrapper/vmalloc.h
+index 54715b57..5d0b3898 100644
+--- a/wrapper/vmalloc.h
++++ b/wrapper/vmalloc.h
+@@ -216,7 +216,7 @@ void *lttng_kvmalloc_node(unsigned long size, gfp_t flags,
int node)
+ * Make sure we don't trigger recursive page faults in the
+ * tracing fast path.
+ */
+- wrapper_vmalloc_sync_all();
++ wrapper_vmalloc_sync_mappings();
+ }
+ return ret;
+ }
+--
+2.25.1
+
diff -Nru
lttng-modules-2.12.0/debian/patches/0008-fix-add-missing-guid_t-type-to-wrapper.patch
lttng-modules-2.12.0/debian/patches/0008-fix-add-missing-guid_t-type-to-wrapper.patch
---
lttng-modules-2.12.0/debian/patches/0008-fix-add-missing-guid_t-type-to-wrapper.patch
1970-01-01 00:00:00.000000000 +0000
+++
lttng-modules-2.12.0/debian/patches/0008-fix-add-missing-guid_t-type-to-wrapper.patch
2020-05-14 14:25:14.000000000 +0000
@@ -0,0 +1,31 @@
+From ebfeba480a82fbd3448629c5b5a27eca7d509564 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <[email protected]>
+Date: Wed, 6 May 2020 11:11:29 -0400
+Subject: [PATCH 8/8] fix: add missing guid_t type to wrapper
+
+Signed-off-by: Michael Jeanson <[email protected]>
+Signed-off-by: Mathieu Desnoyers <[email protected]>
+Change-Id: I0de39c24a7925b580fabbdaa12dbe05c43cfcd98
+(cherry picked from commit d61b5f8337e30bb7601b4ca686fb904bfdb17ed7)
+Signed-off-by: Paolo Pisati <[email protected]>
+---
+ wrapper/uuid.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/wrapper/uuid.h b/wrapper/uuid.h
+index 74946e23..d8ac53d3 100644
+--- a/wrapper/uuid.h
++++ b/wrapper/uuid.h
+@@ -18,6 +18,9 @@ void lttng_guid_gen(guid_t *u)
+ return guid_gen(u);
+ }
+ #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
++
++typedef uuid_le guid_t;
++
+ static inline
+ void lttng_guid_gen(guid_t *u)
+ {
+--
+2.25.1
+
diff -Nru lttng-modules-2.12.0/debian/patches/series
lttng-modules-2.12.0/debian/patches/series
--- lttng-modules-2.12.0/debian/patches/series 2019-09-17 18:08:02.000000000
+0000
+++ lttng-modules-2.12.0/debian/patches/series 2020-05-14 14:25:14.000000000
+0000
@@ -1 +1,9 @@
fix-linux-rt-4.9-sched.patch
+0001-instrumentation-update-mm_vmscan-for-kernel-5.7.0.patch
+0002-instrumentation-update-x86-kvm-instrumentation-for-k.patch
+0003-Introduce-lttng_guid_gen-wrapper-for-kernels-5.7.0.patch
+0004-Move-lttng-wrappers-into-own-module.patch
+0005-Unbreak-LTTng-for-kernel-5.7.patch
+0006-Update-for-kernel-5.7-use-vmalloc_sync_mappings-on-k.patch
+0007-Fix-missing-wrapper-rename-to-wrapper_vmalloc_sync_m.patch
+0008-fix-add-missing-guid_t-type-to-wrapper.patch
--- End Message ---