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/kern-tools/kern-tools-native_git.bb2
-rw-r--r--poky/meta/recipes-kernel/linux-firmware/linux-firmware_20210208.bb42
-rw-r--r--poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc1
-rw-r--r--poky/meta/recipes-kernel/linux/kernel-devsrc.bb1
-rw-r--r--poky/meta/recipes-kernel/linux/linux-dummy.bb2
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto-dev.bb2
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb6
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb6
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb8
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb8
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto_5.10.bb26
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto_5.4.bb22
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-memory-leaks-on-event-destroy.patch58
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-filter-interpreter-early-exits-on-uninitialized-.patch159
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-mm-tracing-record-slab-name-for-kmem_cache_free-.patch91
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-kretprobe-null-ptr-deref-on-session-destroy.patch41
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules_2.12.5.bb (renamed from poky/meta/recipes-kernel/lttng/lttng-modules_2.12.4.bb)11
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-tools_2.12.3.bb (renamed from poky/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb)2
-rw-r--r--poky/meta/recipes-kernel/perf/perf.bb55
-rwxr-xr-xpoky/meta/recipes-kernel/perf/perf/sort-pmuevents.py93
-rw-r--r--poky/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb2
21 files changed, 584 insertions, 54 deletions
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 70b2908fd4..1d900d85fa 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
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://tools/kgit;beginline=5;endline=9;md5=9c30e971d435e249
DEPENDS = "git-native"
-SRCREV = "73f813024d33432116a122524fd2ae48afc910c7"
+SRCREV = "8f6aaab7f64c6de30d267e31a73f7c3bb30125a9"
PR = "r12"
PV = "0.2+git${SRCPV}"
diff --git a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20210208.bb b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20210208.bb
index 0013e24580..78856cbf66 100644
--- a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20210208.bb
+++ b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20210208.bb
@@ -1,4 +1,5 @@
SUMMARY = "Firmware files for use with Linux kernel"
+HOMEPAGE = "https://www.kernel.org/"
DESCRIPTION = "Linux firmware is a package distributed alongside the Linux kernel \
that contains firmware binary blobs necessary for partial or full functionality \
of certain hardware devices."
@@ -495,6 +496,13 @@ FILES_${PN}-netronome = " \
${nonarch_base_libdir}/firmware/netronome/nic_AMDA0096*.nffw \
${nonarch_base_libdir}/firmware/netronome/nic_AMDA0097*.nffw \
${nonarch_base_libdir}/firmware/netronome/nic_AMDA0099*.nffw \
+ ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0058-0011_2x40.nffw \
+ ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0058-0012_2x40.nffw \
+ ${nonarch_base_libdir}/firmware/netronome/nic_AMDA0078-0011_1x100.nffw \
+ ${nonarch_base_libdir}/firmware/netronome/bpf \
+ ${nonarch_base_libdir}/firmware/netronome/flower \
+ ${nonarch_base_libdir}/firmware/netronome/nic \
+ ${nonarch_base_libdir}/firmware/netronome/nic-sriov \
"
RDEPENDS_${PN}-netronome += "${PN}-netronome-license"
@@ -621,7 +629,9 @@ FILES_${PN}-bcm4329 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4329-sdio.bi
FILES_${PN}-bcm4330 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4330-sdio.*"
FILES_${PN}-bcm4334 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4334-sdio.bin"
FILES_${PN}-bcm4335 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4335-sdio.bin"
-FILES_${PN}-bcm4339 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4339-sdio.bin"
+FILES_${PN}-bcm4339 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4339-sdio.bin \
+ ${nonarch_base_libdir}/firmware/cypress/cyfmac4339-sdio.bin \
+"
FILES_${PN}-bcm43241b0 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43241b0-sdio.bin"
FILES_${PN}-bcm43241b4 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43241b4-sdio.bin"
FILES_${PN}-bcm43241b5 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43241b5-sdio.bin"
@@ -630,12 +640,18 @@ FILES_${PN}-bcm43143 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43143.bin \
${nonarch_base_libdir}/firmware/brcm/brcmfmac43143-sdio.bin \
"
FILES_${PN}-bcm43430a0 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430a0-sdio.*"
-FILES_${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.*"
+FILES_${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.* \
+ ${nonarch_base_libdir}/firmware/cypress/cyfmac43455-sdio.* \
+"
FILES_${PN}-bcm4350c2 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4350c2-pcie.bin"
FILES_${PN}-bcm4350 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4350-pcie.bin"
-FILES_${PN}-bcm4356 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-sdio.bin"
+FILES_${PN}-bcm4356 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-sdio.bin \
+ ${nonarch_base_libdir}/firmware/cypress/cyfmac4356-sdio.bin \
+"
FILES_${PN}-bcm43569 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43569.bin"
-FILES_${PN}-bcm43570 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43570-pcie.bin"
+FILES_${PN}-bcm43570 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43570-pcie.bin \
+ ${nonarch_base_libdir}/firmware/cypress/cyfmac43570-pcie.bin \
+"
FILES_${PN}-bcm4358 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4358-pcie.bin"
FILES_${PN}-bcm43602 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43602-pcie.bin \
${nonarch_base_libdir}/firmware/brcm/brcmfmac43602-pcie.ap.bin \
@@ -706,13 +722,21 @@ LICENSE_${PN}-cypress-license = "Firmware-cypress"
FILES_${PN}-cypress-license = "${nonarch_base_libdir}/firmware/LICENCE.cypress"
FILES_${PN}-bcm-0bb4-0306 = "${nonarch_base_libdir}/firmware/brcm/BCM-0bb4-0306.hcd"
-FILES_${PN}-bcm43340 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43340-sdio.*"
-FILES_${PN}-bcm43362 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43362-sdio.*"
-FILES_${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.*"
-FILES_${PN}-bcm4354 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4354-sdio.bin"
-FILES_${PN}-bcm4356-pcie = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-pcie.*"
+FILES_${PN}-bcm43340 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43340-sdio.* \
+ ${nonarch_base_libdir}/firmware/cypress/cyfmac43340-sdio.*"
+FILES_${PN}-bcm43362 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43362-sdio.* \
+ ${nonarch_base_libdir}/firmware/cypress/cyfmac43362-sdio.*"
+FILES_${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.* \
+ ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.*"
+FILES_${PN}-bcm4354 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4354-sdio.bin \
+ ${nonarch_base_libdir}/firmware/cypress/cyfmac4354-sdio.bin \
+"
+FILES_${PN}-bcm4356-pcie = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-pcie.* \
+ ${nonarch_base_libdir}/firmware/cypress/cyfmac4356-pcie.* \
+"
FILES_${PN}-bcm4373 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4373-sdio.bin \
${nonarch_base_libdir}/firmware/brcm/brcmfmac4373.bin \
+ ${nonarch_base_libdir}/firmware/cypress/cyfmac4373-sdio.bin \
"
LICENSE_${PN}-bcm-0bb4-0306 = "Firmware-cypress"
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 7ec94024c3..175b2d1819 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
@@ -1,4 +1,5 @@
SUMMARY = "Sanitized set of kernel headers for the C library's use"
+HOMEPAGE = "https://www.kernel.org/"
DESCRIPTION = "Designed to maintain an Application Programming Interface (API) stable version of the Linux headers"
SECTION = "devel"
LICENSE = "GPLv2"
diff --git a/poky/meta/recipes-kernel/linux/kernel-devsrc.bb b/poky/meta/recipes-kernel/linux/kernel-devsrc.bb
index dadeade3aa..455c836527 100644
--- a/poky/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/poky/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -271,6 +271,7 @@ do_install() {
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 "$(AR)" ".*-linux-.*ar.*$/ifneq "$(AR)" "ar"/' "$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"
diff --git a/poky/meta/recipes-kernel/linux/linux-dummy.bb b/poky/meta/recipes-kernel/linux/linux-dummy.bb
index 95dc85ff2f..c56f8990de 100644
--- a/poky/meta/recipes-kernel/linux/linux-dummy.bb
+++ b/poky/meta/recipes-kernel/linux/linux-dummy.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
PROVIDES += "virtual/kernel"
-inherit deploy
+inherit deploy linux-dummy
PACKAGES_DYNAMIC += "^kernel-module-.*"
PACKAGES_DYNAMIC += "^kernel-image-.*"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-dev.bb b/poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
index 2ccc0ee875..8725473d1c 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.11+"
+LINUX_VERSION ?= "5.12+"
LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
index 54996a8aee..cb34887cda 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
@@ -11,13 +11,13 @@ python () {
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
-SRCREV_machine ?= "142456428adbf16db56572889232220afb201974"
-SRCREV_meta ?= "8f72218572b1d4a5f053ced2bbf0558d0557072d"
+SRCREV_machine ?= "be2935bce35f9adb6d0e735d42651e81a5094adf"
+SRCREV_meta ?= "031f6c76e488a3563f35258c72ff1de3e25a512e"
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.10;destsuffix=${KMETA}"
-LINUX_VERSION ?= "5.10.16"
+LINUX_VERSION ?= "5.10.25"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
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 2508b9ba07..2ffc8ed542 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 ?= "0406e600800a40015d02b16ee6a4a46c6673c66f"
-SRCREV_meta ?= "4f6d6c23cc8ca5d9c39b1efc2619b1dfec1ef2bc"
+SRCREV_machine ?= "65bbe689d98a007848008be2c8edeb5fa8066829"
+SRCREV_meta ?= "19738ca97b999a3b150e2d34232bb44b6537348f"
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.98"
+LINUX_VERSION ?= "5.4.107"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
index 8ecd10716a..83e59b0ebb 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"
require recipes-kernel/linux/linux-yocto.inc
-LINUX_VERSION ?= "5.10.16"
+LINUX_VERSION ?= "5.10.25"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
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 ?= "be720c1ce6d1cba2bb3815ad04773355339380ab"
-SRCREV_machine ?= "98eda36c9616b598b3586c7cc532e8e0ba8b3953"
-SRCREV_meta ?= "8f72218572b1d4a5f053ced2bbf0558d0557072d"
+SRCREV_machine_qemuarm ?= "0f87ec9fea7a5695cd063d9d11d89751efa53ddd"
+SRCREV_machine ?= "cf5b0320cf4544d3db9ce3ddd6ddb7553a610651"
+SRCREV_meta ?= "031f6c76e488a3563f35258c72ff1de3e25a512e"
PV = "${LINUX_VERSION}+git${SRCPV}"
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 ff03fd4197..2b6e35a69c 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.98"
+LINUX_VERSION ?= "5.4.107"
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 ?= "fc95a485415d22eb772359b8d350c03b85c0cd1b"
-SRCREV_machine ?= "2d0a4ea86fe97f13a4bc2a92a097e4edb51d737d"
-SRCREV_meta ?= "4f6d6c23cc8ca5d9c39b1efc2619b1dfec1ef2bc"
+SRCREV_machine_qemuarm ?= "ac3cbab1d6692d4a032dfffe0a604f39a634d18a"
+SRCREV_machine ?= "cf76c5c0dc0edd51ae4a75a1f8701a2675e87c72"
+SRCREV_meta ?= "19738ca97b999a3b150e2d34232bb44b6537348f"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_5.10.bb b/poky/meta/recipes-kernel/linux/linux-yocto_5.10.bb
index 38b56c17bf..026e69511a 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto_5.10.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto_5.10.bb
@@ -8,20 +8,22 @@ KBRANCH_qemuarm64 ?= "v5.10/standard/qemuarm64"
KBRANCH_qemumips ?= "v5.10/standard/mti-malta32"
KBRANCH_qemuppc ?= "v5.10/standard/qemuppc"
KBRANCH_qemuriscv64 ?= "v5.10/standard/base"
+KBRANCH_qemuriscv32 ?= "v5.10/standard/base"
KBRANCH_qemux86 ?= "v5.10/standard/base"
KBRANCH_qemux86-64 ?= "v5.10/standard/base"
KBRANCH_qemumips64 ?= "v5.10/standard/mti-malta64"
-SRCREV_machine_qemuarm ?= "57a6fbd33df5c7f057f301387b03a70cdc582282"
-SRCREV_machine_qemuarm64 ?= "98eda36c9616b598b3586c7cc532e8e0ba8b3953"
-SRCREV_machine_qemumips ?= "79bd439bff3c9f95cac6fb81c76b559a404a32dc"
-SRCREV_machine_qemuppc ?= "98eda36c9616b598b3586c7cc532e8e0ba8b3953"
-SRCREV_machine_qemuriscv64 ?= "98eda36c9616b598b3586c7cc532e8e0ba8b3953"
-SRCREV_machine_qemux86 ?= "98eda36c9616b598b3586c7cc532e8e0ba8b3953"
-SRCREV_machine_qemux86-64 ?= "98eda36c9616b598b3586c7cc532e8e0ba8b3953"
-SRCREV_machine_qemumips64 ?= "07bda345fe202b1d2ce233ffc20b7570f78c9c7f"
-SRCREV_machine ?= "98eda36c9616b598b3586c7cc532e8e0ba8b3953"
-SRCREV_meta ?= "8f72218572b1d4a5f053ced2bbf0558d0557072d"
+SRCREV_machine_qemuarm ?= "d8551cae1ccdbe062a5c6068ce39ea8f4e1c72db"
+SRCREV_machine_qemuarm64 ?= "cf5b0320cf4544d3db9ce3ddd6ddb7553a610651"
+SRCREV_machine_qemumips ?= "7f1f1ad2f2d90b1b070c6b0a82f0add9aa492e37"
+SRCREV_machine_qemuppc ?= "cf5b0320cf4544d3db9ce3ddd6ddb7553a610651"
+SRCREV_machine_qemuriscv64 ?= "cf5b0320cf4544d3db9ce3ddd6ddb7553a610651"
+SRCREV_machine_qemuriscv32 ?= "cf5b0320cf4544d3db9ce3ddd6ddb7553a610651"
+SRCREV_machine_qemux86 ?= "cf5b0320cf4544d3db9ce3ddd6ddb7553a610651"
+SRCREV_machine_qemux86-64 ?= "cf5b0320cf4544d3db9ce3ddd6ddb7553a610651"
+SRCREV_machine_qemumips64 ?= "fd5ac097b891642eea13659bea536f3ec5910d6d"
+SRCREV_machine ?= "cf5b0320cf4544d3db9ce3ddd6ddb7553a610651"
+SRCREV_meta ?= "031f6c76e488a3563f35258c72ff1de3e25a512e"
# remap qemuarm to qemuarma15 for the 5.8 kernel
# KMACHINE_qemuarm ?= "qemuarma15"
@@ -30,7 +32,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.10;destsuffix=${KMETA}"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
-LINUX_VERSION ?= "5.10.16"
+LINUX_VERSION ?= "5.10.25"
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
DEPENDS += "openssl-native util-linux-native"
@@ -43,7 +45,7 @@ KCONF_BSP_AUDIT_LEVEL = "1"
KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
-COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64|qemuriscv64"
+COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32"
# Functionality flags
KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
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 8d0f4b82c0..245c3d574b 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 ?= "28bc6b294bb1e49da671b2848234f9011efcad88"
-SRCREV_machine_qemuarm64 ?= "2d0a4ea86fe97f13a4bc2a92a097e4edb51d737d"
-SRCREV_machine_qemumips ?= "105568d1696f86625cf7bc30d8c5c921732de2f4"
-SRCREV_machine_qemuppc ?= "2d0a4ea86fe97f13a4bc2a92a097e4edb51d737d"
-SRCREV_machine_qemuriscv64 ?= "2d0a4ea86fe97f13a4bc2a92a097e4edb51d737d"
-SRCREV_machine_qemux86 ?= "2d0a4ea86fe97f13a4bc2a92a097e4edb51d737d"
-SRCREV_machine_qemux86-64 ?= "2d0a4ea86fe97f13a4bc2a92a097e4edb51d737d"
-SRCREV_machine_qemumips64 ?= "c76ba20ee1b1de859736f85f0210459c2104b8df"
-SRCREV_machine ?= "2d0a4ea86fe97f13a4bc2a92a097e4edb51d737d"
-SRCREV_meta ?= "4f6d6c23cc8ca5d9c39b1efc2619b1dfec1ef2bc"
+SRCREV_machine_qemuarm ?= "ea4097dbff5a148265018e1a998e02b5a05e3d27"
+SRCREV_machine_qemuarm64 ?= "cf76c5c0dc0edd51ae4a75a1f8701a2675e87c72"
+SRCREV_machine_qemumips ?= "230ca33504faef6f40c5d3b24901aaacb901c9a6"
+SRCREV_machine_qemuppc ?= "cf76c5c0dc0edd51ae4a75a1f8701a2675e87c72"
+SRCREV_machine_qemuriscv64 ?= "cf76c5c0dc0edd51ae4a75a1f8701a2675e87c72"
+SRCREV_machine_qemux86 ?= "cf76c5c0dc0edd51ae4a75a1f8701a2675e87c72"
+SRCREV_machine_qemux86-64 ?= "cf76c5c0dc0edd51ae4a75a1f8701a2675e87c72"
+SRCREV_machine_qemumips64 ?= "84e071a893ef9cea8a8ffbcd233b47a2bc9056b5"
+SRCREV_machine ?= "cf76c5c0dc0edd51ae4a75a1f8701a2675e87c72"
+SRCREV_meta ?= "19738ca97b999a3b150e2d34232bb44b6537348f"
# 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.98"
+LINUX_VERSION ?= "5.4.107"
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
DEPENDS += "openssl-native util-linux-native"
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-memory-leaks-on-event-destroy.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-memory-leaks-on-event-destroy.patch
new file mode 100644
index 0000000000..21da932a75
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-memory-leaks-on-event-destroy.patch
@@ -0,0 +1,58 @@
+From b3fdf78b15beb940918da1e41eb68e24ba31bb87 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Wed, 3 Mar 2021 10:10:16 -0500
+Subject: [PATCH 1/4] Fix: memory leaks on event destroy
+
+Both filter runtime and event enabler ref objects are owned by the
+event, but are not freed upon destruction of the event object, thus
+leaking memory.
+
+Upstream-status: backport
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Change-Id: Ice9b1c18b47584838aea2b965494d3c8391f4c84
+---
+ lttng-events.c | 7 +++++++
+ lttng-events.h | 1 +
+ 2 files changed, 8 insertions(+)
+
+diff --git a/lttng-events.c b/lttng-events.c
+index f3398adc..984bd341 100644
+--- a/lttng-events.c
++++ b/lttng-events.c
+@@ -919,6 +919,8 @@ int _lttng_event_unregister(struct lttng_event *event)
+ static
+ void _lttng_event_destroy(struct lttng_event *event)
+ {
++ struct lttng_enabler_ref *enabler_ref, *tmp_enabler_ref;
++
+ switch (event->instrumentation) {
+ case LTTNG_KERNEL_TRACEPOINT:
+ lttng_event_put(event->desc);
+@@ -944,6 +946,11 @@ void _lttng_event_destroy(struct lttng_event *event)
+ }
+ list_del(&event->list);
+ lttng_destroy_context(event->ctx);
++ lttng_free_event_filter_runtime(event);
++ /* Free event enabler refs */
++ list_for_each_entry_safe(enabler_ref, tmp_enabler_ref,
++ &event->enablers_ref_head, node)
++ kfree(enabler_ref);
+ kmem_cache_free(event_cache, event);
+ }
+
+diff --git a/lttng-events.h b/lttng-events.h
+index 1b9ab167..13b6abf5 100644
+--- a/lttng-events.h
++++ b/lttng-events.h
+@@ -716,6 +716,7 @@ int lttng_enabler_attach_bytecode(struct lttng_enabler *enabler,
+ struct lttng_kernel_filter_bytecode __user *bytecode);
+ void lttng_enabler_event_link_bytecode(struct lttng_event *event,
+ struct lttng_enabler *enabler);
++void lttng_free_event_filter_runtime(struct lttng_event *event);
+
+ int lttng_probes_init(void);
+
+--
+2.19.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-filter-interpreter-early-exits-on-uninitialized-.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-filter-interpreter-early-exits-on-uninitialized-.patch
new file mode 100644
index 0000000000..609690f05c
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-filter-interpreter-early-exits-on-uninitialized-.patch
@@ -0,0 +1,159 @@
+From 23a2f61ffc6a656f136fa2044c0c3b8f79766779 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Galarneau?=
+ <jeremie.galarneau@efficios.com>
+Date: Wed, 3 Mar 2021 18:52:19 -0500
+Subject: [PATCH 2/4] Fix: filter interpreter early-exits on uninitialized
+ value
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+I observed that syscall filtering on string arguments wouldn't work on
+my development machines, both running 5.11.2-arch1-1 (Arch Linux).
+
+For instance, enabling the tracing of the `openat()` syscall with the
+'filename == "/proc/cpuinfo"' filter would not produce events even
+though matching events were present in another session that had no
+filtering active. The same problem occurred with `execve()`.
+
+I tried a couple of kernel versions before (5.11.1 and 5.10.13, if
+memory serves me well) and I had the same problem. Meanwhile, I couldn't
+reproduce the problem on various Debian machines (the LTTng CI) nor on a
+fresh Ubuntu 20.04 with both the stock kernel and with an updated 5.11.2
+kernel.
+
+I built the lttng-modules with the interpreter debugging printout and
+saw the following warning:
+ LTTng: [debug bytecode in /home/jgalar/EfficiOS/src/lttng-modules/src/lttng-bytecode-interpreter.c:bytecode_interpret@1508] Bytecode warning: loading a NULL string.
+
+After a shedload (yes, a _shed_load) of digging, I figured that the
+problem was hidden in plain sight near that logging statement.
+
+In the `BYTECODE_OP_LOAD_FIELD_REF_USER_STRING` operation, the 'ax'
+register's 'user_str' is initialized with the stack value (the user
+space string's address in our case). However, a NULL check is performed
+against the register's 'str' member.
+
+I initialy suspected that both members would be part of the same union
+and alias each-other, but they are actually contiguous in a structure.
+
+On the unaffected machines, I could confirm that the `str` member was
+uninitialized to a non-zero value causing the condition to evaluate to
+false.
+
+Francis Deslauriers reproduced the problem by initializing the
+interpreter stack to zero.
+
+I am unsure of the exact kernel configuration option that reveals this
+issue on Arch Linux, but my kernel has the following option enabled:
+
+CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL:
+ Zero-initialize any stack variables that may be passed by reference
+ and had not already been explicitly initialized. This is intended to
+ eliminate all classes of uninitialized stack variable exploits and
+ information exposures.
+
+I have not tried to build without this enabled as, anyhow, this seems
+to be a legitimate issue.
+
+I have spotted what appears to be an identical problem in
+`BYTECODE_OP_LOAD_FIELD_REF_USER_SEQUENCE` and corrected it. However,
+I have not exercised that code path.
+
+The commit that introduced this problem is 5b4ad89.
+
+The debug print-out of the `BYTECODE_OP_LOAD_FIELD_REF_USER_STRING`
+operation is modified to print the user string (truncated to 31 chars).
+
+Upstream-status: backport
+
+Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Change-Id: I2da3c31b9e3ce0e1b164cf3d2711c0893cbec273
+---
+ lttng-filter-interpreter.c | 41 ++++++++++++++++++++++++++++++++++----
+ 1 file changed, 37 insertions(+), 4 deletions(-)
+
+diff --git a/lttng-filter-interpreter.c b/lttng-filter-interpreter.c
+index 5d572437..6e5a5139 100644
+--- a/lttng-filter-interpreter.c
++++ b/lttng-filter-interpreter.c
+@@ -22,7 +22,7 @@ LTTNG_STACK_FRAME_NON_STANDARD(lttng_filter_interpret_bytecode);
+ * to handle user-space read.
+ */
+ static
+-char get_char(struct estack_entry *reg, size_t offset)
++char get_char(const struct estack_entry *reg, size_t offset)
+ {
+ if (unlikely(offset >= reg->u.s.seq_len))
+ return '\0';
+@@ -593,6 +593,39 @@ end:
+ return ret;
+ }
+
++#ifdef DEBUG
++
++#define DBG_USER_STR_CUTOFF 32
++
++/*
++ * In debug mode, print user string (truncated, if necessary).
++ */
++static inline
++void dbg_load_ref_user_str_printk(const struct estack_entry *user_str_reg)
++{
++ size_t pos = 0;
++ char last_char;
++ char user_str[DBG_USER_STR_CUTOFF];
++
++ pagefault_disable();
++ do {
++ last_char = get_char(user_str_reg, pos);
++ user_str[pos] = last_char;
++ pos++;
++ } while (last_char != '\0' && pos < sizeof(user_str));
++ pagefault_enable();
++
++ user_str[sizeof(user_str) - 1] = '\0';
++ dbg_printk("load field ref user string: '%s%s'\n", user_str,
++ last_char != '\0' ? "[...]" : "");
++}
++#else
++static inline
++void dbg_load_ref_user_str_printk(const struct estack_entry *user_str_reg)
++{
++}
++#endif
++
+ /*
+ * Return 0 (discard), or raise the 0x1 flag (log event).
+ * Currently, other flags are kept for future extensions and have no
+@@ -1313,7 +1346,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data,
+ estack_push(stack, top, ax, bx);
+ estack_ax(stack, top)->u.s.user_str =
+ *(const char * const *) &filter_stack_data[ref->offset];
+- if (unlikely(!estack_ax(stack, top)->u.s.str)) {
++ if (unlikely(!estack_ax(stack, top)->u.s.user_str)) {
+ dbg_printk("Filter warning: loading a NULL string.\n");
+ ret = -EINVAL;
+ goto end;
+@@ -1322,7 +1355,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data,
+ estack_ax(stack, top)->u.s.literal_type =
+ ESTACK_STRING_LITERAL_TYPE_NONE;
+ estack_ax(stack, top)->u.s.user = 1;
+- dbg_printk("ref load string %s\n", estack_ax(stack, top)->u.s.str);
++ dbg_load_ref_user_str_printk(estack_ax(stack, top));
+ next_pc += sizeof(struct load_op) + sizeof(struct field_ref);
+ PO;
+ }
+@@ -1340,7 +1373,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data,
+ estack_ax(stack, top)->u.s.user_str =
+ *(const char **) (&filter_stack_data[ref->offset
+ + sizeof(unsigned long)]);
+- if (unlikely(!estack_ax(stack, top)->u.s.str)) {
++ if (unlikely(!estack_ax(stack, top)->u.s.user_str)) {
+ dbg_printk("Filter warning: loading a NULL sequence.\n");
+ ret = -EINVAL;
+ goto end;
+--
+2.19.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-mm-tracing-record-slab-name-for-kmem_cache_free-.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-mm-tracing-record-slab-name-for-kmem_cache_free-.patch
new file mode 100644
index 0000000000..71f99b80a3
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-mm-tracing-record-slab-name-for-kmem_cache_free-.patch
@@ -0,0 +1,91 @@
+From 49c603ef2dc6969f4454f0d849af00ee24bb7f04 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <mjeanson@efficios.com>
+Date: Thu, 4 Mar 2021 16:50:12 -0500
+Subject: [PATCH 3/4] fix: mm, tracing: record slab name for kmem_cache_free()
+ (v5.12)
+
+See upstream commit:
+
+ commit 3544de8ee6e4817278b15fe08658de49abf58954
+ Author: Jacob Wen <jian.w.wen@oracle.com>
+ Date: Wed Feb 24 12:00:55 2021 -0800
+
+ mm, tracing: record slab name for kmem_cache_free()
+
+ Currently, a trace record generated by the RCU core is as below.
+
+ ... kmem_cache_free: call_site=rcu_core+0x1fd/0x610 ptr=00000000f3b49a66
+
+ It doesn't tell us what the RCU core has freed.
+
+ This patch adds the slab name to trace_kmem_cache_free().
+ The new format is as follows.
+
+ ... kmem_cache_free: call_site=rcu_core+0x1fd/0x610 ptr=0000000037f79c8d name=dentry
+ ... kmem_cache_free: call_site=rcu_core+0x1fd/0x610 ptr=00000000f78cb7b5 name=sock_inode_cache
+ ... kmem_cache_free: call_site=rcu_core+0x1fd/0x610 ptr=0000000018768985 name=pool_workqueue
+ ... kmem_cache_free: call_site=rcu_core+0x1fd/0x610 ptr=000000006a6cb484 name=radix_tree_node
+
+ We can use it to understand what the RCU core is going to free. For
+ example, some users maybe interested in when the RCU core starts
+ freeing reclaimable slabs like dentry to reduce memory pressure.
+
+ Link: https://lkml.kernel.org/r/20201216072804.8838-1-jian.w.wen@oracle.com
+
+Upstream-status: backport
+
+Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Change-Id: I1ee2fc476614cadcc8d3ac5d8feddc7910e1aa3a
+---
+ instrumentation/events/lttng-module/kmem.h | 27 ++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+
+diff --git a/instrumentation/events/lttng-module/kmem.h b/instrumentation/events/lttng-module/kmem.h
+index b134620a..d787ea54 100644
+--- a/instrumentation/events/lttng-module/kmem.h
++++ b/instrumentation/events/lttng-module/kmem.h
+@@ -87,6 +87,32 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kmem_alloc_node, kmem_cache_alloc_node,
+ TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node)
+ )
+
++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,12,0))
++LTTNG_TRACEPOINT_EVENT(kfree,
++
++ TP_PROTO(unsigned long call_site, const void *ptr),
++
++ TP_ARGS(call_site, ptr),
++
++ TP_FIELDS(
++ ctf_integer_hex(unsigned long, call_site, call_site)
++ ctf_integer_hex(const void *, ptr, ptr)
++ )
++)
++
++LTTNG_TRACEPOINT_EVENT(kmem_cache_free,
++
++ TP_PROTO(unsigned long call_site, const void *ptr, const char *name),
++
++ TP_ARGS(call_site, ptr, name),
++
++ TP_FIELDS(
++ ctf_integer_hex(unsigned long, call_site, call_site)
++ ctf_integer_hex(const void *, ptr, ptr)
++ ctf_string(name, name)
++ )
++)
++#else
+ LTTNG_TRACEPOINT_EVENT_CLASS(kmem_free,
+
+ TP_PROTO(unsigned long call_site, const void *ptr),
+@@ -114,6 +140,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kmem_free, kmem_cache_free,
+
+ TP_ARGS(call_site, ptr)
+ )
++#endif
+
+ #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
+ LTTNG_TRACEPOINT_EVENT_MAP(mm_page_free, kmem_mm_page_free,
+--
+2.19.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-kretprobe-null-ptr-deref-on-session-destroy.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-kretprobe-null-ptr-deref-on-session-destroy.patch
new file mode 100644
index 0000000000..8a839c2b43
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-kretprobe-null-ptr-deref-on-session-destroy.patch
@@ -0,0 +1,41 @@
+From 92cc3e7f76a545a2cd4828576971f1eea83f4e68 Mon Sep 17 00:00:00 2001
+From: Francis Deslauriers <francis.deslauriers@efficios.com>
+Date: Wed, 17 Mar 2021 10:40:56 -0400
+Subject: [PATCH 4/4] Fix: kretprobe: null ptr deref on session destroy
+
+The `filter_bytecode_runtime_head` list is currently not initialized for
+the return event of the kretprobe. This caused a kernel null ptr
+dereference when destroying a session. It can reproduced with the
+following commands:
+
+ lttng create
+ lttng enable-event -k --function=lttng_test_filter_event_write my_event
+ lttng start
+ lttng stop
+ lttng destroy
+
+Upstream-status: backport
+
+Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Change-Id: I1162ce8b10dd7237a26331531f048346b984eee7
+---
+ lttng-events.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lttng-events.c b/lttng-events.c
+index 984bd341..3450fa40 100644
+--- a/lttng-events.c
++++ b/lttng-events.c
+@@ -704,6 +704,8 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
+ event_return->enabled = 0;
+ event_return->registered = 1;
+ event_return->instrumentation = itype;
++ INIT_LIST_HEAD(&event_return->bytecode_runtime_head);
++ INIT_LIST_HEAD(&event_return->enablers_ref_head);
+ /*
+ * Populate lttng_event structure before kretprobe registration.
+ */
+--
+2.19.1
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules_2.12.4.bb b/poky/meta/recipes-kernel/lttng/lttng-modules_2.12.5.bb
index 3ca59f789a..5b05c644a6 100644
--- a/poky/meta/recipes-kernel/lttng/lttng-modules_2.12.4.bb
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules_2.12.5.bb
@@ -11,9 +11,13 @@ 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://0001-Fix-memory-leaks-on-event-destroy.patch \
+ file://0002-Fix-filter-interpreter-early-exits-on-uninitialized-.patch \
+ file://0003-fix-mm-tracing-record-slab-name-for-kmem_cache_free-.patch \
+ file://0004-Fix-kretprobe-null-ptr-deref-on-session-destroy.patch \
"
-SRC_URI[sha256sum] = "fe66400fa1b85bff1b9ae24419c74e3bb7d358d643eade0594d81b48bd190688"
+SRC_URI[sha256sum] = "c4d1a1b42c728e37b6b7947ae16563a011c4b297311aa04d56f9a1791fb5a30a"
export INSTALL_MOD_DIR="kernel/lttng-modules"
@@ -35,7 +39,8 @@ DEFAULT_PREFERENCE_class-devupstream = "-1"
SRC_URI_class-devupstream = "git://git.lttng.org/lttng-modules;branch=stable-2.12 \
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
"
-SRCREV_class-devupstream = "be71b60a327d7ad2588abc5cad2861177119972b"
-PV_class-devupstream = "2.12.3+git${SRCPV}"
+
+SRCREV_class-devupstream = "92cc3e7f76a545a2cd4828576971f1eea83f4e68"
+PV_class-devupstream = "2.12.5+git${SRCPV}"
S_class-devupstream = "${WORKDIR}/git"
SRCREV_FORMAT ?= "lttng_git"
diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb b/poky/meta/recipes-kernel/lttng/lttng-tools_2.12.3.bb
index 52bfd36370..7074096ee7 100644
--- a/poky/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb
+++ b/poky/meta/recipes-kernel/lttng/lttng-tools_2.12.3.bb
@@ -39,7 +39,7 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
file://determinism.patch \
"
-SRC_URI[sha256sum] = "9ed9161795ff023b076f9f95afaa4f1f822ec42495c0fa04c586ab8fa74e84f1"
+SRC_URI[sha256sum] = "2890da230edd523fcf497e9eb28133b7606d64fa01bcbffadbfcba42104db153"
inherit autotools ptest pkgconfig useradd python3-dir manpages systemd
diff --git a/poky/meta/recipes-kernel/perf/perf.bb b/poky/meta/recipes-kernel/perf/perf.bb
index 5faf22a26e..1274df68c1 100644
--- a/poky/meta/recipes-kernel/perf/perf.bb
+++ b/poky/meta/recipes-kernel/perf/perf.bb
@@ -32,6 +32,7 @@ PACKAGECONFIG[coresight] = "CORESIGHT=1,,opencsd"
# libunwind is not yet ported for some architectures
PACKAGECONFIG_remove_arc = "libunwind"
PACKAGECONFIG_remove_riscv64 = "libunwind"
+PACKAGECONFIG_remove_riscv32 = "libunwind"
DEPENDS = " \
virtual/${MLPREFIX}libc \
@@ -81,6 +82,7 @@ EXTRA_OEMAKE = '\
AR="${AR}" \
LD="${LD}" \
EXTRA_CFLAGS="-ldw" \
+ YFLAGS='-y --file-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}' \
EXTRA_LDFLAGS="${PERF_EXTRA_LDFLAGS}" \
perfexecdir=${libexecdir} \
NO_GTK2=1 \
@@ -214,6 +216,51 @@ do_configure_prepend () {
${S}/tools/build/Makefile.build
fi
+ # start reproducibility substitutions
+ if [ -e "${S}/tools/perf/Makefile.config" ]; then
+ # The following line in the Makefle:
+ # override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON_AUTO))
+ # "PYTHON" / "PYTHON_AUTO" have the full path as part of the variable. We've
+ # ensure that the environment is setup and we do not need the full path to be
+ # captured, since the symbol gets built into the executable, making it not
+ # reproducible.
+ sed -i -e 's,$(call get-executable-or-default\,PYTHON\,$(PYTHON_AUTO)),$(notdir $(call get-executable-or-default\,PYTHON\,$(PYTHON_AUTO))),g' \
+ ${S}/tools/perf/Makefile.config
+
+ # The following line:
+ # srcdir_SQ = $(patsubst %tools/perf,tools/perf,$(subst ','\'',$(srcdir))),
+ # Captures the full src path of perf, which of course makes it not
+ # reproducible. We really only need the relative location 'tools/perf', so we
+ # change the Makefile line to remove everything before 'tools/perf'
+ sed -i -e "s%srcdir_SQ = \$(subst ','\\\'',\$(srcdir))%srcdir_SQ = \$(patsubst \%tools/perf,tools/perf,\$(subst ','\\\'',\$(srcdir)))%g" \
+ ${S}/tools/perf/Makefile.config
+ fi
+ if [ -e "${S}/tools/perf/tests/Build" ]; then
+ # OUTPUT is the full path, we have python on the path so we remove it from the
+ # definition. This is captured in the perf binary, so breaks reproducibility
+ sed -i -e 's,PYTHONPATH="BUILD_STR($(OUTPUT)python)",PYTHONPATH="BUILD_STR(python)",g' \
+ ${S}/tools/perf/tests/Build
+ fi
+ if [ -e "${S}/tools/perf/util/Build" ]; then
+ # To avoid bison generating #ifdefs that have captured paths, we make sure
+ # all the calls have YFLAGS, which contains prefix mapping information.
+ sed -i -e 's,$(BISON),$(BISON) $(YFLAGS),g' ${S}/tools/perf/util/Build
+ fi
+ if [ -e "${S}/scripts/Makefile.host" ]; then
+ # To avoid yacc (bison) generating #ifdefs that have captured paths, we make sure
+ # all the calls have YFLAGS, which contains prefix mapping information.
+ sed -i -e 's,$(YACC),$(YACC) $(YFLAGS),g' ${S}/scripts/Makefile.host
+ fi
+ if [ -e "${S}/tools/perf/pmu-events/Build" ]; then
+ target='$(OUTPUT)pmu-events/pmu-events.c $(V)'
+ replacement1='$(OUTPUT)pmu-events/pmu-events.c $(V)\n'
+ replacement2='\t$(srctree)/sort-pmuevents.py $(OUTPUT)pmu-events/pmu-events.c $(OUTPUT)pmu-events/pmu-events.c.new\n'
+ replacement3='\tcp $(OUTPUT)pmu-events/pmu-events.c.new $(OUTPUT)pmu-events/pmu-events.c'
+ sed -i -e "s,$target,$replacement1$replacement2$replacement3,g" \
+ "${S}/tools/perf/pmu-events/Build"
+ fi
+ # end reproducibility substitutions
+
# We need to ensure the --sysroot option in CC is preserved
if [ -e "${S}/tools/perf/Makefile.perf" ]; then
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf
@@ -254,6 +301,14 @@ do_configure_prepend () {
# so we copy it from the sysroot unistd.h to the perf unistd.h
install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h
install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/include/uapi/asm-generic/unistd.h
+
+ # the fetcher is inhibited by the 'inherit kernelsrc', so we do a quick check and
+ # copy for a helper script we need
+ for p in $(echo ${FILESPATH} | tr ':' '\n'); do
+ if [ -e $p/sort-pmuevents.py ]; then
+ cp $p/sort-pmuevents.py ${S}
+ fi
+ done
}
python do_package_prepend() {
diff --git a/poky/meta/recipes-kernel/perf/perf/sort-pmuevents.py b/poky/meta/recipes-kernel/perf/perf/sort-pmuevents.py
new file mode 100755
index 0000000000..5ddf0f144f
--- /dev/null
+++ b/poky/meta/recipes-kernel/perf/perf/sort-pmuevents.py
@@ -0,0 +1,93 @@
+#!/usr/bin/env python3
+
+# perf pmu-events sorting tool
+#
+# Copyright (C) 2021 Bruce Ashfield
+#
+# SPDX-License-Identifier: MIT
+#
+
+import sys
+import os
+import re
+from collections import OrderedDict
+
+if len(sys.argv) < 2:
+ print( "[ERROR]: input and output pmu files missing" )
+ sys.exit(1)
+
+if len(sys.argv) < 3:
+ print( "[ERROR]: output pmu file missing" )
+ sys.exit(1)
+
+infile = sys.argv[1]
+outfile = sys.argv[2]
+
+if not os.path.exists(infile):
+ print( "ERROR. input file does not exist: %s" % infile )
+ sys.exit(1)
+
+if os.path.exists(outfile):
+ print( "WARNING. output file will be overwritten: %s" % infile )
+
+with open(infile, 'r') as file:
+ data = file.read()
+
+preamble_regex = re.compile( '^(.*?)^struct', re.MULTILINE | re.DOTALL )
+
+preamble = re.search( preamble_regex, data )
+struct_block_regex = re.compile( '^struct.*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL )
+field_regex = re.compile( '{.*?},', re.MULTILINE | re.DOTALL )
+cpuid_regex = re.compile( '\.cpuid = (.*?),', re.MULTILINE | re.DOTALL )
+name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL )
+
+# create a dictionary structure to store all the structs, their
+# types and then their fields.
+entry_dict = {}
+for struct in re.findall( struct_block_regex, data ):
+ # print( "struct: %s %s" % (struct[0],struct[1]) )
+ entry_dict[struct[1]] = {}
+ entry_dict[struct[1]]['type'] = struct[0]
+ entry_dict[struct[1]]['fields'] = {}
+ for entry in re.findall( field_regex, struct[2] ):
+ #print( " entry: %s" % entry )
+ cpuid = re.search( cpuid_regex, entry )
+ if cpuid:
+ #print( " cpuid found: %s" % cpuid.group(1) )
+ entry_dict[struct[1]]['fields'][cpuid.group(1)] = entry
+
+ name = re.search( name_regex, entry )
+ if name:
+ #print( " name found: %s" % name.group(1) )
+ entry_dict[struct[1]]['fields'][name.group(1)] = entry
+
+
+# created ordered dictionaries from the captured values. These are ordered by
+# a sorted() iteration of the keys. We don't care about the order we read
+# things, just the sorted order. Hency why we couldn't create these during
+# reading.
+#
+# yes, there's a more concise way to do this, but our nested dictionaries of
+# fields make it complex enough that it becomes unreadable.
+entry_dict_sorted = OrderedDict()
+for i in sorted(entry_dict.keys()):
+ entry_dict_sorted[i] = {}
+ entry_dict_sorted[i]['type'] = entry_dict[i]['type']
+ entry_dict_sorted[i]['fields'] = {}
+ for f in sorted(entry_dict[i]['fields'].keys()):
+ entry_dict_sorted[i]['fields'][f] = entry_dict[i]['fields'][f]
+
+# dump the sorted elements to the outfile
+outf = open( outfile, 'w' )
+
+print( preamble.group(1) )
+outf.write( preamble.group(1) )
+for d in entry_dict_sorted:
+ outf.write( "struct %s %s[] = {\n" % (entry_dict_sorted[d]['type'],d) )
+ for f in entry_dict_sorted[d]['fields']:
+ outf.write( entry_dict_sorted[d]['fields'][f] + '\n' )
+
+ outf.write( "};\n" )
+
+outf.close()
+
diff --git a/poky/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb b/poky/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
index 46820ef489..6ee0be5e3e 100644
--- a/poky/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
+++ b/poky/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
@@ -1,5 +1,5 @@
SUMMARY = "UProbes kernel module for SystemTap"
-
+HOMEPAGE = "https://sourceware.org/systemtap/"
require systemtap_git.inc
DEPENDS = "systemtap virtual/kernel"