summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-kernel
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-kernel')
-rw-r--r--poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.11.bb (renamed from poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.10.bb)0
-rw-r--r--poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.11.bb (renamed from poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb)5
-rw-r--r--poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.11.bb (renamed from poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.10.bb)0
-rw-r--r--poky/meta/recipes-kernel/cryptodev/cryptodev.inc2
-rw-r--r--poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb2
-rw-r--r--poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-Fix-build-with-fno-common.patch78
-rw-r--r--poky/meta/recipes-kernel/kexec/kexec-tools_2.0.20.bb1
-rw-r--r--poky/meta/recipes-kernel/kmod/kmod.inc9
-rw-r--r--poky/meta/recipes-kernel/kmod/kmod/0001-build-Stop-using-dolt.patch28
-rw-r--r--poky/meta/recipes-kernel/kmod/kmod_git.bb2
-rw-r--r--poky/meta/recipes-kernel/linux-firmware/linux-firmware_20200817.bb (renamed from poky/meta/recipes-kernel/linux-firmware/linux-firmware_20200421.bb)29
-rw-r--r--poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc20
-rw-r--r--poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch10
-rw-r--r--poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.8.bb (renamed from poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.4.bb)6
-rw-r--r--poky/meta/recipes-kernel/linux/kernel-devsrc.bb22
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto-dev.bb4
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb8
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto-rt_5.8.bb44
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb8
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.8.bb32
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto.inc2
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto_5.4.bb28
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto_5.8.bb55
-rw-r--r--poky/meta/recipes-kernel/lttng/babeltrace2/0001-fs.c-initialize-other_entry.patch33
-rw-r--r--poky/meta/recipes-kernel/lttng/babeltrace2_2.0.3.bb (renamed from poky/meta/recipes-kernel/lttng/babeltrace2_2.0.2.bb)11
-rw-r--r--poky/meta/recipes-kernel/lttng/babeltrace_1.5.8.bb2
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0001-Kconfig-fix-dependency-issue-when-building-in-tree-w.patch54
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0001-Update-for-kernel-5.7-use-vmalloc_sync_mappings-on-k.patch853
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-missing-wrapper-rename-to-wrapper_vmalloc_sync_m.patch32
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0002-fix-Move-mmutrace.h-into-the-mmu-sub-directory-v5.9.patch41
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-Use-vmalloc_sync_mappings-on-kernel-5.6-as-well.patch88
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-KVM-x86-mmu-Make-kvm_mmu_page-definition-and-acc.patch39
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0004-Update-Use-vmalloc_sync_mappings-for-stable-kernels.patch67
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0004-fix-ext4-limit-the-length-of-per-inode-prealloc-list.patch84
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0005-fix-ext4-indicate-via-a-block-bitmap-read-is-prefetc.patch63
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0006-fix-removal-of-smp_-read_barrier_depends-v5.9.patch391
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0007-fix-writeback-Drop-I_DIRTY_TIME_EXPIRE-v5.9.patch59
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0008-fix-writeback-Fix-sync-livelock-due-to-b_dirty_time-.patch117
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0009-fix-version-ranges-for-ext4_discard_preallocations-a.patch52
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0010-Fix-system-call-filter-table.patch918
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules_2.12.2.bb (renamed from poky/meta/recipes-kernel/lttng/lttng-modules_2.12.0.bb)23
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-platforms.inc17
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-tools/0001-tests-gen-ust-events-ns-tp.h-Fix-build-with-musl-lib.patch43
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb (renamed from poky/meta/recipes-kernel/lttng/lttng-tools_2.12.0.bb)12
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb2
-rw-r--r--poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb9
-rw-r--r--poky/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb2
-rw-r--r--poky/meta/recipes-kernel/perf/perf.bb6
-rw-r--r--poky/meta/recipes-kernel/powertop/powertop_2.13.bb (renamed from poky/meta/recipes-kernel/powertop/powertop_2.10.bb)7
-rw-r--r--poky/meta/recipes-kernel/systemtap/systemtap_git.inc4
50 files changed, 2199 insertions, 1225 deletions
diff --git a/poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.10.bb b/poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.11.bb
index c55577c66..c55577c66 100644
--- a/poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.10.bb
+++ b/poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.11.bb
diff --git a/poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb b/poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.11.bb
index 552eb6aba..b3b554c7d 100644
--- a/poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.10.bb
+++ b/poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.11.bb
@@ -7,9 +7,8 @@ inherit module
# Header file provided by a separate package
DEPENDS += "cryptodev-linux"
-SRC_URI += " \
-file://0001-Disable-installing-header-file-provided-by-another-p.patch \
-"
+SRC_URI += "file://0001-Disable-installing-header-file-provided-by-another-p.patch \
+ "
EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
diff --git a/poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.10.bb b/poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.11.bb
index 9cb5dcb94..9cb5dcb94 100644
--- a/poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.10.bb
+++ b/poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.11.bb
diff --git a/poky/meta/recipes-kernel/cryptodev/cryptodev.inc b/poky/meta/recipes-kernel/cryptodev/cryptodev.inc
index f99f8bc9f..c050eda49 100644
--- a/poky/meta/recipes-kernel/cryptodev/cryptodev.inc
+++ b/poky/meta/recipes-kernel/cryptodev/cryptodev.inc
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "git://github.com/cryptodev-linux/cryptodev-linux \
"
-SRCREV = "a87053bee5680878c295b7d23cf0d7065576ac2b"
+SRCREV = "fabe5989a3dc9fba0cd0a40b612247cdde351c01"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 4f1af731d..ea33732a3 100644
--- a/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://tools/kgit;beginline=5;endline=9;md5=9c30e971d435e249
DEPENDS = "git-native"
-SRCREV = "c66833e1caac25279a5052fceb13213f5e4f79f9"
+SRCREV = "df4390b18a500a1a7d4695e1856971f8e36ce517"
PR = "r12"
PV = "0.2+git${SRCPV}"
diff --git a/poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-Fix-build-with-fno-common.patch b/poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-Fix-build-with-fno-common.patch
new file mode 100644
index 000000000..31f4d00b5
--- /dev/null
+++ b/poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-Fix-build-with-fno-common.patch
@@ -0,0 +1,78 @@
+From c5fec6d6368b4103557deb710150119dca438544 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 5 Aug 2020 10:46:39 -0700
+Subject: [PATCH] kexec: Fix build with -fno-common
+
+Ensure that my_debug is not doubly defined
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ kexec/arch/ppc64/kexec-elf-ppc64.c | 2 --
+ kexec/fs2dt.h | 2 +-
+ 2 files changed, 1 insertion(+), 3 deletions(-)
+
+--- a/kexec/arch/ppc64/kexec-elf-ppc64.c
++++ b/kexec/arch/ppc64/kexec-elf-ppc64.c
+@@ -44,8 +44,6 @@
+ uint64_t initrd_base, initrd_size;
+ unsigned char reuse_initrd = 0;
+ const char *ramdisk;
+-/* Used for enabling printing message from purgatory code */
+-int my_debug = 0;
+
+ int elf_ppc64_probe(const char *buf, off_t len)
+ {
+--- a/kexec/fs2dt.h
++++ b/kexec/fs2dt.h
+@@ -30,7 +30,7 @@ extern struct bootblock bb[1];
+
+ /* Used for enabling printing message from purgatory code
+ * Only has implemented for PPC64 */
+-int my_debug;
++extern int my_debug;
+ extern int dt_no_old_root;
+
+ void reserve(unsigned long long where, unsigned long long length);
+--- a/kexec/arch/arm64/kexec-arm64.h
++++ b/kexec/arch/arm64/kexec-arm64.h
+@@ -50,8 +50,8 @@ int zImage_arm64_load(int argc, char **a
+ void zImage_arm64_usage(void);
+
+
+-off_t initrd_base;
+-off_t initrd_size;
++extern off_t initrd_base;
++extern off_t initrd_size;
+
+ /**
+ * struct arm64_mem - Memory layout info.
+@@ -65,7 +65,7 @@ struct arm64_mem {
+ };
+
+ #define arm64_mem_ngv UINT64_MAX
+-struct arm64_mem arm64_mem;
++extern struct arm64_mem arm64_mem;
+
+ uint64_t get_phys_offset(void);
+ uint64_t get_vp_offset(void);
+--- a/kexec/arch/x86_64/kexec-bzImage64.c
++++ b/kexec/arch/x86_64/kexec-bzImage64.c
+@@ -42,7 +42,6 @@
+ #include <arch/options.h>
+
+ static const int probe_debug = 0;
+-int bzImage_support_efi_boot;
+
+ int bzImage64_probe(const char *buf, off_t len)
+ {
+--- a/kexec/arch/ppc/kexec-elf-ppc.c
++++ b/kexec/arch/ppc/kexec-elf-ppc.c
+@@ -33,7 +33,6 @@
+ static const int probe_debug = 0;
+
+ unsigned char reuse_initrd;
+-const char *ramdisk;
+ int create_flatten_tree(struct kexec_info *, unsigned char **, unsigned long *,
+ char *);
+
diff --git a/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.20.bb b/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.20.bb
index 871b36440..1e81ecc2c 100644
--- a/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.20.bb
+++ b/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.20.bb
@@ -20,6 +20,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
file://0005-Disable-PIE-during-link.patch \
file://0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch \
file://0007-kexec-un-break-the-build-on-32-bit-x86.patch \
+ file://0001-kexec-Fix-build-with-fno-common.patch \
"
SRC_URI[md5sum] = "46724b67f32501c5d3e778161347cad9"
diff --git a/poky/meta/recipes-kernel/kmod/kmod.inc b/poky/meta/recipes-kernel/kmod/kmod.inc
index 334453838..edff19170 100644
--- a/poky/meta/recipes-kernel/kmod/kmod.inc
+++ b/poky/meta/recipes-kernel/kmod/kmod.inc
@@ -14,15 +14,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
"
inherit autotools gtk-doc pkgconfig manpages
-SRCREV = "58133a96c894c043e48c74ddf0bfe8db90bac62f"
+SRCREV = "819a125ca756003dce2d11624035b7fb605a8e99"
# Lookout for PV bump too when SRCREV is changed
-PV = "26"
+PV = "27"
SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
file://depmod-search.conf \
- file://0001-build-Stop-using-dolt.patch \
file://avoid_parallel_tests.patch \
- "
+ "
S = "${WORKDIR}/git"
@@ -32,5 +31,7 @@ EXTRA_OECONF +=" --enable-tools --with-zlib"
PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
PACKAGECONFIG[logging] = " --enable-logging,--disable-logging"
PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native"
+PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz"
+PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
GTKDOC_DOCDIR = "${S}/libkmod/docs"
diff --git a/poky/meta/recipes-kernel/kmod/kmod/0001-build-Stop-using-dolt.patch b/poky/meta/recipes-kernel/kmod/kmod/0001-build-Stop-using-dolt.patch
deleted file mode 100644
index c915ad5e8..000000000
--- a/poky/meta/recipes-kernel/kmod/kmod/0001-build-Stop-using-dolt.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From f8b8d7b330433511d19a936ddfc7b7d1af5490b5 Mon Sep 17 00:00:00 2001
-From: Adrian Bunk <bunk@kernel.org>
-Date: Wed, 20 Feb 2019 14:22:04 +0200
-Subject: build: Stop using dolt
-
-This does regress "make -12" from 0.7s to 0.9s on my
-Coffee Lake machine, but even on slower hardware this
-will not amount to a noticable slowdown.
-
-On the other hand using dolt can create problems for
-people doing cross-compilation, e.g. Yocto has two
-hacks just for dolt in kmod:
-https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/kmod/kmod.inc?id=a17abae00785c76cfffe5381a22fb2c86b982e82
-
-Signed-off-by: Adrian Bunk <bunk@kernel.org>
-Upstream-Status: Backport
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -17,7 +17,6 @@ AM_MAINTAINER_MODE([enable])
- AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules tar-pax no-dist-gzip dist-xz subdir-objects color-tests parallel-tests])
- AM_SILENT_RULES([yes])
- LT_INIT([disable-static pic-only])
--DOLT
-
- AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by kmod])])
- AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by kmod])])
-
diff --git a/poky/meta/recipes-kernel/kmod/kmod_git.bb b/poky/meta/recipes-kernel/kmod/kmod_git.bb
index bd21d2ff7..4f2b037f2 100644
--- a/poky/meta/recipes-kernel/kmod/kmod_git.bb
+++ b/poky/meta/recipes-kernel/kmod/kmod_git.bb
@@ -58,3 +58,5 @@ PACKAGES =+ "libkmod"
FILES_libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}"
FILES_${PN} += "${base_libdir}/depmod.d ${base_libdir}/modprobe.d"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20200421.bb b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20200817.bb
index fa0507a88..ffeb8e692 100644
--- a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20200421.bb
+++ b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20200817.bb
@@ -26,6 +26,7 @@ LICENSE = "\
& Firmware-i2400m \
& Firmware-i915 \
& Firmware-ibt_firmware \
+ & Firmware-ice \
& Firmware-it913x \
& Firmware-iwlwifi_firmware \
& Firmware-IntcSST2 \
@@ -125,7 +126,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \
file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \
- file://WHENCE;md5=cb9a66eff0464b55335d3a7374fbc51c \
+ file://WHENCE;md5=4d229f79f8770b5b2c4aac655b9fabef \
"
# These are not common licenses, set NO_GENERIC_LICENSE for them
@@ -155,6 +156,7 @@ NO_GENERIC_LICENSE[Firmware-hfi1_firmware] = "LICENSE.hfi1_firmware"
NO_GENERIC_LICENSE[Firmware-i2400m] = "LICENCE.i2400m"
NO_GENERIC_LICENSE[Firmware-i915] = "LICENSE.i915"
NO_GENERIC_LICENSE[Firmware-ibt_firmware] = "LICENCE.ibt_firmware"
+NO_GENERIC_LICENSE[Firmware-ice] = "LICENSE.ice"
NO_GENERIC_LICENSE[Firmware-IntcSST2] = "LICENCE.IntcSST2"
NO_GENERIC_LICENSE[Firmware-it913x] = "LICENCE.it913x"
NO_GENERIC_LICENSE[Firmware-iwlwifi_firmware] = "LICENCE.iwlwifi_firmware"
@@ -196,8 +198,7 @@ PE = "1"
SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/firmware/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "229a93395f4033da68429f165a62b952"
-SRC_URI[sha256sum] = "6dd7cba25d694c031f65529b9027cc8faaffaddfae70a4e3b58c2e4a0af3bfa8"
+SRC_URI[sha256sum] = "76d05d5f1eff268d3b80675245fa596f557bd55ee2e16ddd54d18ffeae943887"
inherit allarch
@@ -277,17 +278,20 @@ PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \
${PN}-iwlwifi-7265d ${PN}-iwlwifi-8000c ${PN}-iwlwifi-8265 \
${PN}-iwlwifi-9000 \
${PN}-iwlwifi-misc \
- ${PN}-ibt-license ${PN}-ibt ${PN}-ibt-misc \
+ ${PN}-ibt-license ${PN}-ibt \
${PN}-ibt-11-5 ${PN}-ibt-12-16 ${PN}-ibt-hw-37-7 ${PN}-ibt-hw-37-8 \
${PN}-ibt-17 \
+ ${PN}-ibt-20 \
+ ${PN}-ibt-misc \
${PN}-i915-license ${PN}-i915 \
+ ${PN}-ice-license ${PN}-ice \
${PN}-adsp-sst-license ${PN}-adsp-sst \
${PN}-bnx2-mips \
${PN}-liquidio \
${PN}-netronome-license ${PN}-netronome \
${PN}-qat ${PN}-qat-license \
${PN}-qcom-license \
- ${PN}-qcom-venus-1.8 ${PN}-qcom-venus-4.2 \
+ ${PN}-qcom-venus-1.8 ${PN}-qcom-venus-4.2 ${PN}-qcom-venus-5.2 ${PN}-qcom-venus-5.4 \
${PN}-qcom-adreno-a3xx ${PN}-qcom-adreno-a530 ${PN}-qcom-adreno-a630 \
${PN}-qcom-sdm845-audio ${PN}-qcom-sdm845-compute ${PN}-qcom-sdm845-modem \
${PN}-whence-license \
@@ -803,6 +807,7 @@ LICENSE_${PN}-ibt-hw-37-8 = "Firmware-ibt_firmware"
LICENSE_${PN}-ibt-11-5 = "Firmware-ibt_firmware"
LICENSE_${PN}-ibt-12-16 = "Firmware-ibt_firmware"
LICENSE_${PN}-ibt-17 = "Firmware-ibt_firmware"
+LICENSE_${PN}-ibt-20 = "Firmware-ibt_firmware"
LICENSE_${PN}-ibt-misc = "Firmware-ibt_firmware"
FILES_${PN}-ibt-license = "${nonarch_base_libdir}/firmware/LICENCE.ibt_firmware"
@@ -811,13 +816,15 @@ FILES_${PN}-ibt-hw-37-8 = "${nonarch_base_libdir}/firmware/intel/ibt-hw-37.8*.bs
FILES_${PN}-ibt-11-5 = "${nonarch_base_libdir}/firmware/intel/ibt-11-5.sfi ${nonarch_base_libdir}/firmware/intel/ibt-11-5.ddc"
FILES_${PN}-ibt-12-16 = "${nonarch_base_libdir}/firmware/intel/ibt-12-16.sfi ${nonarch_base_libdir}/firmware/intel/ibt-12-16.ddc"
FILES_${PN}-ibt-17 = "${nonarch_base_libdir}/firmware/intel/ibt-17-*.sfi ${nonarch_base_libdir}/firmware/intel/ibt-17-*.ddc"
-FILES_${PN}-ibt-misc = "${nonarch_base_libdir}/firmware/ibt-*"
+FILES_${PN}-ibt-20 = "${nonarch_base_libdir}/firmware/intel/ibt-20-*.sfi ${nonarch_base_libdir}/firmware/intel/ibt-20-*.ddc"
+FILES_${PN}-ibt-misc = "${nonarch_base_libdir}/firmware/intel/ibt-*"
RDEPENDS_${PN}-ibt-hw-37-7 = "${PN}-ibt-license"
RDEPENDS_${PN}-ibt-hw-37.8 = "${PN}-ibt-license"
RDEPENDS_${PN}-ibt-11-5 = "${PN}-ibt-license"
RDEPENDS_${PN}-ibt-12-16 = "${PN}-ibt-license"
RDEPENDS_${PN}-ibt-17 = "${PN}-ibt-license"
+RDEPENDS_${PN}-ibt-20 = "${PN}-ibt-license"
RDEPENDS_${PN}-ibt-misc = "${PN}-ibt-license"
ALLOW_EMPTY_${PN}-ibt= "1"
@@ -829,6 +836,12 @@ FILES_${PN}-i915-license = "${nonarch_base_libdir}/firmware/LICENSE.i915"
FILES_${PN}-i915 = "${nonarch_base_libdir}/firmware/i915"
RDEPENDS_${PN}-i915 = "${PN}-i915-license"
+LICENSE_${PN}-ice = "Firmware-ice"
+LICENSE_${PN}-ice-license = "Firmware-ice"
+FILES_${PN}-ice-license = "${nonarch_base_libdir}/firmware/LICENSE.ice"
+FILES_${PN}-ice = "${nonarch_base_libdir}/firmware/intel/ice"
+RDEPENDS_${PN}-ice = "${PN}-ice-license"
+
FILES_${PN}-adsp-sst-license = "${nonarch_base_libdir}/firmware/LICENCE.adsp_sst"
LICENSE_${PN}-adsp-sst = "Firmware-adsp_sst"
LICENSE_${PN}-adsp-sst-license = "Firmware-adsp_sst"
@@ -847,6 +860,8 @@ LICENSE_${PN}-qcom-license = "Firmware-qcom"
FILES_${PN}-qcom-license = "${nonarch_base_libdir}/firmware/LICENSE.qcom ${nonarch_base_libdir}/firmware/qcom/NOTICE.txt"
FILES_${PN}-qcom-venus-1.8 = "${nonarch_base_libdir}/firmware/qcom/venus-1.8/*"
FILES_${PN}-qcom-venus-4.2 = "${nonarch_base_libdir}/firmware/qcom/venus-4.2/*"
+FILES_${PN}-qcom-venus-5.2 = "${nonarch_base_libdir}/firmware/qcom/venus-5.2/*"
+FILES_${PN}-qcom-venus-5.4 = "${nonarch_base_libdir}/firmware/qcom/venus-5.4/*"
FILES_${PN}-qcom-adreno-a3xx = "${nonarch_base_libdir}/firmware/qcom/a300_*.fw ${nonarch_base_libdir}/firmware/a300_*.fw"
FILES_${PN}-qcom-adreno-a530 = "${nonarch_base_libdir}/firmware/qcom/a530*.*"
FILES_${PN}-qcom-adreno-a630 = "${nonarch_base_libdir}/firmware/qcom/a630*.* ${nonarch_base_libdir}/firmware/qcom/sdm845/a630*.*"
@@ -855,6 +870,8 @@ FILES_${PN}-qcom-sdm845-compute = "${nonarch_base_libdir}/firmware/qcom/sdm845/c
FILES_${PN}-qcom-sdm845-modem = "${nonarch_base_libdir}/firmware/qcom/sdm845/mba.mbn ${nonarch_base_libdir}/firmware/qcom/sdm845/modem*.* ${nonarch_base_libdir}/firmware/qcom/sdm845/wlanmdsp.mbn"
RDEPENDS_${PN}-qcom-venus-1.8 = "${PN}-qcom-license"
RDEPENDS_${PN}-qcom-venus-4.2 = "${PN}-qcom-license"
+RDEPENDS_${PN}-qcom-venus-5.2 = "${PN}-qcom-license"
+RDEPENDS_${PN}-qcom-venus-5.4 = "${PN}-qcom-license"
RDEPENDS_${PN}-qcom-adreno-a3xx = "${PN}-qcom-license"
RDEPENDS_${PN}-qcom-adreno-a530 = "${PN}-qcom-license"
RDEPENDS_${PN}-qcom-adreno-a630 = "${PN}-qcom-license"
diff --git a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
index 4481aa430..3bceac40c 100644
--- a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -16,7 +16,7 @@ LICENSE = "GPLv2"
# and have a machine specific libc.
#
# But you have some kernel headers you need for some driver? That is fine
-# but get them from STAGING_KERNEL_DIR where the kernel installs itself.
+# but get them from STAGING_KERNEL_BUILDDIR where the kernel installs itself.
# This will make the package using them machine specific but this is much
# better than having a machine specific C library. This does mean your
# recipe needs a
@@ -30,7 +30,9 @@ LICENSE = "GPLv2"
#
# -- RP
-LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
+LIC_FILES_CHKSUM ?= "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
+
+RECIPE_NO_UPDATE_REASON = "Recipe is updated through a separate process"
python __anonymous () {
major = d.getVar("PV").split('.')[0]
@@ -44,6 +46,9 @@ python __anonymous () {
d.setVar("HEADER_FETCH_VER", "2.6")
}
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2).split('.')[0]}"
+MIN_VER = "${@oe.utils.trim_version("${PV}", 2).split('.')[1]}"
+
inherit kernel-arch pkgconfig multilib_header
KORG_ARCHIVE_COMPRESSION ?= "xz"
@@ -81,7 +86,16 @@ do_install_append_armeb () {
}
do_install_armmultilib () {
- oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h asm/fcntl.h asm/hwcap.h asm/ioctls.h asm/kvm.h asm/kvm_para.h asm/mman.h asm/param.h asm/perf_regs.h asm/bpf_perf_event.h
+ if [ ${MAJ_VER} -gt 5 ]; then
+ ARM_KVM_HEADER=""
+ else
+ if [ ${MAJ_VER} -eq 5 ] && [ ${MIN_VER} -ge 8 ]; then
+ ARM_KVM_HEADER=""
+ else
+ ARM_KVM_HEADER="asm/kvm.h"
+ fi
+ fi
+ oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h asm/fcntl.h asm/hwcap.h asm/ioctls.h $ARM_KVM_HEADER asm/kvm_para.h asm/mman.h asm/param.h asm/perf_regs.h asm/bpf_perf_event.h
oe_multilib_header asm/posix_types.h asm/ptrace.h asm/setup.h asm/sigcontext.h asm/siginfo.h asm/signal.h asm/stat.h asm/statfs.h asm/swab.h asm/types.h asm/unistd.h
}
diff --git a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch
index 9d17daa70..5b7c1b6e2 100644
--- a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch
+++ b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch
@@ -1,4 +1,4 @@
-From 9708dc74d9f49488d669e070982f6224a888d61a Mon Sep 17 00:00:00 2001
+From dc221138c809125dc1bbff8506c70cb7bd846368 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 12 Sep 2018 17:08:58 -0700
Subject: [PATCH] include linux/stddef.h in swab.h uapi header
@@ -23,12 +23,13 @@ Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
+
---
include/uapi/linux/swab.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
-index 23cd84868cc3..acddbe50a20d 100644
+index 7272f85d6..2912fe463 100644
--- a/include/uapi/linux/swab.h
+++ b/include/uapi/linux/swab.h
@@ -3,6 +3,7 @@
@@ -37,8 +38,5 @@ index 23cd84868cc3..acddbe50a20d 100644
#include <linux/types.h>
+#include <linux/stddef.h>
#include <linux/compiler.h>
+ #include <asm/bitsperlong.h>
#include <asm/swab.h>
-
---
-2.19.0
-
diff --git a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.4.bb b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.8.bb
index 8a12103ee..d76a8a36f 100644
--- a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.4.bb
+++ b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.8.bb
@@ -12,5 +12,7 @@ SRC_URI_append = "\
file://0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch \
"
-SRC_URI[md5sum] = "ce9b2d974d27408a61c53a30d3f98fb9"
-SRC_URI[sha256sum] = "bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+
+SRC_URI[md5sum] = "0e5c4c15266218ef26c50fac0016095b"
+SRC_URI[sha256sum] = "e7f75186aa0642114af8f19d99559937300ca27acaf7451b36d4f9b0f85cf1f5"
diff --git a/poky/meta/recipes-kernel/linux/kernel-devsrc.bb b/poky/meta/recipes-kernel/linux/kernel-devsrc.bb
index 5940cc90e..aa8e162f4 100644
--- a/poky/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/poky/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -108,6 +108,11 @@ do_install() {
fi
cp -a include $kerneldir/build/include
+
+ # we don't usually copy generated files, since they can be rebuilt on the target,
+ # but without this file, we get a forced syncconfig run in v5.8+, which prompts and
+ # breaks workflows.
+ cp -a --parents include/generated/autoconf.h $kerneldir/build 2>/dev/null || :
)
# now grab the chunks from the source tree that we need
@@ -249,6 +254,21 @@ do_install() {
# Copy .config to include/config/auto.conf so "make prepare" is unnecessary.
cp $kerneldir/build/.config $kerneldir/build/include/config/auto.conf
+ # make sure these are at least as old as the .config, or rebuilds will trigger
+ touch -r $kerneldir/build/.config $kerneldir/build/include/generated/autoconf.h 2>/dev/null || :
+ touch -r $kerneldir/build/.config $kerneldir/build/include/config/auto.conf* 2>/dev/null || :
+
+ if [ -e "$kerneldir/build/include/config/auto.conf.cmd" ]; then
+ sed -i 's/ifneq "$(CC)" ".*-linux-.*gcc.*$/ifneq "$(CC)" "gcc"/' "$kerneldir/build/include/config/auto.conf.cmd"
+ sed -i 's/ifneq "$(LD)" ".*-linux-.*ld.bfd.*$/ifneq "$(LD)" "ld"/' "$kerneldir/build/include/config/auto.conf.cmd"
+ sed -i 's/ifneq "$(HOSTCXX)" ".*$/ifneq "$(HOSTCXX)" "g++"/' "$kerneldir/build/include/config/auto.conf.cmd"
+ sed -i 's/ifneq "$(HOSTCC)" ".*$/ifneq "$(HOSTCC)" "gcc"/' "$kerneldir/build/include/config/auto.conf.cmd"
+ sed -i 's/ifneq "$(CC_VERSION_TEXT)".*\(gcc.*\)"/ifneq "$(CC_VERSION_TEXT)" "\1"/' "$kerneldir/build/include/config/auto.conf.cmd"
+ sed -i 's/ifneq "$(srctree)" ".*"/ifneq "$(srctree)" "."/' "$kerneldir/build/include/config/auto.conf.cmd"
+ # we don't build against the defconfig, so make sure it isn't the trigger for syncconfig
+ sed -i 's/ifneq "$(KBUILD_DEFCONFIG)".*"\(.*\)"/ifneq "\1" "\1"/' "$kerneldir/build/include/config/auto.conf.cmd"
+ fi
+
# make the scripts python3 safe. We won't be running these, and if they are
# left as /usr/bin/python rootfs assembly will fail, since we only have python3
# in the RDEPENDS (and the python3 package does not include /usr/bin/python)
@@ -272,3 +292,5 @@ RDEPENDS_${PN} = "bc python3 flex bison ${TCLIBC}-utils"
RDEPENDS_${PN} += "openssl-dev util-linux"
# and x86 needs a bit more for 4.15+
RDEPENDS_${PN} += "${@bb.utils.contains('ARCH', 'x86', 'elfutils', '', d)}"
+# 5.8+ needs gcc-plugins libmpc-dev
+RDEPENDS_${PN} += "gcc-plugins libmpc-dev"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-dev.bb b/poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
index 8a61b2276..fbc62f29c 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -30,7 +30,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name
SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
-LINUX_VERSION ?= "5.7-rc+"
+LINUX_VERSION ?= "5.9-rc+"
LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}"
PV = "${LINUX_VERSION}+git${SRCPV}"
@@ -49,6 +49,6 @@ KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "", d)}"
KERNEL_VERSION_SANITY_SKIP = "1"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb
index f6acb291f..eded625bf 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb
@@ -11,13 +11,13 @@ python () {
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
-SRCREV_machine ?= "5db46f8cf9b485f320287147ce593789ee0b5447"
-SRCREV_meta ?= "4ed477131e6e508d335d70c070eb84a5c3d673e5"
+SRCREV_machine ?= "1d9e25c4f35155580cef313ff2a76de545124a1d"
+SRCREV_meta ?= "0d860e075788a92601dff3eb9b615ee41e465040"
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}"
-LINUX_VERSION ?= "5.4.40"
+LINUX_VERSION ?= "5.4.65"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
@@ -41,4 +41,4 @@ KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}"
+KERNEL_FEATURES_append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.8.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.8.bb
new file mode 100644
index 000000000..aa01f06d3
--- /dev/null
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.8.bb
@@ -0,0 +1,44 @@
+KBRANCH ?= "v5.8/standard/preempt-rt/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers, e.g. as dependency of
+# core-image-rt-sdk, core-image-rt.
+python () {
+ if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
+ raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
+SRCREV_machine ?= "31fafe701e2adec65d2b2a74a3e592a358915c67"
+SRCREV_meta ?= "ffbfe61a194537689c782b20da185e7e4daa9ef9"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.8;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "5.8.9"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+LINUX_KERNEL_TYPE = "preempt-rt"
+
+COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)"
+
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb
index f797aa1df..853fc9369 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"
require recipes-kernel/linux/linux-yocto.inc
-LINUX_VERSION ?= "5.4.40"
+LINUX_VERSION ?= "5.4.65"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"
-SRCREV_machine_qemuarm ?= "b84f9483ed29096cd9bb6b1922666e8a275dd496"
-SRCREV_machine ?= "29f44c85c379c38f15e544828e7e77b3c008f378"
-SRCREV_meta ?= "4ed477131e6e508d335d70c070eb84a5c3d673e5"
+SRCREV_machine_qemuarm ?= "bb77791bc00cfa70211dd238d312b4db950c0808"
+SRCREV_machine ?= "406008bf3232dfc9e63b6e7bf745ca883c45041e"
+SRCREV_meta ?= "0d860e075788a92601dff3eb9b615ee41e465040"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.8.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.8.bb
new file mode 100644
index 000000000..76b61222a
--- /dev/null
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.8.bb
@@ -0,0 +1,32 @@
+KBRANCH ?= "v5.8/standard/tiny/base"
+KBRANCH_qemuarm ?= "v5.8/standard/tiny/arm-versatile-926ejs"
+
+LINUX_KERNEL_TYPE = "tiny"
+KCONFIG_MODE = "--allnoconfig"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "5.8.9"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+SRCREV_machine_qemuarm ?= "830cb9af40e856615b7a435a4fac57b748ba56d6"
+SRCREV_machine ?= "31fafe701e2adec65d2b2a74a3e592a358915c67"
+SRCREV_meta ?= "ffbfe61a194537689c782b20da185e7e4daa9ef9"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.8;destsuffix=${KMETA}"
+
+COMPATIBLE_MACHINE = "qemux86|qemux86-64|qemuarm|qemuarmv5"
+
+# Functionality flags
+KERNEL_FEATURES = ""
+
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto.inc b/poky/meta/recipes-kernel/linux/linux-yocto.inc
index f560dec58..bd37006f8 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/poky/meta/recipes-kernel/linux/linux-yocto.inc
@@ -6,6 +6,8 @@ LIC_FILES_CHKSUM ?= "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
+RECIPE_NO_UPDATE_REASON = "Recipe is updated through a separate process"
+
# Skip processing of this recipe if it is not explicitly specified as the
# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required
# by the use of AUTOREV SRCREVs, which are the default for this recipe.
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_5.4.bb b/poky/meta/recipes-kernel/linux/linux-yocto_5.4.bb
index 65afdc32f..d06d653d7 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto_5.4.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto_5.4.bb
@@ -12,16 +12,16 @@ KBRANCH_qemux86 ?= "v5.4/standard/base"
KBRANCH_qemux86-64 ?= "v5.4/standard/base"
KBRANCH_qemumips64 ?= "v5.4/standard/mti-malta64"
-SRCREV_machine_qemuarm ?= "cbe84f8dbb7fe4a67a337795d81cca735346f4c8"
-SRCREV_machine_qemuarm64 ?= "29f44c85c379c38f15e544828e7e77b3c008f378"
-SRCREV_machine_qemumips ?= "b0ad6cf1238ec97860a9e26a6da1aa431c5b96fb"
-SRCREV_machine_qemuppc ?= "29f44c85c379c38f15e544828e7e77b3c008f378"
-SRCREV_machine_qemuriscv64 ?= "29f44c85c379c38f15e544828e7e77b3c008f378"
-SRCREV_machine_qemux86 ?= "29f44c85c379c38f15e544828e7e77b3c008f378"
-SRCREV_machine_qemux86-64 ?= "29f44c85c379c38f15e544828e7e77b3c008f378"
-SRCREV_machine_qemumips64 ?= "5247564ab2b897a678ed0cd8fb2905c918fc64df"
-SRCREV_machine ?= "29f44c85c379c38f15e544828e7e77b3c008f378"
-SRCREV_meta ?= "4ed477131e6e508d335d70c070eb84a5c3d673e5"
+SRCREV_machine_qemuarm ?= "894e63d3256613faa39931a6ae505cfd196df067"
+SRCREV_machine_qemuarm64 ?= "406008bf3232dfc9e63b6e7bf745ca883c45041e"
+SRCREV_machine_qemumips ?= "aa13fdb2c5f8c4e4e432bfee6df9c8f76ec8ac70"
+SRCREV_machine_qemuppc ?= "406008bf3232dfc9e63b6e7bf745ca883c45041e"
+SRCREV_machine_qemuriscv64 ?= "406008bf3232dfc9e63b6e7bf745ca883c45041e"
+SRCREV_machine_qemux86 ?= "406008bf3232dfc9e63b6e7bf745ca883c45041e"
+SRCREV_machine_qemux86-64 ?= "406008bf3232dfc9e63b6e7bf745ca883c45041e"
+SRCREV_machine_qemumips64 ?= "4fb21d604fc54db63221ea28ab90622c29d74202"
+SRCREV_machine ?= "406008bf3232dfc9e63b6e7bf745ca883c45041e"
+SRCREV_meta ?= "0d860e075788a92601dff3eb9b615ee41e465040"
# remap qemuarm to qemuarma15 for the 5.4 kernel
# KMACHINE_qemuarm ?= "qemuarma15"
@@ -30,7 +30,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-LINUX_VERSION ?= "5.4.40"
+LINUX_VERSION ?= "5.4.65"
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
DEPENDS += "openssl-native util-linux-native"
@@ -38,7 +38,7 @@ DEPENDS += "openssl-native util-linux-native"
PV = "${LINUX_VERSION}+git${SRCPV}"
KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
+KCONF_BSP_AUDIT_LEVEL = "1"
KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
@@ -50,5 +50,5 @@ KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "", d)}"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_5.8.bb b/poky/meta/recipes-kernel/linux/linux-yocto_5.8.bb
new file mode 100644
index 000000000..f8e72533f
--- /dev/null
+++ b/poky/meta/recipes-kernel/linux/linux-yocto_5.8.bb
@@ -0,0 +1,55 @@
+KBRANCH ?= "v5.8/standard/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# board specific branches
+KBRANCH_qemuarm ?= "v5.8/standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "v5.8/standard/qemuarm64"
+KBRANCH_qemumips ?= "v5.8/standard/mti-malta32"
+KBRANCH_qemuppc ?= "v5.8/standard/qemuppc"
+KBRANCH_qemuriscv64 ?= "v5.8/standard/base"
+KBRANCH_qemux86 ?= "v5.8/standard/base"
+KBRANCH_qemux86-64 ?= "v5.8/standard/base"
+KBRANCH_qemumips64 ?= "v5.8/standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "d351bf87c9c0e96a1f27f87f16d298bc4470e0b5"
+SRCREV_machine_qemuarm64 ?= "31fafe701e2adec65d2b2a74a3e592a358915c67"
+SRCREV_machine_qemumips ?= "93d29a70890b19fb5482ebcab5f3a49301851daf"
+SRCREV_machine_qemuppc ?= "31fafe701e2adec65d2b2a74a3e592a358915c67"
+SRCREV_machine_qemuriscv64 ?= "31fafe701e2adec65d2b2a74a3e592a358915c67"
+SRCREV_machine_qemux86 ?= "31fafe701e2adec65d2b2a74a3e592a358915c67"
+SRCREV_machine_qemux86-64 ?= "31fafe701e2adec65d2b2a74a3e592a358915c67"
+SRCREV_machine_qemumips64 ?= "4faa049b6b7b51c5d12d20c5e9fcf8e0a3ba8d42"
+SRCREV_machine ?= "31fafe701e2adec65d2b2a74a3e592a358915c67"
+SRCREV_meta ?= "ffbfe61a194537689c782b20da185e7e4daa9ef9"
+
+# remap qemuarm to qemuarma15 for the 5.8 kernel
+# KMACHINE_qemuarm ?= "qemuarma15"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.8;destsuffix=${KMETA}"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+LINUX_VERSION ?= "5.8.9"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+DEPENDS += "gmp-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "1"
+
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
+
+COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64|qemuriscv64"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "", d)}"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}"
diff --git a/poky/meta/recipes-kernel/lttng/babeltrace2/0001-fs.c-initialize-other_entry.patch b/poky/meta/recipes-kernel/lttng/babeltrace2/0001-fs.c-initialize-other_entry.patch
deleted file mode 100644
index b56b3bd6e..000000000
--- a/poky/meta/recipes-kernel/lttng/babeltrace2/0001-fs.c-initialize-other_entry.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 42dae692b9057d03ce9a0651f061472e9dd90130 Mon Sep 17 00:00:00 2001
-From: Mingli Yu <mingli.yu@windriver.com>
-Date: Wed, 11 Mar 2020 08:44:42 +0000
-Subject: [PATCH] fs.c: initialize the other_entry variable
-
-Initialize the pointer other_entry to fix the below error:
-| ../../../../../git/src/plugins/ctf/fs-src/fs.c: In function 'ds_index_insert_ds_index_entry_sorted':
-| ../../../../../git/src/plugins/ctf/fs-src/fs.c:702:5: error: 'other_entry' may be used uninitialized in this function [-Werror=maybe-uninitialized]
-| 702 | !ds_index_entries_equal(entry, other_entry)) {
-
-Upstream-Status: Submitted [https://lists.lttng.org/pipermail/lttng-dev/2020-March/029549.html]
-
-Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
----
- src/plugins/ctf/fs-src/fs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/plugins/ctf/fs-src/fs.c b/src/plugins/ctf/fs-src/fs.c
-index e87523a3..a6b5315f 100644
---- a/src/plugins/ctf/fs-src/fs.c
-+++ b/src/plugins/ctf/fs-src/fs.c
-@@ -680,7 +680,7 @@ void ds_index_insert_ds_index_entry_sorted(
- struct ctf_fs_ds_index_entry *entry)
- {
- guint i;
-- struct ctf_fs_ds_index_entry *other_entry;
-+ struct ctf_fs_ds_index_entry *other_entry = NULL;
-
- /* Find the spot where to insert this index entry. */
- for (i = 0; i < index->entries->len; i++) {
---
-2.24.1
-
diff --git a/poky/meta/recipes-kernel/lttng/babeltrace2_2.0.2.bb b/poky/meta/recipes-kernel/lttng/babeltrace2_2.0.3.bb
index 0791c654f..c65882581 100644
--- a/poky/meta/recipes-kernel/lttng/babeltrace2_2.0.2.bb
+++ b/poky/meta/recipes-kernel/lttng/babeltrace2_2.0.3.bb
@@ -7,13 +7,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a6a458c13f18385b7bc5069a6d7b176e"
DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
-SRC_URI = "git://git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-2.0 \
- file://run-ptest \
- file://0001-tests-do-not-run-test-applications-from-.libs.patch \
+SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-2.0 \
+ file://run-ptest \
+ file://0001-tests-do-not-run-test-applications-from-.libs.patch \
file://0001-Make-manpages-multilib-identical.patch \
- file://0001-fs.c-initialize-other_entry.patch \
- "
-SRCREV = "33003c352ed56aa49e0b3df272bbab6fac36cae8"
+ "
+SRCREV = "91d154476e66735d705adda9ca5cbf5b5eea5940"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>2(\.\d+)+)$"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-kernel/lttng/babeltrace_1.5.8.bb b/poky/meta/recipes-kernel/lttng/babeltrace_1.5.8.bb
index 4d2492a17..9e5d3a7a9 100644
--- a/poky/meta/recipes-kernel/lttng/babeltrace_1.5.8.bb
+++ b/poky/meta/recipes-kernel/lttng/babeltrace_1.5.8.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
-SRC_URI = "git://git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-1.5 \
+SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.5 \
file://run-ptest \
"
SRCREV = "054a54ae10b01a271afc4f19496c041b10fb414c"
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Kconfig-fix-dependency-issue-when-building-in-tree-w.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Kconfig-fix-dependency-issue-when-building-in-tree-w.patch
new file mode 100644
index 000000000..ae8bec45d
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Kconfig-fix-dependency-issue-when-building-in-tree-w.patch
@@ -0,0 +1,54 @@
+From ff4d1d7e85be94ef43709cd698f0ec9a12f247d1 Mon Sep 17 00:00:00 2001
+From: Beniamin Sandu <beniaminsandu@gmail.com>
+Date: Thu, 13 Aug 2020 16:24:39 +0300
+Subject: [PATCH 01/10] Kconfig: fix dependency issue when building in-tree
+ without CONFIG_FTRACE
+
+When building in-tree, one could disable CONFIG_FTRACE from kernel
+config which will leave CONFIG_TRACEPOINTS selected by LTTNG modules,
+but generate a lot of linker errors like below because it leaves out
+other stuff, e.g.:
+
+trace.c:(.text+0xd86b): undefined reference to `trace_event_buffer_reserve'
+ld: trace.c:(.text+0xd8de): undefined reference to `trace_event_buffer_commit'
+ld: trace.c:(.text+0xd926): undefined reference to `event_triggers_call'
+ld: trace.c:(.text+0xd942): undefined reference to `trace_event_ignore_this_pid'
+ld: net/mac80211/trace.o: in function `trace_event_raw_event_drv_tdls_cancel_channel_switch':
+
+It appears to be caused by the fact that TRACE_EVENT macros in the Linux
+kernel depend on the Ftrace ring buffer as soon as CONFIG_TRACEPOINTS is
+enabled.
+
+Steps to reproduce:
+
+- Get a clone of an upstream stable kernel and use scripts/built-in.sh on it
+
+- Configure a standard x86-64 build, enable built-in LTTNG but disable
+ CONFIG_FTRACE from Kernel Hacking-->Tracers using menuconfig
+
+- Build will fail at linking stage
+
+Upstream-Status: Backport
+
+Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Kconfig b/Kconfig
+index acdab73..10eccff 100644
+--- a/Kconfig
++++ b/Kconfig
+@@ -2,7 +2,7 @@
+
+ config LTTNG
+ tristate "LTTng support"
+- select TRACEPOINTS
++ select TRACING
+ help
+ LTTng is an open source tracing framework for Linux.
+
+--
+2.19.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Update-for-kernel-5.7-use-vmalloc_sync_mappings-on-k.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Update-for-kernel-5.7-use-vmalloc_sync_mappings-on-k.patch
deleted file mode 100644
index 58f4d2919..000000000
--- a/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Update-for-kernel-5.7-use-vmalloc_sync_mappings-on-k.patch
+++ /dev/null
@@ -1,853 +0,0 @@
-From a2cc0e06330e55eefe668f7d6370de6d3177a907 Mon Sep 17 00:00:00 2001
-From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-Date: Tue, 5 May 2020 13:38:31 -0400
-Subject: [PATCH] Update for kernel 5.7: use vmalloc_sync_mappings on kernels
- >= 5.7
-
-Upstream-Status: Backport [https://github.com/lttng/lttng-modules/commit/da0fcb1497ff2437407883647a8a0bba12bd0f91]
-
-Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
----
- 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 d4bec25..d232b7f 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 b63e376..826ecab 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 195990a..ba35a39 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 81486e5..f324b7e 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 3778225..6e2f3f4 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 51536e2..bdcebb9 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 1bcd53f..c2b8dcd 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 da54207..c355e8c 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 e485aa9..17dbd57 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 f3da199..8bd279a 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 78d5966..40b901b 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 e3d8ede..65154b8 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 b5bb955..cb59776 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 f29fb28..94efaa5 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 6694037..37de09f 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 563e805..acaba85 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 43c4077..6b04d12 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 f039f26..ccf629d 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 b3caabb..326eabe 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 ef84ad1..ff25288 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 328f2a4..867805b 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 b5d21e7..367f7bd 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 54007d1..8f18ca2 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 61c8d53..2a58cbd 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 66d3ef5..ab3e2a9 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 d2a20e6..f6defc4 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 5f11de2..5593852 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 746e4d9..0ed62e3 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 7352a3d..283bc73 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 604da2a..1431dac 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 983ae6a..a1b5b70 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 e08c77d..0eed24e 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 982ce55..b5b6ce0 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 66d6382..347ac63 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 aca5eda..3daf889 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 66c1300..d7fb0db 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 8fd68a8..e81ba0e 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 6ae575f..33e22d3 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 eb4534c..a6d4ee6 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 a1c8445..401f646 100644
---- a/lttng-events.c
-+++ b/lttng-events.c
-@@ -30,7 +30,7 @@
- #include <linux/uuid.h>
- #include <linux/dmi.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, &lttng_transport_list);
-diff --git a/lttng-ring-buffer-client.h b/lttng-ring-buffer-client.h
-index d5c512c..ff62830 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(&lttng_relay_transport);
- return 0;
- }
-diff --git a/lttng-ring-buffer-metadata-client.h b/lttng-ring-buffer-metadata-client.h
-index 17ffd75..a098b8d 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(&lttng_relay_transport);
- return 0;
- }
-diff --git a/lttng-syscalls.c b/lttng-syscalls.c
-index fb14f6b..97f1ba9 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 c0a15e4..a44eaa1 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 4b18d46..ab98ff2 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(&lttng_krp->krp);
- if (ret)
-diff --git a/probes/lttng-tracepoint-event-impl.h b/probes/lttng-tracepoint-event-impl.h
-index 321cdfa..77b8638 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 64d8237..bc10128 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 383202c..05bc138 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 e347639..b450e7d 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 0c3eb86..54715b5 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.17.1
-
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-missing-wrapper-rename-to-wrapper_vmalloc_sync_m.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-missing-wrapper-rename-to-wrapper_vmalloc_sync_m.patch
deleted file mode 100644
index 807fe933c..000000000
--- a/poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-missing-wrapper-rename-to-wrapper_vmalloc_sync_m.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 4d1817c129310945bf0b8227ebc0fbb4f6299dc7 Mon Sep 17 00:00:00 2001
-From: Michael Jeanson <mjeanson@efficios.com>
-Date: Wed, 6 May 2020 11:03:32 -0400
-Subject: [PATCH 2/4] Fix: missing wrapper rename to
- wrapper_vmalloc_sync_mappings
-
-Upstream-Status: Backport [https://github.com/lttng/lttng-modules/commit/c1ba644f2edf6a5bc030111ce4167a8798cc1053]
-
-Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
-Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-Change-Id: Idf7082a980c5a604bfef5c69906678b5083a9bbf
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
----
- wrapper/vmalloc.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/wrapper/vmalloc.h b/wrapper/vmalloc.h
-index 54715b5..5d0b389 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.17.1
-
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0002-fix-Move-mmutrace.h-into-the-mmu-sub-directory-v5.9.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0002-fix-Move-mmutrace.h-into-the-mmu-sub-directory-v5.9.patch
new file mode 100644
index 000000000..fab673b85
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0002-fix-Move-mmutrace.h-into-the-mmu-sub-directory-v5.9.patch
@@ -0,0 +1,41 @@
+From e10ab43dd0e425df5bc0ac763447664ed075ba05 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <mjeanson@efficios.com>
+Date: Mon, 10 Aug 2020 11:22:05 -0400
+Subject: [PATCH 02/10] fix: Move mmutrace.h into the mmu/ sub-directory (v5.9)
+
+ commit 33e3042dac6bcc33b80835f7d7b502b1d74c457c
+ Author: Sean Christopherson <sean.j.christopherson@intel.com>
+ Date: Mon Jun 22 13:20:29 2020 -0700
+
+ KVM: x86/mmu: Move mmu_audit.c and mmutrace.h into the mmu/ sub-directory
+
+ Move mmu_audit.c and mmutrace.h under mmu/ where they belong.
+
+Upstream-Status: Backport
+
+Change-Id: I582525ccca34e1e3bd62870364108a7d3e9df2e4
+Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ probes/lttng-probe-kvm-x86-mmu.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/probes/lttng-probe-kvm-x86-mmu.c b/probes/lttng-probe-kvm-x86-mmu.c
+index 37384a2..5a7ef1e 100644
+--- a/probes/lttng-probe-kvm-x86-mmu.c
++++ b/probes/lttng-probe-kvm-x86-mmu.c
+@@ -24,7 +24,11 @@
+ */
+ #include <wrapper/tracepoint.h>
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
++#include <../../arch/x86/kvm/mmu/mmutrace.h>
++#else
+ #include <../../arch/x86/kvm/mmutrace.h>
++#endif
+
+ #undef TRACE_INCLUDE_PATH
+ #undef TRACE_INCLUDE_FILE
+--
+2.19.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-Use-vmalloc_sync_mappings-on-kernel-5.6-as-well.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-Use-vmalloc_sync_mappings-on-kernel-5.6-as-well.patch
deleted file mode 100644
index 48d7e2f00..000000000
--- a/poky/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-Use-vmalloc_sync_mappings-on-kernel-5.6-as-well.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 23cfd7b53ec1521d3c23ceddfda49352c2d349dc Mon Sep 17 00:00:00 2001
-From: Ovidiu Panait <ovidiu.panait@windriver.com>
-Date: Thu, 14 May 2020 13:05:24 +0300
-Subject: [PATCH 3/4] Fix: Use vmalloc_sync_mappings on kernel 5.6 as well
-
-Upstream commit [1], that got rid of vmalloc_sync_all and introduced
-vmalloc_sync_mappings, is a v5.6 commit:
-$ git tag --contains 763802b53a427ed3cbd419dbba255c414fdd9e7c
-v5.6
-v5.6-rc7
-v5.7-rc1
-v5.7-rc2
-v5.7-rc3
-
-Extend the LINUX_VERSION_CODE check to v5.6 to fix the following warnings:
-...
-[ 483.242037] LTTng: vmalloc_sync_all symbol lookup failed.
-[ 483.257056] Page fault handler and NMI tracing might trigger faults.
-...
-
-[1] https://github.com/torvalds/linux/commit/763802b53a427ed3cbd419dbba255c414fdd9e7c
-
-Upstream-Status: Backport [https://github.com/lttng/lttng-modules/commit/da356b324dfc160e09b8966b691792037badf455]
-
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
-Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
----
- wrapper/vmalloc.h | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/wrapper/vmalloc.h b/wrapper/vmalloc.h
-index 5d0b389..d905f60 100644
---- a/wrapper/vmalloc.h
-+++ b/wrapper/vmalloc.h
-@@ -21,7 +21,7 @@
- #include <linux/kallsyms.h>
- #include <wrapper/kallsyms.h>
-
--#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
-
- static inline
- void wrapper_vmalloc_sync_mappings(void)
-@@ -43,7 +43,7 @@ void wrapper_vmalloc_sync_mappings(void)
- }
- }
-
--#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
-+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
-
- /*
- * Map vmalloc_sync_mappings to vmalloc_sync_all() on kernels before 5.7.
-@@ -68,11 +68,11 @@ void wrapper_vmalloc_sync_mappings(void)
- }
- }
-
--#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
-+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
-
- #else
-
--#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
-
- static inline
- void wrapper_vmalloc_sync_mappings(void)
-@@ -80,7 +80,7 @@ void wrapper_vmalloc_sync_mappings(void)
- return vmalloc_sync_mappings();
- }
-
--#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
-+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
-
- static inline
- void wrapper_vmalloc_sync_mappings(void)
-@@ -88,7 +88,7 @@ void wrapper_vmalloc_sync_mappings(void)
- return vmalloc_sync_all();
- }
-
--#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
-+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
-
- #endif
-
---
-2.17.1
-
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-KVM-x86-mmu-Make-kvm_mmu_page-definition-and-acc.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-KVM-x86-mmu-Make-kvm_mmu_page-definition-and-acc.patch
new file mode 100644
index 000000000..524631cc7
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-KVM-x86-mmu-Make-kvm_mmu_page-definition-and-acc.patch
@@ -0,0 +1,39 @@
+From f16315cc45c4c6b880de541bb092ca18a13952b7 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <mjeanson@efficios.com>
+Date: Mon, 10 Aug 2020 11:36:03 -0400
+Subject: [PATCH 03/10] fix: KVM: x86/mmu: Make kvm_mmu_page definition and
+ accessor internal-only (v5.9)
+
+ commit 985ab2780164698ec6e7d73fad523d50449261dd
+ Author: Sean Christopherson <sean.j.christopherson@intel.com>
+ Date: Mon Jun 22 13:20:32 2020 -0700
+
+ KVM: x86/mmu: Make kvm_mmu_page definition and accessor internal-only
+
+ Make 'struct kvm_mmu_page' MMU-only, nothing outside of the MMU should
+ be poking into the gory details of shadow pages.
+
+Upstream-Status: Backport
+
+Change-Id: Ia5c1b9c49c2b00dad1d5b17c50c3dc730dafda20
+Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ probes/lttng-probe-kvm-x86-mmu.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/probes/lttng-probe-kvm-x86-mmu.c b/probes/lttng-probe-kvm-x86-mmu.c
+index 5a7ef1e..8f98186 100644
+--- a/probes/lttng-probe-kvm-x86-mmu.c
++++ b/probes/lttng-probe-kvm-x86-mmu.c
+@@ -25,6 +25,7 @@
+ #include <wrapper/tracepoint.h>
+
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
++#include <../../arch/x86/kvm/mmu/mmu_internal.h>
+ #include <../../arch/x86/kvm/mmu/mmutrace.h>
+ #else
+ #include <../../arch/x86/kvm/mmutrace.h>
+--
+2.19.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0004-Update-Use-vmalloc_sync_mappings-for-stable-kernels.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0004-Update-Use-vmalloc_sync_mappings-for-stable-kernels.patch
deleted file mode 100644
index a0b870486..000000000
--- a/poky/meta/recipes-kernel/lttng/lttng-modules/0004-Update-Use-vmalloc_sync_mappings-for-stable-kernels.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From f419315f28a1da656c4faa8a852a2928ce38c72d Mon Sep 17 00:00:00 2001
-From: Ovidiu Panait <ovidiu.panait@windriver.com>
-Date: Thu, 14 May 2020 14:27:17 +0300
-Subject: [PATCH 4/4] Update: Use vmalloc_sync_mappings for stable kernels
-
-Starting from v5.4.28/v5.2.37/v4.19.113/v4.14.175/v4.9.218/v4.4.218, stable
-kernel branches backported v5.6 upstream commit [1], causing the following
-warnings:
-...
-[ 483.242037] LTTng: vmalloc_sync_all symbol lookup failed.
-[ 483.257056] Page fault handler and NMI tracing might trigger faults.
-...
-
-Extend check for vmalloc_sync_mappings for stable kernels as well.
-
-[1] https://github.com/torvalds/linux/commit/763802b53a427ed3cbd419dbba255c414fdd9e7c
-
-[ Edit: minor coding style fix by Mathieu Desnoyers. ]
-
-Upstream-Status: Backport [https://github.com/lttng/lttng-modules/commit/5939591f87dc291bc858caf72decfb8569d802e3]
-
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
-Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
----
- wrapper/vmalloc.h | 17 +++++++++++++++--
- 1 file changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/wrapper/vmalloc.h b/wrapper/vmalloc.h
-index d905f60..c7538ae 100644
---- a/wrapper/vmalloc.h
-+++ b/wrapper/vmalloc.h
-@@ -20,8 +20,15 @@
-
- #include <linux/kallsyms.h>
- #include <wrapper/kallsyms.h>
-+#include <lttng-kernel-version.h>
-
--#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) \
-+ || LTTNG_KERNEL_RANGE(5,4,28, 5,5,0) \
-+ || LTTNG_KERNEL_RANGE(5,2,37, 5,3,0) \
-+ || LTTNG_KERNEL_RANGE(4,19,113, 4,20,0) \
-+ || LTTNG_KERNEL_RANGE(4,14,175, 4,15,0) \
-+ || LTTNG_KERNEL_RANGE(4,9,218, 4,10,0) \
-+ || LTTNG_KERNEL_RANGE(4,4,218, 4,5,0))
-
- static inline
- void wrapper_vmalloc_sync_mappings(void)
-@@ -72,7 +79,13 @@ void wrapper_vmalloc_sync_mappings(void)
-
- #else
-
--#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) \
-+ || LTTNG_KERNEL_RANGE(5,4,28, 5,5,0) \
-+ || LTTNG_KERNEL_RANGE(5,2,37, 5,3,0) \
-+ || LTTNG_KERNEL_RANGE(4,19,113, 4,20,0) \
-+ || LTTNG_KERNEL_RANGE(4,14,175, 4,15,0) \
-+ || LTTNG_KERNEL_RANGE(4,9,218, 4,10,0) \
-+ || LTTNG_KERNEL_RANGE(4,4,218, 4,5,0))
-
- static inline
- void wrapper_vmalloc_sync_mappings(void)
---
-2.17.1
-
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0004-fix-ext4-limit-the-length-of-per-inode-prealloc-list.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0004-fix-ext4-limit-the-length-of-per-inode-prealloc-list.patch
new file mode 100644
index 000000000..e29c07252
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0004-fix-ext4-limit-the-length-of-per-inode-prealloc-list.patch
@@ -0,0 +1,84 @@
+From 8fe742807e65af29dac3fea568ff93cbc5dd9a56 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <mjeanson@efficios.com>
+Date: Mon, 24 Aug 2020 15:26:04 -0400
+Subject: [PATCH 04/10] fix: ext4: limit the length of per-inode prealloc list
+ (v5.9)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+See upstream commit:
+
+ commit 27bc446e2def38db3244a6eb4bb1d6312936610a
+ Author: brookxu <brookxu.cn@gmail.com>
+ Date: Mon Aug 17 15:36:15 2020 +0800
+
+ ext4: limit the length of per-inode prealloc list
+
+ In the scenario of writing sparse files, the per-inode prealloc list may
+ be very long, resulting in high overhead for ext4_mb_use_preallocated().
+ To circumvent this problem, we limit the maximum length of per-inode
+ prealloc list to 512 and allow users to modify it.
+
+ After patching, we observed that the sys ratio of cpu has dropped, and
+ the system throughput has increased significantly. We created a process
+ to write the sparse file, and the running time of the process on the
+ fixed kernel was significantly reduced, as follows:
+
+ Running time on unfixed kernel:
+ [root@TENCENT64 ~]# time taskset 0x01 ./sparse /data1/sparce.dat
+ real 0m2.051s
+ user 0m0.008s
+ sys 0m2.026s
+
+ Running time on fixed kernel:
+ [root@TENCENT64 ~]# time taskset 0x01 ./sparse /data1/sparce.dat
+ real 0m0.471s
+ user 0m0.004s
+ sys 0m0.395s
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Change-Id: I5169cb24853d4da32e2862a6626f1f058689b053
+---
+ instrumentation/events/lttng-module/ext4.h | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h
+index 5f7ab28..72ad4c9 100644
+--- a/instrumentation/events/lttng-module/ext4.h
++++ b/instrumentation/events/lttng-module/ext4.h
+@@ -460,6 +460,20 @@ LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa,
+ )
+ #endif
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
++LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
++ TP_PROTO(struct inode *inode, unsigned int len, unsigned int needed),
++
++ TP_ARGS(inode, len, needed),
++
++ TP_FIELDS(
++ ctf_integer(dev_t, dev, inode->i_sb->s_dev)
++ ctf_integer(ino_t, ino, inode->i_ino)
++ ctf_integer(unsigned int, len, len)
++ ctf_integer(unsigned int, needed, needed)
++ )
++)
++#else
+ LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
+ TP_PROTO(struct inode *inode),
+
+@@ -470,6 +484,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
+ ctf_integer(ino_t, ino, inode->i_ino)
+ )
+ )
++#endif
+
+ LTTNG_TRACEPOINT_EVENT(ext4_mb_discard_preallocations,
+ TP_PROTO(struct super_block *sb, int needed),
+--
+2.19.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0005-fix-ext4-indicate-via-a-block-bitmap-read-is-prefetc.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0005-fix-ext4-indicate-via-a-block-bitmap-read-is-prefetc.patch
new file mode 100644
index 000000000..f76e9698c
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0005-fix-ext4-indicate-via-a-block-bitmap-read-is-prefetc.patch
@@ -0,0 +1,63 @@
+From 52563d02a9234215b62c5f519aa1b5d8589ccd0a Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <mjeanson@efficios.com>
+Date: Mon, 24 Aug 2020 15:37:50 -0400
+Subject: [PATCH 05/10] =?UTF-8?q?fix:=20ext4:=20indicate=20via=20a=20block?=
+ =?UTF-8?q?=20bitmap=20read=20is=20prefetched=E2=80=A6=20(v5.9)?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+See upstream commit:
+
+ commit ab74c7b23f3770935016e3eb3ecdf1e42b73efaa
+ Author: Theodore Ts'o <tytso@mit.edu>
+ Date: Wed Jul 15 11:48:55 2020 -0400
+
+ ext4: indicate via a block bitmap read is prefetched via a tracepoint
+
+ Modify the ext4_read_block_bitmap_load tracepoint so that it tells us
+ whether a block bitmap is being prefetched.
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Change-Id: I0e5e2c5b8004223d0928235c092449ee16a940e1
+---
+ instrumentation/events/lttng-module/ext4.h | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h
+index 72ad4c9..4476abb 100644
+--- a/instrumentation/events/lttng-module/ext4.h
++++ b/instrumentation/events/lttng-module/ext4.h
+@@ -893,12 +893,26 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_mb_buddy_bitmap_load,
+ TP_ARGS(sb, group)
+ )
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
++LTTNG_TRACEPOINT_EVENT(ext4_read_block_bitmap_load,
++ TP_PROTO(struct super_block *sb, unsigned long group, bool prefetch),
++
++ TP_ARGS(sb, group, prefetch),
++
++ TP_FIELDS(
++ ctf_integer(dev_t, dev, sb->s_dev)
++ ctf_integer(__u32, group, group)
++ ctf_integer(bool, prefetch, prefetch)
++ )
++)
++#else
+ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_read_block_bitmap_load,
+
+ TP_PROTO(struct super_block *sb, unsigned long group),
+
+ TP_ARGS(sb, group)
+ )
++#endif
+
+ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_load_inode_bitmap,
+
+--
+2.19.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0006-fix-removal-of-smp_-read_barrier_depends-v5.9.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0006-fix-removal-of-smp_-read_barrier_depends-v5.9.patch
new file mode 100644
index 000000000..0970dd30a
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0006-fix-removal-of-smp_-read_barrier_depends-v5.9.patch
@@ -0,0 +1,391 @@
+From 57ccbfa6a8a79c7b84394c2097efaf7935607aa5 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <mjeanson@efficios.com>
+Date: Tue, 25 Aug 2020 10:56:29 -0400
+Subject: [PATCH 06/10] fix: removal of [smp_]read_barrier_depends (v5.9)
+
+See upstream commits:
+
+ commit 76ebbe78f7390aee075a7f3768af197ded1bdfbb
+ Author: Will Deacon <will@kernel.org>
+ Date: Tue Oct 24 11:22:47 2017 +0100
+
+ locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE()
+
+ In preparation for the removal of lockless_dereference(), which is the
+ same as READ_ONCE() on all architectures other than Alpha, add an
+ implicit smp_read_barrier_depends() to READ_ONCE() so that it can be
+ used to head dependency chains on all architectures.
+
+ commit 76ebbe78f7390aee075a7f3768af197ded1bdfbb
+ Author: Will Deacon <will.deacon@arm.com>
+ Date: Tue Oct 24 11:22:47 2017 +0100
+
+ locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE()
+
+ In preparation for the removal of lockless_dereference(), which is the
+ same as READ_ONCE() on all architectures other than Alpha, add an
+ implicit smp_read_barrier_depends() to READ_ONCE() so that it can be
+ used to head dependency chains on all architectures.
+
+Upstream-Status: Backport
+
+Change-Id: Ife8880bd9378dca2972da8838f40fc35ccdfaaac
+Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ instrumentation/events/lttng-module/i2c.h | 4 ++--
+ lib/ringbuffer/backend.h | 2 +-
+ lib/ringbuffer/backend_internal.h | 2 +-
+ lib/ringbuffer/frontend.h | 4 ++--
+ lib/ringbuffer/ring_buffer_frontend.c | 4 ++--
+ lib/ringbuffer/ring_buffer_iterator.c | 2 +-
+ lttng-events.c | 8 ++++----
+ probes/lttng-kprobes.c | 6 +++---
+ probes/lttng-kretprobes.c | 6 +++---
+ probes/lttng-tracepoint-event-impl.h | 12 ++++++------
+ probes/lttng-uprobes.c | 6 +++---
+ wrapper/compiler.h | 18 ++++++++++++++++++
+ wrapper/trace-clock.h | 15 +++++----------
+ 13 files changed, 51 insertions(+), 38 deletions(-)
+
+diff --git a/instrumentation/events/lttng-module/i2c.h b/instrumentation/events/lttng-module/i2c.h
+index dcbabf6..131d134 100644
+--- a/instrumentation/events/lttng-module/i2c.h
++++ b/instrumentation/events/lttng-module/i2c.h
+@@ -23,7 +23,7 @@ LTTNG_TRACEPOINT_EVENT_CODE(i2c_write,
+
+ TP_code_pre(
+ tp_locvar->extract_sensitive_payload =
+- READ_ONCE(extract_sensitive_payload);
++ LTTNG_READ_ONCE(extract_sensitive_payload);
+ ),
+
+ TP_FIELDS(
+@@ -78,7 +78,7 @@ LTTNG_TRACEPOINT_EVENT_CODE(i2c_reply,
+
+ TP_code_pre(
+ tp_locvar->extract_sensitive_payload =
+- READ_ONCE(extract_sensitive_payload);
++ LTTNG_READ_ONCE(extract_sensitive_payload);
+ ),
+
+ TP_FIELDS(
+diff --git a/lib/ringbuffer/backend.h b/lib/ringbuffer/backend.h
+index da937f2..43e1d47 100644
+--- a/lib/ringbuffer/backend.h
++++ b/lib/ringbuffer/backend.h
+@@ -156,7 +156,7 @@ size_t lib_ring_buffer_do_strcpy(const struct lib_ring_buffer_config *config,
+ * Only read source character once, in case it is
+ * modified concurrently.
+ */
+- c = READ_ONCE(src[count]);
++ c = LTTNG_READ_ONCE(src[count]);
+ if (!c)
+ break;
+ lib_ring_buffer_do_copy(config, &dest[count], &c, 1);
+diff --git a/lib/ringbuffer/backend_internal.h b/lib/ringbuffer/backend_internal.h
+index 2d6a345..1226fd8 100644
+--- a/lib/ringbuffer/backend_internal.h
++++ b/lib/ringbuffer/backend_internal.h
+@@ -367,7 +367,7 @@ void lib_ring_buffer_clear_noref(const struct lib_ring_buffer_config *config,
+ * Performing a volatile access to read the sb_pages, because we want to
+ * read a coherent version of the pointer and the associated noref flag.
+ */
+- id = READ_ONCE(bufb->buf_wsb[idx].id);
++ id = LTTNG_READ_ONCE(bufb->buf_wsb[idx].id);
+ for (;;) {
+ /* This check is called on the fast path for each record. */
+ if (likely(!subbuffer_id_is_noref(config, id))) {
+diff --git a/lib/ringbuffer/frontend.h b/lib/ringbuffer/frontend.h
+index 6f516d9..41382fe 100644
+--- a/lib/ringbuffer/frontend.h
++++ b/lib/ringbuffer/frontend.h
+@@ -79,7 +79,7 @@ void *channel_destroy(struct channel *chan);
+ #define for_each_channel_cpu(cpu, chan) \
+ for ((cpu) = -1; \
+ ({ (cpu) = cpumask_next(cpu, (chan)->backend.cpumask); \
+- smp_read_barrier_depends(); (cpu) < nr_cpu_ids; });)
++ smp_rmb(); (cpu) < nr_cpu_ids; });)
+
+ extern struct lib_ring_buffer *channel_get_ring_buffer(
+ const struct lib_ring_buffer_config *config,
+@@ -155,7 +155,7 @@ static inline
+ int lib_ring_buffer_is_finalized(const struct lib_ring_buffer_config *config,
+ struct lib_ring_buffer *buf)
+ {
+- int finalized = READ_ONCE(buf->finalized);
++ int finalized = LTTNG_READ_ONCE(buf->finalized);
+ /*
+ * Read finalized before counters.
+ */
+diff --git a/lib/ringbuffer/ring_buffer_frontend.c b/lib/ringbuffer/ring_buffer_frontend.c
+index 3cab365..4980d20 100644
+--- a/lib/ringbuffer/ring_buffer_frontend.c
++++ b/lib/ringbuffer/ring_buffer_frontend.c
+@@ -1074,7 +1074,7 @@ int lib_ring_buffer_snapshot(struct lib_ring_buffer *buf,
+ int finalized;
+
+ retry:
+- finalized = READ_ONCE(buf->finalized);
++ finalized = LTTNG_READ_ONCE(buf->finalized);
+ /*
+ * Read finalized before counters.
+ */
+@@ -1245,7 +1245,7 @@ int lib_ring_buffer_get_subbuf(struct lib_ring_buffer *buf,
+ return -EBUSY;
+ }
+ retry:
+- finalized = READ_ONCE(buf->finalized);
++ finalized = LTTNG_READ_ONCE(buf->finalized);
+ /*
+ * Read finalized before counters.
+ */
+diff --git a/lib/ringbuffer/ring_buffer_iterator.c b/lib/ringbuffer/ring_buffer_iterator.c
+index d25db72..7b4f20a 100644
+--- a/lib/ringbuffer/ring_buffer_iterator.c
++++ b/lib/ringbuffer/ring_buffer_iterator.c
+@@ -46,7 +46,7 @@ restart:
+ switch (iter->state) {
+ case ITER_GET_SUBBUF:
+ ret = lib_ring_buffer_get_next_subbuf(buf);
+- if (ret && !READ_ONCE(buf->finalized)
++ if (ret && !LTTNG_READ_ONCE(buf->finalized)
+ && config->alloc == RING_BUFFER_ALLOC_GLOBAL) {
+ /*
+ * Use "pull" scheme for global buffers. The reader
+diff --git a/lttng-events.c b/lttng-events.c
+index be7e389..d719294 100644
+--- a/lttng-events.c
++++ b/lttng-events.c
+@@ -1719,7 +1719,7 @@ int lttng_metadata_printf(struct lttng_session *session,
+ size_t len;
+ va_list ap;
+
+- WARN_ON_ONCE(!READ_ONCE(session->active));
++ WARN_ON_ONCE(!LTTNG_READ_ONCE(session->active));
+
+ va_start(ap, fmt);
+ str = kvasprintf(GFP_KERNEL, fmt, ap);
+@@ -2305,7 +2305,7 @@ int _lttng_event_metadata_statedump(struct lttng_session *session,
+ {
+ int ret = 0;
+
+- if (event->metadata_dumped || !READ_ONCE(session->active))
++ if (event->metadata_dumped || !LTTNG_READ_ONCE(session->active))
+ return 0;
+ if (chan->channel_type == METADATA_CHANNEL)
+ return 0;
+@@ -2377,7 +2377,7 @@ int _lttng_channel_metadata_statedump(struct lttng_session *session,
+ {
+ int ret = 0;
+
+- if (chan->metadata_dumped || !READ_ONCE(session->active))
++ if (chan->metadata_dumped || !LTTNG_READ_ONCE(session->active))
+ return 0;
+
+ if (chan->channel_type == METADATA_CHANNEL)
+@@ -2604,7 +2604,7 @@ int _lttng_session_metadata_statedump(struct lttng_session *session)
+ struct lttng_event *event;
+ int ret = 0;
+
+- if (!READ_ONCE(session->active))
++ if (!LTTNG_READ_ONCE(session->active))
+ return 0;
+
+ lttng_metadata_begin(session);
+diff --git a/probes/lttng-kprobes.c b/probes/lttng-kprobes.c
+index a44eaa1..38fb72e 100644
+--- a/probes/lttng-kprobes.c
++++ b/probes/lttng-kprobes.c
+@@ -31,11 +31,11 @@ int lttng_kprobes_handler_pre(struct kprobe *p, struct pt_regs *regs)
+ int ret;
+ unsigned long data = (unsigned long) p->addr;
+
+- if (unlikely(!READ_ONCE(chan->session->active)))
++ if (unlikely(!LTTNG_READ_ONCE(chan->session->active)))
+ return 0;
+- if (unlikely(!READ_ONCE(chan->enabled)))
++ if (unlikely(!LTTNG_READ_ONCE(chan->enabled)))
+ return 0;
+- if (unlikely(!READ_ONCE(event->enabled)))
++ if (unlikely(!LTTNG_READ_ONCE(event->enabled)))
+ return 0;
+
+ lib_ring_buffer_ctx_init(&ctx, chan->chan, &lttng_probe_ctx, sizeof(data),
+diff --git a/probes/lttng-kretprobes.c b/probes/lttng-kretprobes.c
+index ab98ff2..a6bcd21 100644
+--- a/probes/lttng-kretprobes.c
++++ b/probes/lttng-kretprobes.c
+@@ -51,11 +51,11 @@ int _lttng_kretprobes_handler(struct kretprobe_instance *krpi,
+ unsigned long parent_ip;
+ } payload;
+
+- if (unlikely(!READ_ONCE(chan->session->active)))
++ if (unlikely(!LTTNG_READ_ONCE(chan->session->active)))
+ return 0;
+- if (unlikely(!READ_ONCE(chan->enabled)))
++ if (unlikely(!LTTNG_READ_ONCE(chan->enabled)))
+ return 0;
+- if (unlikely(!READ_ONCE(event->enabled)))
++ if (unlikely(!LTTNG_READ_ONCE(event->enabled)))
+ return 0;
+
+ payload.ip = (unsigned long) krpi->rp->kp.addr;
+diff --git a/probes/lttng-tracepoint-event-impl.h b/probes/lttng-tracepoint-event-impl.h
+index 77b8638..72a669e 100644
+--- a/probes/lttng-tracepoint-event-impl.h
++++ b/probes/lttng-tracepoint-event-impl.h
+@@ -1132,11 +1132,11 @@ static void __event_probe__##_name(void *__data, _proto) \
+ \
+ if (!_TP_SESSION_CHECK(session, __session)) \
+ return; \
+- if (unlikely(!READ_ONCE(__session->active))) \
++ if (unlikely(!LTTNG_READ_ONCE(__session->active))) \
+ return; \
+- if (unlikely(!READ_ONCE(__chan->enabled))) \
++ if (unlikely(!LTTNG_READ_ONCE(__chan->enabled))) \
+ return; \
+- if (unlikely(!READ_ONCE(__event->enabled))) \
++ if (unlikely(!LTTNG_READ_ONCE(__event->enabled))) \
+ return; \
+ __lf = lttng_rcu_dereference(__session->pid_tracker.p); \
+ if (__lf && likely(!lttng_id_tracker_lookup(__lf, current->tgid))) \
+@@ -1225,11 +1225,11 @@ static void __event_probe__##_name(void *__data) \
+ \
+ if (!_TP_SESSION_CHECK(session, __session)) \
+ return; \
+- if (unlikely(!READ_ONCE(__session->active))) \
++ if (unlikely(!LTTNG_READ_ONCE(__session->active))) \
+ return; \
+- if (unlikely(!READ_ONCE(__chan->enabled))) \
++ if (unlikely(!LTTNG_READ_ONCE(__chan->enabled))) \
+ return; \
+- if (unlikely(!READ_ONCE(__event->enabled))) \
++ if (unlikely(!LTTNG_READ_ONCE(__event->enabled))) \
+ return; \
+ __lf = lttng_rcu_dereference(__session->pid_tracker.p); \
+ if (__lf && likely(!lttng_id_tracker_lookup(__lf, current->tgid))) \
+diff --git a/probes/lttng-uprobes.c b/probes/lttng-uprobes.c
+index bc10128..bda1d9b 100644
+--- a/probes/lttng-uprobes.c
++++ b/probes/lttng-uprobes.c
+@@ -40,11 +40,11 @@ int lttng_uprobes_handler_pre(struct uprobe_consumer *uc, struct pt_regs *regs)
+ unsigned long ip;
+ } payload;
+
+- if (unlikely(!READ_ONCE(chan->session->active)))
++ if (unlikely(!LTTNG_READ_ONCE(chan->session->active)))
+ return 0;
+- if (unlikely(!READ_ONCE(chan->enabled)))
++ if (unlikely(!LTTNG_READ_ONCE(chan->enabled)))
+ return 0;
+- if (unlikely(!READ_ONCE(event->enabled)))
++ if (unlikely(!LTTNG_READ_ONCE(event->enabled)))
+ return 0;
+
+ lib_ring_buffer_ctx_init(&ctx, chan->chan, &lttng_probe_ctx,
+diff --git a/wrapper/compiler.h b/wrapper/compiler.h
+index 1496f33..b9f8c51 100644
+--- a/wrapper/compiler.h
++++ b/wrapper/compiler.h
+@@ -9,6 +9,7 @@
+ #define _LTTNG_WRAPPER_COMPILER_H
+
+ #include <linux/compiler.h>
++#include <linux/version.h>
+
+ /*
+ * Don't allow compiling with buggy compiler.
+@@ -39,4 +40,21 @@
+ # define WRITE_ONCE(x, val) ({ ACCESS_ONCE(x) = val; })
+ #endif
+
++/*
++ * In v4.15 a smp read barrier was added to READ_ONCE to replace
++ * lockless_dereference(), replicate this behavior on prior kernels
++ * and remove calls to smp_read_barrier_depends which was dropped
++ * in v5.9.
++ */
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
++#define LTTNG_READ_ONCE(x) READ_ONCE(x)
++#else
++#define LTTNG_READ_ONCE(x) \
++({ \
++ typeof(x) __val = READ_ONCE(x); \
++ smp_read_barrier_depends(); \
++ __val; \
++})
++#endif
++
+ #endif /* _LTTNG_WRAPPER_COMPILER_H */
+diff --git a/wrapper/trace-clock.h b/wrapper/trace-clock.h
+index 9f4e366..187fc82 100644
+--- a/wrapper/trace-clock.h
++++ b/wrapper/trace-clock.h
+@@ -160,33 +160,30 @@ static inline void put_trace_clock(void)
+
+ static inline u64 trace_clock_read64(void)
+ {
+- struct lttng_trace_clock *ltc = READ_ONCE(lttng_trace_clock);
++ struct lttng_trace_clock *ltc = LTTNG_READ_ONCE(lttng_trace_clock);
+
+ if (likely(!ltc)) {
+ return trace_clock_read64_monotonic();
+ } else {
+- read_barrier_depends(); /* load ltc before content */
+ return ltc->read64();
+ }
+ }
+
+ static inline u64 trace_clock_freq(void)
+ {
+- struct lttng_trace_clock *ltc = READ_ONCE(lttng_trace_clock);
++ struct lttng_trace_clock *ltc = LTTNG_READ_ONCE(lttng_trace_clock);
+
+ if (!ltc) {
+ return trace_clock_freq_monotonic();
+ } else {
+- read_barrier_depends(); /* load ltc before content */
+ return ltc->freq();
+ }
+ }
+
+ static inline int trace_clock_uuid(char *uuid)
+ {
+- struct lttng_trace_clock *ltc = READ_ONCE(lttng_trace_clock);
++ struct lttng_trace_clock *ltc = LTTNG_READ_ONCE(lttng_trace_clock);
+
+- read_barrier_depends(); /* load ltc before content */
+ /* Use default UUID cb when NULL */
+ if (!ltc || !ltc->uuid) {
+ return trace_clock_uuid_monotonic(uuid);
+@@ -197,24 +194,22 @@ static inline int trace_clock_uuid(char *uuid)
+
+ static inline const char *trace_clock_name(void)
+ {
+- struct lttng_trace_clock *ltc = READ_ONCE(lttng_trace_clock);
++ struct lttng_trace_clock *ltc = LTTNG_READ_ONCE(lttng_trace_clock);
+
+ if (!ltc) {
+ return trace_clock_name_monotonic();
+ } else {
+- read_barrier_depends(); /* load ltc before content */
+ return ltc->name();
+ }
+ }
+
+ static inline const char *trace_clock_description(void)
+ {
+- struct lttng_trace_clock *ltc = READ_ONCE(lttng_trace_clock);
++ struct lttng_trace_clock *ltc = LTTNG_READ_ONCE(lttng_trace_clock);
+
+ if (!ltc) {
+ return trace_clock_description_monotonic();
+ } else {
+- read_barrier_depends(); /* load ltc before content */
+ return ltc->description();
+ }
+ }
+--
+2.19.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0007-fix-writeback-Drop-I_DIRTY_TIME_EXPIRE-v5.9.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0007-fix-writeback-Drop-I_DIRTY_TIME_EXPIRE-v5.9.patch
new file mode 100644
index 000000000..2843c9cb6
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0007-fix-writeback-Drop-I_DIRTY_TIME_EXPIRE-v5.9.patch
@@ -0,0 +1,59 @@
+From eae02feb58064eee5ce15a9f6bdffd107c47da05 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <mjeanson@efficios.com>
+Date: Mon, 31 Aug 2020 11:41:38 -0400
+Subject: [PATCH 07/10] fix: writeback: Drop I_DIRTY_TIME_EXPIRE (v5.9)
+
+See upstream commit:
+
+ commit 5fcd57505c002efc5823a7355e21f48dd02d5a51
+ Author: Jan Kara <jack@suse.cz>
+ Date: Fri May 29 16:24:43 2020 +0200
+
+ writeback: Drop I_DIRTY_TIME_EXPIRE
+
+ The only use of I_DIRTY_TIME_EXPIRE is to detect in
+ __writeback_single_inode() that inode got there because flush worker
+ decided it's time to writeback the dirty inode time stamps (either
+ because we are syncing or because of age). However we can detect this
+ directly in __writeback_single_inode() and there's no need for the
+ strange propagation with I_DIRTY_TIME_EXPIRE flag.
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Change-Id: I92e37c2ff3ec36d431e8f9de5c8e37c5a2da55ea
+---
+ instrumentation/events/lttng-module/writeback.h | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/instrumentation/events/lttng-module/writeback.h b/instrumentation/events/lttng-module/writeback.h
+index affb4eb..ece67ad 100644
+--- a/instrumentation/events/lttng-module/writeback.h
++++ b/instrumentation/events/lttng-module/writeback.h
+@@ -46,7 +46,21 @@ static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode)
+
+ #endif
+
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
++#define show_inode_state(state) \
++ __print_flags(state, "|", \
++ {I_DIRTY_SYNC, "I_DIRTY_SYNC"}, \
++ {I_DIRTY_DATASYNC, "I_DIRTY_DATASYNC"}, \
++ {I_DIRTY_PAGES, "I_DIRTY_PAGES"}, \
++ {I_NEW, "I_NEW"}, \
++ {I_WILL_FREE, "I_WILL_FREE"}, \
++ {I_FREEING, "I_FREEING"}, \
++ {I_CLEAR, "I_CLEAR"}, \
++ {I_SYNC, "I_SYNC"}, \
++ {I_DIRTY_TIME, "I_DIRTY_TIME"}, \
++ {I_REFERENCED, "I_REFERENCED"} \
++ )
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
+ #define show_inode_state(state) \
+ __print_flags(state, "|", \
+ {I_DIRTY_SYNC, "I_DIRTY_SYNC"}, \
+--
+2.19.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0008-fix-writeback-Fix-sync-livelock-due-to-b_dirty_time-.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0008-fix-writeback-Fix-sync-livelock-due-to-b_dirty_time-.patch
new file mode 100644
index 000000000..7a0d9a38b
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0008-fix-writeback-Fix-sync-livelock-due-to-b_dirty_time-.patch
@@ -0,0 +1,117 @@
+From 87b2affc3eb06f3fb2d0923f18af37713eb6814b Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <mjeanson@efficios.com>
+Date: Mon, 31 Aug 2020 14:16:01 -0400
+Subject: [PATCH 08/10] fix: writeback: Fix sync livelock due to b_dirty_time
+ processing (v5.9)
+
+See upstream commit:
+
+ commit f9cae926f35e8230330f28c7b743ad088611a8de
+ Author: Jan Kara <jack@suse.cz>
+ Date: Fri May 29 16:08:58 2020 +0200
+
+ writeback: Fix sync livelock due to b_dirty_time processing
+
+ When we are processing writeback for sync(2), move_expired_inodes()
+ didn't set any inode expiry value (older_than_this). This can result in
+ writeback never completing if there's steady stream of inodes added to
+ b_dirty_time list as writeback rechecks dirty lists after each writeback
+ round whether there's more work to be done. Fix the problem by using
+ sync(2) start time is inode expiry value when processing b_dirty_time
+ list similarly as for ordinarily dirtied inodes. This requires some
+ refactoring of older_than_this handling which simplifies the code
+ noticeably as a bonus.
+
+Upstream-Status: Backport
+
+Change-Id: I8b894b13ccc14d9b8983ee4c2810a927c319560b
+Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ .../events/lttng-module/writeback.h | 39 ++++++++++++-------
+ 1 file changed, 26 insertions(+), 13 deletions(-)
+
+diff --git a/instrumentation/events/lttng-module/writeback.h b/instrumentation/events/lttng-module/writeback.h
+index ece67ad..e9018dd 100644
+--- a/instrumentation/events/lttng-module/writeback.h
++++ b/instrumentation/events/lttng-module/writeback.h
+@@ -384,34 +384,48 @@ LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_balance_dirty_wait, writeback_wbc_balanc
+ #endif
+ LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writepage, writeback_wbc_writepage)
+
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
++LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
++ TP_PROTO(struct bdi_writeback *wb,
++ struct wb_writeback_work *work,
++ unsigned long dirtied_before,
++ int moved),
++ TP_ARGS(wb, work, dirtied_before, moved),
++ TP_FIELDS(
++ ctf_array_text(char, name, dev_name(wb->bdi->dev), 32)
++ ctf_integer(unsigned long, older, dirtied_before)
++ ctf_integer(int, moved, moved)
++ )
++)
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+ LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
+ TP_PROTO(struct bdi_writeback *wb,
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+ struct wb_writeback_work *work,
+-#else
+- unsigned long *older_than_this,
+-#endif
+ int moved),
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+ TP_ARGS(wb, work, moved),
+-#else
++ TP_FIELDS(
++ ctf_array_text(char, name, dev_name(wb->bdi->dev), 32)
++ ctf_integer(int, moved, moved)
++ )
++)
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
++LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
++ TP_PROTO(struct bdi_writeback *wb,
++ unsigned long *older_than_this,
++ int moved),
+ TP_ARGS(wb, older_than_this, moved),
+-#endif
+ TP_FIELDS(
+ ctf_array_text(char, name, dev_name(wb->bdi->dev), 32)
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+-#else
+ ctf_integer(unsigned long, older,
+ older_than_this ? *older_than_this : 0)
+ ctf_integer(long, age,
+ older_than_this ?
+ (jiffies - *older_than_this) * 1000 / HZ
+ : -1)
+-#endif
+ ctf_integer(int, moved, moved)
+ )
+ )
++#endif
+
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+ LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
+@@ -460,7 +474,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
+ ctf_integer(unsigned long, dirty_limit, global_dirty_limit)
+ )
+ )
+-#else
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+ LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
+
+ writeback_global_dirty_state,
+@@ -485,7 +499,6 @@ LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
+ )
+ )
+ #endif
+-#endif
+
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+
+--
+2.19.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0009-fix-version-ranges-for-ext4_discard_preallocations-a.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0009-fix-version-ranges-for-ext4_discard_preallocations-a.patch
new file mode 100644
index 000000000..346e1d63a
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0009-fix-version-ranges-for-ext4_discard_preallocations-a.patch
@@ -0,0 +1,52 @@
+From b74b25f349e92d7b5bdc8684e406d6a889f13773 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <mjeanson@efficios.com>
+Date: Fri, 4 Sep 2020 11:52:51 -0400
+Subject: [PATCH 09/10] fix: version ranges for ext4_discard_preallocations and
+ writeback_queue_io
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Change-Id: Id4fa53cb2e713cbda651e1a75deed91013115592
+---
+ instrumentation/events/lttng-module/ext4.h | 3 ++-
+ instrumentation/events/lttng-module/writeback.h | 8 +++++++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h
+index 4476abb..b172c8d 100644
+--- a/instrumentation/events/lttng-module/ext4.h
++++ b/instrumentation/events/lttng-module/ext4.h
+@@ -460,7 +460,8 @@ LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa,
+ )
+ #endif
+
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) || \
++ LTTNG_KERNEL_RANGE(5,8,6, 5,9,0))
+ LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
+ TP_PROTO(struct inode *inode, unsigned int len, unsigned int needed),
+
+diff --git a/instrumentation/events/lttng-module/writeback.h b/instrumentation/events/lttng-module/writeback.h
+index e9018dd..09637d7 100644
+--- a/instrumentation/events/lttng-module/writeback.h
++++ b/instrumentation/events/lttng-module/writeback.h
+@@ -384,7 +384,13 @@ LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_balance_dirty_wait, writeback_wbc_balanc
+ #endif
+ LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writepage, writeback_wbc_writepage)
+
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) || \
++ LTTNG_KERNEL_RANGE(5,8,6, 5,9,0) || \
++ LTTNG_KERNEL_RANGE(5,4,62, 5,5,0) || \
++ LTTNG_KERNEL_RANGE(4,19,143, 4,20,0) || \
++ LTTNG_KERNEL_RANGE(4,14,196, 4,15,0) || \
++ LTTNG_KERNEL_RANGE(4,9,235, 4,10,0) || \
++ LTTNG_KERNEL_RANGE(4,4,235, 4,5,0))
+ LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
+ TP_PROTO(struct bdi_writeback *wb,
+ struct wb_writeback_work *work,
+--
+2.19.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0010-Fix-system-call-filter-table.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0010-Fix-system-call-filter-table.patch
new file mode 100644
index 000000000..a16750ddb
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0010-Fix-system-call-filter-table.patch
@@ -0,0 +1,918 @@
+From ad594e3a953db1b0c3c059fde45b5a5494f6be78 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Tue, 28 Jan 2020 16:02:44 -0500
+Subject: [PATCH 10/10] Fix: system call filter table
+
+The system call filter table has effectively been unused for a long
+time due to system call name prefix mismatch. This means the overhead of
+selective system call tracing was larger than it should have been because
+the event payload preparation would be done for all system calls as soon
+as a single system call is traced.
+
+However, fixing this underlying issue unearths several issues that crept
+unnoticed when the "enabler" concept was introduced (after the original
+implementation of the system call filter table).
+
+Here is a list of the issues which are resolved here:
+
+- Split lttng_syscalls_unregister into an unregister and destroy
+ function, thus awaiting for a grace period (and therefore quiescence
+ of the users) after unregistering the system call tracepoints before
+ freeing the system call filter data structures. This effectively fixes
+ a use-after-free.
+
+- The state for enabling "all" system calls vs enabling specific system
+ calls (and sequences of enable-disable) was incorrect with respect to
+ the "enablers" semantic. This is solved by always tracking the
+ bitmap of enabled system calls, and keeping this bitmap even when
+ enabling all system calls. The sc_filter is now always allocated
+ before system call tracing is registered to tracepoints, which means
+ it does not need to be RCU dereferenced anymore.
+
+Padding fields in the ABI are reserved to select whether to:
+
+- Trace either native or compat system call (or both, which is the
+ behavior currently implemented),
+- Trace either system call entry or exit (or both, which is the
+ behavior currently implemented),
+- Select the system call to trace by name (behavior currently
+ implemented) or by system call number,
+
+Upstream-Status: Backport
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ lttng-abi.c | 43 ++++++
+ lttng-abi.h | 26 ++++
+ lttng-events.c | 112 +++++++++++++--
+ lttng-events.h | 31 ++++-
+ lttng-syscalls.c | 348 +++++++++++++++++++++++++----------------------
+ 5 files changed, 380 insertions(+), 180 deletions(-)
+
+diff --git a/lttng-abi.c b/lttng-abi.c
+index 64ea99d..b33879d 100644
+--- a/lttng-abi.c
++++ b/lttng-abi.c
+@@ -1264,6 +1264,46 @@ nomem:
+ return ret;
+ }
+
++static
++int lttng_abi_validate_event_param(struct lttng_kernel_event *event_param)
++{
++ /* Limit ABI to implemented features. */
++ switch (event_param->instrumentation) {
++ case LTTNG_KERNEL_SYSCALL:
++ switch (event_param->u.syscall.entryexit) {
++ case LTTNG_KERNEL_SYSCALL_ENTRYEXIT:
++ break;
++ default:
++ return -EINVAL;
++ }
++ switch (event_param->u.syscall.abi) {
++ case LTTNG_KERNEL_SYSCALL_ABI_ALL:
++ break;
++ default:
++ return -EINVAL;
++ }
++ switch (event_param->u.syscall.match) {
++ case LTTNG_SYSCALL_MATCH_NAME:
++ break;
++ default:
++ return -EINVAL;
++ }
++ break;
++
++ case LTTNG_KERNEL_TRACEPOINT: /* Fallthrough */
++ case LTTNG_KERNEL_KPROBE: /* Fallthrough */
++ case LTTNG_KERNEL_KRETPROBE: /* Fallthrough */
++ case LTTNG_KERNEL_NOOP: /* Fallthrough */
++ case LTTNG_KERNEL_UPROBE:
++ break;
++
++ case LTTNG_KERNEL_FUNCTION: /* Fallthrough */
++ default:
++ return -EINVAL;
++ }
++ return 0;
++}
++
+ static
+ int lttng_abi_create_event(struct file *channel_file,
+ struct lttng_kernel_event *event_param)
+@@ -1305,6 +1345,9 @@ int lttng_abi_create_event(struct file *channel_file,
+ ret = -EOVERFLOW;
+ goto refcount_error;
+ }
++ ret = lttng_abi_validate_event_param(event_param);
++ if (ret)
++ goto event_error;
+ if (event_param->instrumentation == LTTNG_KERNEL_TRACEPOINT
+ || event_param->instrumentation == LTTNG_KERNEL_SYSCALL) {
+ struct lttng_enabler *enabler;
+diff --git a/lttng-abi.h b/lttng-abi.h
+index 1d356ab..51d60e5 100644
+--- a/lttng-abi.h
++++ b/lttng-abi.h
+@@ -90,6 +90,31 @@ struct lttng_kernel_event_callsite {
+ } u;
+ } __attribute__((packed));
+
++enum lttng_kernel_syscall_entryexit {
++ LTTNG_KERNEL_SYSCALL_ENTRYEXIT = 0,
++ LTTNG_KERNEL_SYSCALL_ENTRY = 1, /* Not implemented. */
++ LTTNG_KERNEL_SYSCALL_EXIT = 2, /* Not implemented. */
++};
++
++enum lttng_kernel_syscall_abi {
++ LTTNG_KERNEL_SYSCALL_ABI_ALL = 0,
++ LTTNG_KERNEL_SYSCALL_ABI_NATIVE = 1, /* Not implemented. */
++ LTTNG_KERNEL_SYSCALL_ABI_COMPAT = 2, /* Not implemented. */
++};
++
++enum lttng_kernel_syscall_match {
++ LTTNG_SYSCALL_MATCH_NAME = 0,
++ LTTNG_SYSCALL_MATCH_NR = 1, /* Not implemented. */
++};
++
++struct lttng_kernel_syscall {
++ uint8_t entryexit; /* enum lttng_kernel_syscall_entryexit */
++ uint8_t abi; /* enum lttng_kernel_syscall_abi */
++ uint8_t match; /* enum lttng_kernel_syscall_match */
++ uint8_t padding;
++ uint32_t nr; /* For LTTNG_SYSCALL_MATCH_NR */
++} __attribute__((packed));
++
+ /*
+ * For syscall tracing, name = "*" means "enable all".
+ */
+@@ -106,6 +131,7 @@ struct lttng_kernel_event {
+ struct lttng_kernel_kprobe kprobe;
+ struct lttng_kernel_function_tracer ftrace;
+ struct lttng_kernel_uprobe uprobe;
++ struct lttng_kernel_syscall syscall;
+ char padding[LTTNG_KERNEL_EVENT_PADDING2];
+ } u;
+ } __attribute__((packed));
+diff --git a/lttng-events.c b/lttng-events.c
+index d719294..4c0b04a 100644
+--- a/lttng-events.c
++++ b/lttng-events.c
+@@ -201,6 +201,10 @@ void lttng_session_destroy(struct lttng_session *session)
+ WARN_ON(ret);
+ }
+ synchronize_trace(); /* Wait for in-flight events to complete */
++ list_for_each_entry(chan, &session->chan, list) {
++ ret = lttng_syscalls_destroy(chan);
++ WARN_ON(ret);
++ }
+ list_for_each_entry_safe(enabler, tmpenabler,
+ &session->enablers_head, node)
+ lttng_enabler_destroy(enabler);
+@@ -740,6 +744,28 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
+ event->enabled = 0;
+ event->registered = 0;
+ event->desc = event_desc;
++ switch (event_param->u.syscall.entryexit) {
++ case LTTNG_KERNEL_SYSCALL_ENTRYEXIT:
++ ret = -EINVAL;
++ goto register_error;
++ case LTTNG_KERNEL_SYSCALL_ENTRY:
++ event->u.syscall.entryexit = LTTNG_SYSCALL_ENTRY;
++ break;
++ case LTTNG_KERNEL_SYSCALL_EXIT:
++ event->u.syscall.entryexit = LTTNG_SYSCALL_EXIT;
++ break;
++ }
++ switch (event_param->u.syscall.abi) {
++ case LTTNG_KERNEL_SYSCALL_ABI_ALL:
++ ret = -EINVAL;
++ goto register_error;
++ case LTTNG_KERNEL_SYSCALL_ABI_NATIVE:
++ event->u.syscall.abi = LTTNG_SYSCALL_ABI_NATIVE;
++ break;
++ case LTTNG_KERNEL_SYSCALL_ABI_COMPAT:
++ event->u.syscall.abi = LTTNG_SYSCALL_ABI_COMPAT;
++ break;
++ }
+ if (!event->desc) {
+ ret = -EINVAL;
+ goto register_error;
+@@ -826,8 +852,7 @@ void register_event(struct lttng_event *event)
+ event);
+ break;
+ case LTTNG_KERNEL_SYSCALL:
+- ret = lttng_syscall_filter_enable(event->chan,
+- desc->name);
++ ret = lttng_syscall_filter_enable(event->chan, event);
+ break;
+ case LTTNG_KERNEL_KPROBE:
+ case LTTNG_KERNEL_UPROBE:
+@@ -870,8 +895,7 @@ int _lttng_event_unregister(struct lttng_event *event)
+ ret = 0;
+ break;
+ case LTTNG_KERNEL_SYSCALL:
+- ret = lttng_syscall_filter_disable(event->chan,
+- desc->name);
++ ret = lttng_syscall_filter_disable(event->chan, event);
+ break;
+ case LTTNG_KERNEL_NOOP:
+ ret = 0;
+@@ -1203,39 +1227,87 @@ int lttng_desc_match_enabler(const struct lttng_event_desc *desc,
+ struct lttng_enabler *enabler)
+ {
+ const char *desc_name, *enabler_name;
++ bool compat = false, entry = false;
+
+ enabler_name = enabler->event_param.name;
+ switch (enabler->event_param.instrumentation) {
+ case LTTNG_KERNEL_TRACEPOINT:
+ desc_name = desc->name;
++ switch (enabler->type) {
++ case LTTNG_ENABLER_STAR_GLOB:
++ return lttng_match_enabler_star_glob(desc_name, enabler_name);
++ case LTTNG_ENABLER_NAME:
++ return lttng_match_enabler_name(desc_name, enabler_name);
++ default:
++ return -EINVAL;
++ }
+ break;
+ case LTTNG_KERNEL_SYSCALL:
+ desc_name = desc->name;
+- if (!strncmp(desc_name, "compat_", strlen("compat_")))
++ if (!strncmp(desc_name, "compat_", strlen("compat_"))) {
+ desc_name += strlen("compat_");
++ compat = true;
++ }
+ if (!strncmp(desc_name, "syscall_exit_",
+ strlen("syscall_exit_"))) {
+ desc_name += strlen("syscall_exit_");
+ } else if (!strncmp(desc_name, "syscall_entry_",
+ strlen("syscall_entry_"))) {
+ desc_name += strlen("syscall_entry_");
++ entry = true;
+ } else {
+ WARN_ON_ONCE(1);
+ return -EINVAL;
+ }
++ switch (enabler->event_param.u.syscall.entryexit) {
++ case LTTNG_KERNEL_SYSCALL_ENTRYEXIT:
++ break;
++ case LTTNG_KERNEL_SYSCALL_ENTRY:
++ if (!entry)
++ return 0;
++ break;
++ case LTTNG_KERNEL_SYSCALL_EXIT:
++ if (entry)
++ return 0;
++ break;
++ default:
++ return -EINVAL;
++ }
++ switch (enabler->event_param.u.syscall.abi) {
++ case LTTNG_KERNEL_SYSCALL_ABI_ALL:
++ break;
++ case LTTNG_KERNEL_SYSCALL_ABI_NATIVE:
++ if (compat)
++ return 0;
++ break;
++ case LTTNG_KERNEL_SYSCALL_ABI_COMPAT:
++ if (!compat)
++ return 0;
++ break;
++ default:
++ return -EINVAL;
++ }
++ switch (enabler->event_param.u.syscall.match) {
++ case LTTNG_SYSCALL_MATCH_NAME:
++ switch (enabler->type) {
++ case LTTNG_ENABLER_STAR_GLOB:
++ return lttng_match_enabler_star_glob(desc_name, enabler_name);
++ case LTTNG_ENABLER_NAME:
++ return lttng_match_enabler_name(desc_name, enabler_name);
++ default:
++ return -EINVAL;
++ }
++ break;
++ case LTTNG_SYSCALL_MATCH_NR:
++ return -EINVAL; /* Not implemented. */
++ default:
++ return -EINVAL;
++ }
+ break;
+ default:
+ WARN_ON_ONCE(1);
+ return -EINVAL;
+ }
+- switch (enabler->type) {
+- case LTTNG_ENABLER_STAR_GLOB:
+- return lttng_match_enabler_star_glob(desc_name, enabler_name);
+- case LTTNG_ENABLER_NAME:
+- return lttng_match_enabler_name(desc_name, enabler_name);
+- default:
+- return -EINVAL;
+- }
+ }
+
+ static
+@@ -1361,9 +1433,21 @@ void lttng_create_event_if_missing(struct lttng_enabler *enabler)
+ static
+ int lttng_enabler_ref_events(struct lttng_enabler *enabler)
+ {
+- struct lttng_session *session = enabler->chan->session;
++ struct lttng_channel *chan = enabler->chan;
++ struct lttng_session *session = chan->session;
+ struct lttng_event *event;
+
++ if (enabler->event_param.instrumentation == LTTNG_KERNEL_SYSCALL &&
++ enabler->event_param.u.syscall.entryexit == LTTNG_KERNEL_SYSCALL_ENTRYEXIT &&
++ enabler->event_param.u.syscall.abi == LTTNG_KERNEL_SYSCALL_ABI_ALL &&
++ enabler->event_param.u.syscall.match == LTTNG_SYSCALL_MATCH_NAME &&
++ !strcmp(enabler->event_param.name, "*")) {
++ if (enabler->enabled)
++ WRITE_ONCE(chan->syscall_all, 1);
++ else
++ WRITE_ONCE(chan->syscall_all, 0);
++ }
++
+ /* First ensure that probe events are created for this enabler. */
+ lttng_create_event_if_missing(enabler);
+
+diff --git a/lttng-events.h b/lttng-events.h
+index a36a312..d4d9976 100644
+--- a/lttng-events.h
++++ b/lttng-events.h
+@@ -292,6 +292,16 @@ struct lttng_uprobe_handler {
+ struct list_head node;
+ };
+
++enum lttng_syscall_entryexit {
++ LTTNG_SYSCALL_ENTRY,
++ LTTNG_SYSCALL_EXIT,
++};
++
++enum lttng_syscall_abi {
++ LTTNG_SYSCALL_ABI_NATIVE,
++ LTTNG_SYSCALL_ABI_COMPAT,
++};
++
+ /*
+ * lttng_event structure is referred to by the tracing fast path. It must be
+ * kept small.
+@@ -318,6 +328,11 @@ struct lttng_event {
+ struct inode *inode;
+ struct list_head head;
+ } uprobe;
++ struct {
++ char *syscall_name;
++ enum lttng_syscall_entryexit entryexit;
++ enum lttng_syscall_abi abi;
++ } syscall;
+ } u;
+ struct list_head list; /* Event list in session */
+ unsigned int metadata_dumped:1;
+@@ -457,10 +472,10 @@ struct lttng_channel {
+ struct lttng_syscall_filter *sc_filter;
+ int header_type; /* 0: unset, 1: compact, 2: large */
+ enum channel_type channel_type;
++ int syscall_all;
+ unsigned int metadata_dumped:1,
+ sys_enter_registered:1,
+ sys_exit_registered:1,
+- syscall_all:1,
+ tstate:1; /* Transient enable state */
+ };
+
+@@ -653,10 +668,11 @@ void lttng_clock_unref(void);
+ #if defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS)
+ int lttng_syscalls_register(struct lttng_channel *chan, void *filter);
+ int lttng_syscalls_unregister(struct lttng_channel *chan);
++int lttng_syscalls_destroy(struct lttng_channel *chan);
+ int lttng_syscall_filter_enable(struct lttng_channel *chan,
+- const char *name);
++ struct lttng_event *event);
+ int lttng_syscall_filter_disable(struct lttng_channel *chan,
+- const char *name);
++ struct lttng_event *event);
+ long lttng_channel_syscall_mask(struct lttng_channel *channel,
+ struct lttng_kernel_syscall_mask __user *usyscall_mask);
+ #else
+@@ -670,14 +686,19 @@ static inline int lttng_syscalls_unregister(struct lttng_channel *chan)
+ return 0;
+ }
+
++static inline int lttng_syscalls_destroy(struct lttng_channel *chan)
++{
++ return 0;
++}
++
+ static inline int lttng_syscall_filter_enable(struct lttng_channel *chan,
+- const char *name)
++ struct lttng_event *event);
+ {
+ return -ENOSYS;
+ }
+
+ static inline int lttng_syscall_filter_disable(struct lttng_channel *chan,
+- const char *name)
++ struct lttng_event *event);
+ {
+ return -ENOSYS;
+ }
+diff --git a/lttng-syscalls.c b/lttng-syscalls.c
+index 97f1ba9..26cead6 100644
+--- a/lttng-syscalls.c
++++ b/lttng-syscalls.c
+@@ -367,8 +367,10 @@ const struct trace_syscall_entry compat_sc_exit_table[] = {
+ #undef CREATE_SYSCALL_TABLE
+
+ struct lttng_syscall_filter {
+- DECLARE_BITMAP(sc, NR_syscalls);
+- DECLARE_BITMAP(sc_compat, NR_compat_syscalls);
++ DECLARE_BITMAP(sc_entry, NR_syscalls);
++ DECLARE_BITMAP(sc_exit, NR_syscalls);
++ DECLARE_BITMAP(sc_compat_entry, NR_compat_syscalls);
++ DECLARE_BITMAP(sc_compat_exit, NR_compat_syscalls);
+ };
+
+ static void syscall_entry_unknown(struct lttng_event *event,
+@@ -391,29 +393,23 @@ void syscall_entry_probe(void *__data, struct pt_regs *regs, long id)
+ size_t table_len;
+
+ if (unlikely(in_compat_syscall())) {
+- struct lttng_syscall_filter *filter;
+-
+- filter = lttng_rcu_dereference(chan->sc_filter);
+- if (filter) {
+- if (id < 0 || id >= NR_compat_syscalls
+- || !test_bit(id, filter->sc_compat)) {
+- /* System call filtered out. */
+- return;
+- }
++ struct lttng_syscall_filter *filter = chan->sc_filter;
++
++ if (id < 0 || id >= NR_compat_syscalls
++ || (!READ_ONCE(chan->syscall_all) && !test_bit(id, filter->sc_compat_entry))) {
++ /* System call filtered out. */
++ return;
+ }
+ table = compat_sc_table;
+ table_len = ARRAY_SIZE(compat_sc_table);
+ unknown_event = chan->sc_compat_unknown;
+ } else {
+- struct lttng_syscall_filter *filter;
+-
+- filter = lttng_rcu_dereference(chan->sc_filter);
+- if (filter) {
+- if (id < 0 || id >= NR_syscalls
+- || !test_bit(id, filter->sc)) {
+- /* System call filtered out. */
+- return;
+- }
++ struct lttng_syscall_filter *filter = chan->sc_filter;
++
++ if (id < 0 || id >= NR_syscalls
++ || (!READ_ONCE(chan->syscall_all) && !test_bit(id, filter->sc_entry))) {
++ /* System call filtered out. */
++ return;
+ }
+ table = sc_table;
+ table_len = ARRAY_SIZE(sc_table);
+@@ -545,29 +541,23 @@ void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret)
+
+ id = syscall_get_nr(current, regs);
+ if (unlikely(in_compat_syscall())) {
+- struct lttng_syscall_filter *filter;
+-
+- filter = lttng_rcu_dereference(chan->sc_filter);
+- if (filter) {
+- if (id < 0 || id >= NR_compat_syscalls
+- || !test_bit(id, filter->sc_compat)) {
+- /* System call filtered out. */
+- return;
+- }
++ struct lttng_syscall_filter *filter = chan->sc_filter;
++
++ if (id < 0 || id >= NR_compat_syscalls
++ || (!READ_ONCE(chan->syscall_all) && !test_bit(id, filter->sc_compat_exit))) {
++ /* System call filtered out. */
++ return;
+ }
+ table = compat_sc_exit_table;
+ table_len = ARRAY_SIZE(compat_sc_exit_table);
+ unknown_event = chan->compat_sc_exit_unknown;
+ } else {
+- struct lttng_syscall_filter *filter;
+-
+- filter = lttng_rcu_dereference(chan->sc_filter);
+- if (filter) {
+- if (id < 0 || id >= NR_syscalls
+- || !test_bit(id, filter->sc)) {
+- /* System call filtered out. */
+- return;
+- }
++ struct lttng_syscall_filter *filter = chan->sc_filter;
++
++ if (id < 0 || id >= NR_syscalls
++ || (!READ_ONCE(chan->syscall_all) && !test_bit(id, filter->sc_exit))) {
++ /* System call filtered out. */
++ return;
+ }
+ table = sc_exit_table;
+ table_len = ARRAY_SIZE(sc_exit_table);
+@@ -713,27 +703,23 @@ int fill_table(const struct trace_syscall_entry *table, size_t table_len,
+ memset(&ev, 0, sizeof(ev));
+ switch (type) {
+ case SC_TYPE_ENTRY:
+- strncpy(ev.name, SYSCALL_ENTRY_STR,
+- LTTNG_KERNEL_SYM_NAME_LEN);
++ ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_ENTRY;
++ ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_NATIVE;
+ break;
+ case SC_TYPE_EXIT:
+- strncpy(ev.name, SYSCALL_EXIT_STR,
+- LTTNG_KERNEL_SYM_NAME_LEN);
++ ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_EXIT;
++ ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_NATIVE;
+ break;
+ case SC_TYPE_COMPAT_ENTRY:
+- strncpy(ev.name, COMPAT_SYSCALL_ENTRY_STR,
+- LTTNG_KERNEL_SYM_NAME_LEN);
++ ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_ENTRY;
++ ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
+ break;
+ case SC_TYPE_COMPAT_EXIT:
+- strncpy(ev.name, COMPAT_SYSCALL_EXIT_STR,
+- LTTNG_KERNEL_SYM_NAME_LEN);
+- break;
+- default:
+- BUG_ON(1);
++ ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_EXIT;
++ ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
+ break;
+ }
+- strncat(ev.name, desc->name,
+- LTTNG_KERNEL_SYM_NAME_LEN - strlen(ev.name) - 1);
++ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
+ ev.instrumentation = LTTNG_KERNEL_SYSCALL;
+ chan_table[i] = _lttng_event_create(chan, &ev, filter,
+@@ -803,6 +789,8 @@ int lttng_syscalls_register(struct lttng_channel *chan, void *filter)
+ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
+ ev.instrumentation = LTTNG_KERNEL_SYSCALL;
++ ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_ENTRY;
++ ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_NATIVE;
+ chan->sc_unknown = _lttng_event_create(chan, &ev, filter,
+ desc,
+ ev.instrumentation);
+@@ -820,6 +808,8 @@ int lttng_syscalls_register(struct lttng_channel *chan, void *filter)
+ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
+ ev.instrumentation = LTTNG_KERNEL_SYSCALL;
++ ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_ENTRY;
++ ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
+ chan->sc_compat_unknown = _lttng_event_create(chan, &ev, filter,
+ desc,
+ ev.instrumentation);
+@@ -837,6 +827,8 @@ int lttng_syscalls_register(struct lttng_channel *chan, void *filter)
+ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
+ ev.instrumentation = LTTNG_KERNEL_SYSCALL;
++ ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_EXIT;
++ ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
+ chan->compat_sc_exit_unknown = _lttng_event_create(chan, &ev,
+ filter, desc,
+ ev.instrumentation);
+@@ -854,6 +846,8 @@ int lttng_syscalls_register(struct lttng_channel *chan, void *filter)
+ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
+ ev.instrumentation = LTTNG_KERNEL_SYSCALL;
++ ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_EXIT;
++ ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_NATIVE;
+ chan->sc_exit_unknown = _lttng_event_create(chan, &ev, filter,
+ desc, ev.instrumentation);
+ WARN_ON_ONCE(!chan->sc_exit_unknown);
+@@ -883,6 +877,14 @@ int lttng_syscalls_register(struct lttng_channel *chan, void *filter)
+ if (ret)
+ return ret;
+ #endif
++
++ if (!chan->sc_filter) {
++ chan->sc_filter = kzalloc(sizeof(struct lttng_syscall_filter),
++ GFP_KERNEL);
++ if (!chan->sc_filter)
++ return -ENOMEM;
++ }
++
+ if (!chan->sys_enter_registered) {
+ ret = lttng_wrapper_tracepoint_probe_register("sys_enter",
+ (void *) syscall_entry_probe, chan);
+@@ -930,7 +932,11 @@ int lttng_syscalls_unregister(struct lttng_channel *chan)
+ return ret;
+ chan->sys_exit_registered = 0;
+ }
+- /* lttng_event destroy will be performed by lttng_session_destroy() */
++ return 0;
++}
++
++int lttng_syscalls_destroy(struct lttng_channel *chan)
++{
+ kfree(chan->sc_table);
+ kfree(chan->sc_exit_table);
+ #ifdef CONFIG_COMPAT
+@@ -993,136 +999,150 @@ uint32_t get_sc_tables_len(void)
+ return ARRAY_SIZE(sc_table) + ARRAY_SIZE(compat_sc_table);
+ }
+
+-int lttng_syscall_filter_enable(struct lttng_channel *chan,
+- const char *name)
++static
++const char *get_syscall_name(struct lttng_event *event)
+ {
+- int syscall_nr, compat_syscall_nr, ret;
+- struct lttng_syscall_filter *filter;
++ size_t prefix_len = 0;
+
+- WARN_ON_ONCE(!chan->sc_table);
++ WARN_ON_ONCE(event->instrumentation != LTTNG_KERNEL_SYSCALL);
+
+- if (!name) {
+- /* Enable all system calls by removing filter */
+- if (chan->sc_filter) {
+- filter = chan->sc_filter;
+- rcu_assign_pointer(chan->sc_filter, NULL);
+- synchronize_trace();
+- kfree(filter);
++ switch (event->u.syscall.entryexit) {
++ case LTTNG_SYSCALL_ENTRY:
++ switch (event->u.syscall.abi) {
++ case LTTNG_SYSCALL_ABI_NATIVE:
++ prefix_len = strlen(SYSCALL_ENTRY_STR);
++ break;
++ case LTTNG_SYSCALL_ABI_COMPAT:
++ prefix_len = strlen(COMPAT_SYSCALL_ENTRY_STR);
++ break;
+ }
+- chan->syscall_all = 1;
+- return 0;
+- }
+-
+- if (!chan->sc_filter) {
+- if (chan->syscall_all) {
+- /*
+- * All syscalls are already enabled.
+- */
+- return -EEXIST;
++ break;
++ case LTTNG_SYSCALL_EXIT:
++ switch (event->u.syscall.abi) {
++ case LTTNG_SYSCALL_ABI_NATIVE:
++ prefix_len = strlen(SYSCALL_EXIT_STR);
++ break;
++ case LTTNG_SYSCALL_ABI_COMPAT:
++ prefix_len = strlen(COMPAT_SYSCALL_EXIT_STR);
++ break;
+ }
+- filter = kzalloc(sizeof(struct lttng_syscall_filter),
+- GFP_KERNEL);
+- if (!filter)
+- return -ENOMEM;
+- } else {
+- filter = chan->sc_filter;
++ break;
+ }
+- syscall_nr = get_syscall_nr(name);
+- compat_syscall_nr = get_compat_syscall_nr(name);
+- if (syscall_nr < 0 && compat_syscall_nr < 0) {
+- ret = -ENOENT;
+- goto error;
++ WARN_ON_ONCE(prefix_len == 0);
++ return event->desc->name + prefix_len;
++}
++
++int lttng_syscall_filter_enable(struct lttng_channel *chan,
++ struct lttng_event *event)
++{
++ struct lttng_syscall_filter *filter = chan->sc_filter;
++ const char *syscall_name;
++ unsigned long *bitmap;
++ int syscall_nr;
++
++ WARN_ON_ONCE(!chan->sc_table);
++
++ syscall_name = get_syscall_name(event);
++
++ switch (event->u.syscall.abi) {
++ case LTTNG_SYSCALL_ABI_NATIVE:
++ syscall_nr = get_syscall_nr(syscall_name);
++ break;
++ case LTTNG_SYSCALL_ABI_COMPAT:
++ syscall_nr = get_compat_syscall_nr(syscall_name);
++ break;
++ default:
++ return -EINVAL;
+ }
+- if (syscall_nr >= 0) {
+- if (test_bit(syscall_nr, filter->sc)) {
+- ret = -EEXIST;
+- goto error;
++ if (syscall_nr < 0)
++ return -ENOENT;
++
++
++ switch (event->u.syscall.entryexit) {
++ case LTTNG_SYSCALL_ENTRY:
++ switch (event->u.syscall.abi) {
++ case LTTNG_SYSCALL_ABI_NATIVE:
++ bitmap = filter->sc_entry;
++ break;
++ case LTTNG_SYSCALL_ABI_COMPAT:
++ bitmap = filter->sc_compat_entry;
++ break;
+ }
+- bitmap_set(filter->sc, syscall_nr, 1);
+- }
+- if (compat_syscall_nr >= 0) {
+- if (test_bit(compat_syscall_nr, filter->sc_compat)) {
+- ret = -EEXIST;
+- goto error;
++ break;
++ case LTTNG_SYSCALL_EXIT:
++ switch (event->u.syscall.abi) {
++ case LTTNG_SYSCALL_ABI_NATIVE:
++ bitmap = filter->sc_exit;
++ break;
++ case LTTNG_SYSCALL_ABI_COMPAT:
++ bitmap = filter->sc_compat_exit;
++ break;
+ }
+- bitmap_set(filter->sc_compat, compat_syscall_nr, 1);
++ break;
++ default:
++ return -EINVAL;
+ }
+- if (!chan->sc_filter)
+- rcu_assign_pointer(chan->sc_filter, filter);
++ if (test_bit(syscall_nr, bitmap))
++ return -EEXIST;
++ bitmap_set(bitmap, syscall_nr, 1);
+ return 0;
+-
+-error:
+- if (!chan->sc_filter)
+- kfree(filter);
+- return ret;
+ }
+
+ int lttng_syscall_filter_disable(struct lttng_channel *chan,
+- const char *name)
++ struct lttng_event *event)
+ {
+- int syscall_nr, compat_syscall_nr, ret;
+- struct lttng_syscall_filter *filter;
++ struct lttng_syscall_filter *filter = chan->sc_filter;
++ const char *syscall_name;
++ unsigned long *bitmap;
++ int syscall_nr;
+
+ WARN_ON_ONCE(!chan->sc_table);
+
+- if (!chan->sc_filter) {
+- if (!chan->syscall_all)
+- return -EEXIST;
+- filter = kzalloc(sizeof(struct lttng_syscall_filter),
+- GFP_KERNEL);
+- if (!filter)
+- return -ENOMEM;
+- /* Trace all system calls, then apply disable. */
+- bitmap_set(filter->sc, 0, NR_syscalls);
+- bitmap_set(filter->sc_compat, 0, NR_compat_syscalls);
+- } else {
+- filter = chan->sc_filter;
++ syscall_name = get_syscall_name(event);
++
++ switch (event->u.syscall.abi) {
++ case LTTNG_SYSCALL_ABI_NATIVE:
++ syscall_nr = get_syscall_nr(syscall_name);
++ break;
++ case LTTNG_SYSCALL_ABI_COMPAT:
++ syscall_nr = get_compat_syscall_nr(syscall_name);
++ break;
++ default:
++ return -EINVAL;
+ }
++ if (syscall_nr < 0)
++ return -ENOENT;
+
+- if (!name) {
+- /* Fail if all syscalls are already disabled. */
+- if (bitmap_empty(filter->sc, NR_syscalls)
+- && bitmap_empty(filter->sc_compat,
+- NR_compat_syscalls)) {
+- ret = -EEXIST;
+- goto error;
+- }
+
+- /* Disable all system calls */
+- bitmap_clear(filter->sc, 0, NR_syscalls);
+- bitmap_clear(filter->sc_compat, 0, NR_compat_syscalls);
+- goto apply_filter;
+- }
+- syscall_nr = get_syscall_nr(name);
+- compat_syscall_nr = get_compat_syscall_nr(name);
+- if (syscall_nr < 0 && compat_syscall_nr < 0) {
+- ret = -ENOENT;
+- goto error;
+- }
+- if (syscall_nr >= 0) {
+- if (!test_bit(syscall_nr, filter->sc)) {
+- ret = -EEXIST;
+- goto error;
++ switch (event->u.syscall.entryexit) {
++ case LTTNG_SYSCALL_ENTRY:
++ switch (event->u.syscall.abi) {
++ case LTTNG_SYSCALL_ABI_NATIVE:
++ bitmap = filter->sc_entry;
++ break;
++ case LTTNG_SYSCALL_ABI_COMPAT:
++ bitmap = filter->sc_compat_entry;
++ break;
+ }
+- bitmap_clear(filter->sc, syscall_nr, 1);
+- }
+- if (compat_syscall_nr >= 0) {
+- if (!test_bit(compat_syscall_nr, filter->sc_compat)) {
+- ret = -EEXIST;
+- goto error;
++ break;
++ case LTTNG_SYSCALL_EXIT:
++ switch (event->u.syscall.abi) {
++ case LTTNG_SYSCALL_ABI_NATIVE:
++ bitmap = filter->sc_exit;
++ break;
++ case LTTNG_SYSCALL_ABI_COMPAT:
++ bitmap = filter->sc_compat_exit;
++ break;
+ }
+- bitmap_clear(filter->sc_compat, compat_syscall_nr, 1);
++ break;
++ default:
++ return -EINVAL;
+ }
+-apply_filter:
+- if (!chan->sc_filter)
+- rcu_assign_pointer(chan->sc_filter, filter);
+- chan->syscall_all = 0;
+- return 0;
++ if (!test_bit(syscall_nr, bitmap))
++ return -EEXIST;
++ bitmap_clear(bitmap, syscall_nr, 1);
+
+-error:
+- if (!chan->sc_filter)
+- kfree(filter);
+- return ret;
++ return 0;
+ }
+
+ static
+@@ -1236,6 +1256,9 @@ const struct file_operations lttng_syscall_list_fops = {
+ .release = seq_release,
+ };
+
++/*
++ * A syscall is enabled if it is traced for either entry or exit.
++ */
+ long lttng_channel_syscall_mask(struct lttng_channel *channel,
+ struct lttng_kernel_syscall_mask __user *usyscall_mask)
+ {
+@@ -1262,8 +1285,9 @@ long lttng_channel_syscall_mask(struct lttng_channel *channel,
+ char state;
+
+ if (channel->sc_table) {
+- if (filter)
+- state = test_bit(bit, filter->sc);
++ if (!READ_ONCE(channel->syscall_all) && filter)
++ state = test_bit(bit, filter->sc_entry)
++ || test_bit(bit, filter->sc_exit);
+ else
+ state = 1;
+ } else {
+@@ -1275,9 +1299,11 @@ long lttng_channel_syscall_mask(struct lttng_channel *channel,
+ char state;
+
+ if (channel->compat_sc_table) {
+- if (filter)
++ if (!READ_ONCE(channel->syscall_all) && filter)
+ state = test_bit(bit - ARRAY_SIZE(sc_table),
+- filter->sc_compat);
++ filter->sc_compat_entry)
++ || test_bit(bit - ARRAY_SIZE(sc_table),
++ filter->sc_compat_exit);
+ else
+ state = 1;
+ } else {
+--
+2.19.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules_2.12.0.bb b/poky/meta/recipes-kernel/lttng/lttng-modules_2.12.2.bb
index 4a6c42e3b..e36b327a0 100644
--- a/poky/meta/recipes-kernel/lttng/lttng-modules_2.12.0.bb
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules_2.12.2.bb
@@ -6,19 +6,24 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128"
inherit module
-COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
+include lttng-platforms.inc
SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
- file://0001-Update-for-kernel-5.7-use-vmalloc_sync_mappings-on-k.patch \
- file://0002-Fix-missing-wrapper-rename-to-wrapper_vmalloc_sync_m.patch \
- file://0003-Fix-Use-vmalloc_sync_mappings-on-kernel-5.6-as-well.patch \
- file://0004-Update-Use-vmalloc_sync_mappings-for-stable-kernels.patch \
+ file://0001-Kconfig-fix-dependency-issue-when-building-in-tree-w.patch \
+ file://0002-fix-Move-mmutrace.h-into-the-mmu-sub-directory-v5.9.patch \
+ file://0003-fix-KVM-x86-mmu-Make-kvm_mmu_page-definition-and-acc.patch \
+ file://0004-fix-ext4-limit-the-length-of-per-inode-prealloc-list.patch \
+ file://0005-fix-ext4-indicate-via-a-block-bitmap-read-is-prefetc.patch \
+ file://0006-fix-removal-of-smp_-read_barrier_depends-v5.9.patch \
+ file://0007-fix-writeback-Drop-I_DIRTY_TIME_EXPIRE-v5.9.patch \
+ file://0008-fix-writeback-Fix-sync-livelock-due-to-b_dirty_time-.patch \
+ file://0009-fix-version-ranges-for-ext4_discard_preallocations-a.patch \
+ file://0010-Fix-system-call-filter-table.patch \
"
-SRC_URI[md5sum] = "be252df5013ea03894921d0b493c7b6c"
-SRC_URI[sha256sum] = "efeb2ae60e96dbe9a9b342d3a80dfc7642f06a8c09686089d491ad696bb98f4d"
+SRC_URI[sha256sum] = "df50bc3bd58679705714f17721acf619a8b0cedc694f8a97052aa5099626feca"
export INSTALL_MOD_DIR="kernel/lttng-modules"
@@ -41,7 +46,7 @@ SRC_URI_class-devupstream = "git://git.lttng.org/lttng-modules;branch=stable-2.1
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
"
-SRCREV_class-devupstream = "17c413953603f063f2a9d6c3788bec914ce6f955"
-PV_class-devupstream = "2.12.0+git${SRCPV}"
+SRCREV_class-devupstream = "ad594e3a953db1b0c3c059fde45b5a5494f6be78"
+PV_class-devupstream = "2.12.2+git${SRCPV}"
S_class-devupstream = "${WORKDIR}/git"
SRCREV_FORMAT ?= "lttng_git"
diff --git a/poky/meta/recipes-kernel/lttng/lttng-platforms.inc b/poky/meta/recipes-kernel/lttng/lttng-platforms.inc
new file mode 100644
index 000000000..aa8220bbb
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-platforms.inc
@@ -0,0 +1,17 @@
+#
+# Whether the platform supports kernel tracing
+#
+LTTNGMODULES = "lttng-modules"
+LTTNGMODULES_arc = ""
+LTTNGMODULES_riscv64 = ""
+
+COMPATIBLE_HOST_riscv64_pn-lttng-modules = "null"
+COMPATIBLE_HOST_arc_pn-lttng-modules = "null"
+
+# Whether the platform supports userspace tracing
+# lttng-ust uses sched_getcpu() which is not there on for some platforms.
+LTTNGUST = "lttng-ust"
+LTTNGUST_arc = ""
+
+COMPATIBLE_HOST_arc_pn-lttng-ust = "null"
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/0001-tests-gen-ust-events-ns-tp.h-Fix-build-with-musl-lib.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/0001-tests-gen-ust-events-ns-tp.h-Fix-build-with-musl-lib.patch
deleted file mode 100644
index a150d648a..000000000
--- a/poky/meta/recipes-kernel/lttng/lttng-tools/0001-tests-gen-ust-events-ns-tp.h-Fix-build-with-musl-lib.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From e5d94cf4882cc6516af52b794c6acb8e4d6469a3 Mon Sep 17 00:00:00 2001
-From: Ovidiu Panait <ovidiu.panait@windriver.com>
-Date: Mon, 18 May 2020 16:39:26 +0300
-Subject: [PATCH] tests: gen-ust-events-ns/tp.h: Fix build with musl libc
-
-Fix the following build error with musl libc:
-In file included from ../../../../../lttng-tools-2.12.0/tests/utils/testapp/gen-ust-events-ns/tp.h:14,
- from ../../../../../lttng-tools-2.12.0/tests/utils/testapp/gen-ust-events-ns/tp.c:10:
-../../../../../lttng-tools-2.12.0/tests/utils/testapp/gen-ust-events-ns/tp.h:17:10: error: unknown type name 'ino_t'; did you mean 'int8_t'?
- 17 | TP_ARGS(ino_t, ns_ino),
- | ^~~~~
-../../../../../lttng-tools-2.12.0/tests/utils/testapp/gen-ust-events-ns/tp.h:17:10: error: unknown type name 'ino_t'; did you mean 'int8_t'?
- 17 | TP_ARGS(ino_t, ns_ino),
- | ^~~~~
-../../../../../lttng-tools-2.12.0/tests/utils/testapp/gen-ust-events-ns/./tp.h:17:2: error: unknown type name 'ino_t'; did you mean 'int8_t'?
- 17 | TP_ARGS(ino_t, ns_ino),
- | ^~~~~~~
-../../../../../lttng-tools-2.12.0/tests/utils/testapp/gen-ust-events-ns/./tp.h:17:2: error: unknown type name 'ino_t'; did you mean 'int8_t'?
- 17 | TP_ARGS(ino_t, ns_ino),
- | ^~~~~~~
-
-Upstream-Status: Submitted [https://github.com/lttng/lttng-tools/pull/161]
-
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
----
- tests/utils/testapp/gen-ust-events-ns/tp.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tests/utils/testapp/gen-ust-events-ns/tp.h b/tests/utils/testapp/gen-ust-events-ns/tp.h
-index 4dbfed5..e0ddb29 100644
---- a/tests/utils/testapp/gen-ust-events-ns/tp.h
-+++ b/tests/utils/testapp/gen-ust-events-ns/tp.h
-@@ -11,6 +11,7 @@
- #if !defined(_TRACEPOINT_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
- #define _TRACEPOINT_TP_H
-
-+#include <sys/types.h>
- #include <lttng/tracepoint.h>
-
- TRACEPOINT_EVENT(tp, tptest,
---
-2.17.1
-
diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools_2.12.0.bb b/poky/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb
index 148a7928d..0787e04d1 100644
--- a/poky/meta/recipes-kernel/lttng/lttng-tools_2.12.0.bb
+++ b/poky/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb
@@ -9,9 +9,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=40ef17463fbd6f377db3c47b1cbaded8 \
file://LICENSES/GPL-2.0;md5=e68f69a54b44ba526ad7cb963e18fbce \
file://LICENSES/LGPL-2.1;md5=9920968d0f2ff585ce61fae30344dd95"
+include lttng-platforms.inc
+
DEPENDS = "liburcu popt libxml2 util-linux"
RDEPENDS_${PN} = "libgcc"
-RDEPENDS_${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod lttng-modules sed python3-core"
+RRECOMMENDS_${PN} += "${LTTNGMODULES}"
+RDEPENDS_${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod ${LTTNGMODULES} sed python3-core"
RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
RDEPENDS_${PN}-ptest_append_libc-musl = " musl-utils"
# babelstats.pl wants getopt-long
@@ -21,23 +24,20 @@ PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
"
-PACKAGECONFIG ??= "lttng-ust"
+PACKAGECONFIG ??= "${LTTNGUST}"
PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native"
PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust"
PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod"
PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
-PACKAGECONFIG_remove_arc = "lttng-ust"
SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
file://0001-tests-do-not-strip-a-helper-library.patch \
file://run-ptest \
file://lttng-sessiond.service \
file://0001-tests-regression-disable-the-tools-live-tests.patch \
- file://0001-tests-gen-ust-events-ns-tp.h-Fix-build-with-musl-lib.patch \
"
-SRC_URI[md5sum] = "4592201ea981f0722438345fb1f009d2"
-SRC_URI[sha256sum] = "405661d27617dc79a42712174a051a45c7ca12d167576c0d93f2de708ed29445"
+SRC_URI[sha256sum] = "9ed9161795ff023b076f9f95afaa4f1f822ec42495c0fa04c586ab8fa74e84f1"
inherit autotools ptest pkgconfig useradd python3-dir manpages systemd
diff --git a/poky/meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb b/poky/meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb
index ad544d1b4..67a4307c7 100644
--- a/poky/meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb
+++ b/poky/meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb
@@ -15,6 +15,8 @@ PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
inherit autotools lib_package manpages python3native
+include lttng-platforms.inc
+
EXTRA_OECONF = "--disable-numa"
DEPENDS = "liburcu util-linux"
diff --git a/poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb b/poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
index 0be1422a2..1ab248fed 100644
--- a/poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
+++ b/poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
@@ -15,15 +15,18 @@ do_compile[depends] += "virtual/kernel:do_compile_kernelmodules"
RDEPENDS_${PN}-dev = ""
DEPENDS += "bc-native bison-native"
+DEPENDS += "gmp-native"
EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
+EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}""
# Build some host tools under work-shared. CC, LD, and AR are probably
# not used, but this is the historical way of invoking "make scripts".
#
do_configure() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
- -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts prepare
-
+ for t in prepare scripts_basic scripts; do
+ oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
+ -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} $t
+ done
}
diff --git a/poky/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb b/poky/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
index 0f3df5577..881b7db92 100644
--- a/poky/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
+++ b/poky/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
@@ -24,7 +24,7 @@ do_install () {
PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
pkg_postinst_${PN} () {
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ if type systemctl >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPTS="--root=$D"
fi
diff --git a/poky/meta/recipes-kernel/perf/perf.bb b/poky/meta/recipes-kernel/perf/perf.bb
index d331d1b8c..5faf22a26 100644
--- a/poky/meta/recipes-kernel/perf/perf.bb
+++ b/poky/meta/recipes-kernel/perf/perf.bb
@@ -26,6 +26,8 @@ PACKAGECONFIG[jvmti] = ",NO_JVMTI=1"
PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit"
PACKAGECONFIG[manpages] = ",,xmlto-native asciidoc-native"
PACKAGECONFIG[cap] = ",,libcap"
+# Arm CoreSight
+PACKAGECONFIG[coresight] = "CORESIGHT=1,,opencsd"
# libunwind is not yet ported for some architectures
PACKAGECONFIG_remove_arc = "libunwind"
@@ -68,6 +70,7 @@ SPDX_S = "${S}/tools/perf"
LDFLAGS="-ldl -lutil"
EXTRA_OEMAKE = '\
+ V=1 \
-C ${S}/tools/perf \
O=${B} \
CROSS_COMPILE=${TARGET_PREFIX} \
@@ -199,6 +202,9 @@ do_configure_prepend () {
${S}/tools/perf/Makefile.perf
sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
${S}/tools/perf/Makefile.perf
+ # backport https://github.com/torvalds/linux/commit/e4ffd066ff440a57097e9140fa9e16ceef905de8
+ sed -i -e 's,\($(Q)$(SHELL) .$(arch_errno_tbl).\) $(CC) $(arch_errno_hdr_dir),\1 $(firstword $(CC)) $(arch_errno_hdr_dir),g' \
+ ${S}/tools/perf/Makefile.perf
fi
sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
${S}/tools/perf/Makefile*
diff --git a/poky/meta/recipes-kernel/powertop/powertop_2.10.bb b/poky/meta/recipes-kernel/powertop/powertop_2.13.bb
index f1b0e92b2..8c7e78fd9 100644
--- a/poky/meta/recipes-kernel/powertop/powertop_2.10.bb
+++ b/poky/meta/recipes-kernel/powertop/powertop_2.13.bb
@@ -2,18 +2,18 @@ SUMMARY = "Power usage tool"
DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management."
HOMEPAGE = "https://01.org/powertop/"
BUGTRACKER = "https://app.devzing.com/powertopbugs/bugzilla"
-DEPENDS = "ncurses libnl pciutils"
+DEPENDS = "ncurses libnl pciutils autoconf-archive"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
SRC_URI = "git://github.com/fenrus75/powertop;protocol=https \
file://0001-wakeup_xxx.h-include-limits.h.patch \
"
-SRCREV = "e8765b5475b22b7a2b6e9e8a031c68a268a0b0b3"
+SRCREV = "184cee06b2d64679bae5f806fe0a218827fdde99"
S = "${WORKDIR}/git"
-inherit autotools gettext pkgconfig
+inherit autotools gettext pkgconfig bash-completion
# we do not want libncursesw if we can
do_configure_prepend() {
@@ -22,6 +22,7 @@ do_configure_prepend() {
mkdir -p ${B}/src/tuning/
echo "${PV}" > ${S}/version-long
echo "${PV}" > ${S}/version-short
+ cp ${STAGING_DATADIR}/aclocal/ax_require_defined.m4 ${S}/m4/
}
inherit update-alternatives
diff --git a/poky/meta/recipes-kernel/systemtap/systemtap_git.inc b/poky/meta/recipes-kernel/systemtap/systemtap_git.inc
index 116e83fe0..56fa51d61 100644
--- a/poky/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/poky/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -1,7 +1,7 @@
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRCREV = "044a0640985ef007c0b2fb6eaf660d9d51800cda"
-PV = "4.2"
+SRCREV = "82b8e1a07a31bf37ed05d6ebc5162b054c0be9fd"
+PV = "4.3"
SRC_URI = "git://sourceware.org/git/systemtap.git \
file://0001-Do-not-let-configure-write-a-python-location-into-th.patch \