summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/blktrace/blktrace_git.bb2
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev.inc2
-rw-r--r--meta/recipes-kernel/dtc/dtc.inc28
-rw-r--r--meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch36
-rw-r--r--meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch40
-rw-r--r--meta/recipes-kernel/dtc/dtc/make_install.patch26
-rw-r--r--meta/recipes-kernel/dtc/dtc_1.6.1.bb24
-rw-r--r--meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-doc-validate20
-rw-r--r--meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-mk-schema20
-rw-r--r--meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate20
-rw-r--r--meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb17
-rw-r--r--meta/recipes-kernel/kern-tools/kern-tools-native_git.bb8
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch23
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0007-kexec-un-break-the-build-on-32-bit-x86.patch43
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools_2.0.23.bb (renamed from meta/recipes-kernel/kexec/kexec-tools_2.0.22.bb)4
-rw-r--r--meta/recipes-kernel/kmod/kmod-native_git.bb15
-rw-r--r--meta/recipes-kernel/kmod/kmod.inc37
-rw-r--r--meta/recipes-kernel/kmod/kmod_29.bb (renamed from meta/recipes-kernel/kmod/kmod_git.bb)56
-rw-r--r--meta/recipes-kernel/linux-firmware/linux-firmware_20211216.bb (renamed from meta/recipes-kernel/linux-firmware/linux-firmware_20210818.bb)4
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.15.bb (renamed from meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.14.bb)4
-rw-r--r--meta/recipes-kernel/linux/kernel-devsrc.bb12
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-dev.bb14
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb6
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb (renamed from meta/recipes-kernel/linux/linux-yocto-rt_5.14.bb)10
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb8
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_5.15.bb (renamed from meta/recipes-kernel/linux/linux-yocto-tiny_5.14.bb)14
-rw-r--r--meta/recipes-kernel/linux/linux-yocto.inc13
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_5.10.bb26
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_5.15.bb (renamed from meta/recipes-kernel/linux/linux-yocto_5.14.bb)50
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch394
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch829
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules_2.13.1.bb (renamed from meta/recipes-kernel/lttng/lttng-modules_2.13.0.bb)4
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-Fix-Tests-race-condition-in-test_event_tracker.patch221
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch41
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch46
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/disable-tests.patch34
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.13.2.bb (renamed from meta/recipes-kernel/lttng/lttng-tools_2.13.0.bb)6
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch2
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust_2.13.1.bb (renamed from meta/recipes-kernel/lttng/lttng-ust_2.13.0.bb)2
-rw-r--r--meta/recipes-kernel/perf/perf.bb5
-rwxr-xr-xmeta/recipes-kernel/perf/perf/sort-pmuevents.py28
-rw-r--r--meta/recipes-kernel/powertop/powertop/0001-src-fix-compatibility-with-ncurses-6.3.patch52
-rw-r--r--meta/recipes-kernel/powertop/powertop_2.14.bb7
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-PR28778-gcc-warning-tweak-for-sprintf-precision-para.patch45
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-staprun-address-ncurses-6.3-failures.patch61
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.bb6
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.inc7
-rw-r--r--meta/recipes-kernel/wireless-regdb/wireless-regdb_2021.08.28.bb (renamed from meta/recipes-kernel/wireless-regdb/wireless-regdb_2021.07.14.bb)2
48 files changed, 509 insertions, 1865 deletions
diff --git a/meta/recipes-kernel/blktrace/blktrace_git.bb b/meta/recipes-kernel/blktrace/blktrace_git.bb
index d00b1bd..b108676 100644
--- a/meta/recipes-kernel/blktrace/blktrace_git.bb
+++ b/meta/recipes-kernel/blktrace/blktrace_git.bb
@@ -14,7 +14,7 @@ SRCREV = "366d30b9cdb20345c5d064af850d686da79b89eb"
14 14
15PV = "1.3.0+git${SRCPV}" 15PV = "1.3.0+git${SRCPV}"
16 16
17SRC_URI = "git://git.kernel.dk/blktrace.git" 17SRC_URI = "git://git.kernel.dk/blktrace.git;branch=master"
18 18
19S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"
20 20
diff --git a/meta/recipes-kernel/cryptodev/cryptodev.inc b/meta/recipes-kernel/cryptodev/cryptodev.inc
index ae2c308..6ada0b0 100644
--- a/meta/recipes-kernel/cryptodev/cryptodev.inc
+++ b/meta/recipes-kernel/cryptodev/cryptodev.inc
@@ -8,7 +8,7 @@ API is compatible with OpenBSD's cryptodev userspace API (/dev/crypto)."
8LICENSE = "GPLv2" 8LICENSE = "GPLv2"
9LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 9LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
10 10
11SRC_URI = "git://github.com/cryptodev-linux/cryptodev-linux \ 11SRC_URI = "git://github.com/cryptodev-linux/cryptodev-linux;branch=master;protocol=https \
12 " 12 "
13SRCREV = "e0c25e289d6baf1d83c2b9cb523d3bc237d0c0c9" 13SRCREV = "e0c25e289d6baf1d83c2b9cb523d3bc237d0c0c9"
14 14
diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc
deleted file mode 100644
index bfdc9f8..0000000
--- a/meta/recipes-kernel/dtc/dtc.inc
+++ /dev/null
@@ -1,28 +0,0 @@
1SUMMARY = "Device Tree Compiler"
2HOMEPAGE = "https://devicetree.org/"
3DESCRIPTION = "The Device Tree Compiler is a tool used to manipulate the Open-Firmware-like device tree used by PowerPC kernels."
4SECTION = "bootloader"
5LICENSE = "GPLv2 | BSD-2-Clause"
6DEPENDS = "flex-native bison-native"
7
8SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \
9 file://make_install.patch \
10 file://0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch \
11 "
12
13UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
14
15EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
16
17inherit pkgconfig
18
19S = "${WORKDIR}/git"
20
21do_install () {
22 oe_runmake install
23}
24
25PACKAGES =+ "${PN}-misc"
26FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
27
28RDEPENDS:${PN}-misc += "bash diffutils"
diff --git a/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch b/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch
deleted file mode 100644
index a2deb12..0000000
--- a/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From f0119060ef1b9bd80e2cae487df1e4aedffb0e9b Mon Sep 17 00:00:00 2001
2From: Oleksiy Obitotskyy <oobitots@cisco.com>
3Date: Fri, 22 Jan 2021 09:12:48 +0200
4Subject: [PATCH] dtc: Fix Makefile to add CFLAGS not override
5
6Makefile override CFLAGS not extend them, so some of them
7missing. Sources builds out of kernel tree and probably not all
8options could be used (?). We need at least -fmacro-prefix-map/
9debug-prefix-map to eliminate absolute path in binaries.
10
11Upstream-Status: Pending
12Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
13---
14 Makefile | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/Makefile b/Makefile
18index 35d936f..b5b13cf 100644
19--- a/Makefile
20+++ b/Makefile
21@@ -20,10 +20,10 @@ CONFIG_LOCALVERSION =
22 # See libfdt_internal.h for details
23 ASSUME_MASK ?= 0
24
25-CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)
26+CPPFLAGS += -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)
27 WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
28 -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
29-CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
30+CFLAGS += -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
31
32 BISON = bison
33 LEX = flex
34--
352.25.1
36
diff --git a/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch b/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch
new file mode 100644
index 0000000..4c3e34b
--- /dev/null
+++ b/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch
@@ -0,0 +1,40 @@
1Fix the build of fdtdump with mingw.
2
3Upstream-Status: Backport
4Signed-off-by: Ross Burton <ross.burton@arm.com>
5
6From ae0ce1fa7f4d679b5f8df1fc0e797246e43547fe Mon Sep 17 00:00:00 2001
7From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
8Date: Wed, 25 Aug 2021 16:13:50 +0400
9Subject: [PATCH] fdtdump: fix -Werror=int-to-pointer-cast
10MIME-Version: 1.0
11Content-Type: text/plain; charset=UTF-8
12Content-Transfer-Encoding: 8bit
13
14With mingw64-gcc, the compiler complains with various warnings:
15error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
16
17Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
18Message-Id: <20210825121350.213551-1-marcandre.lureau@redhat.com>
19Acked-by: Rob Herring <robh@kernel.org>
20Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
21---
22 fdtdump.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/fdtdump.c b/fdtdump.c
26index d9fb374..483f367 100644
27--- a/fdtdump.c
28+++ b/fdtdump.c
29@@ -21,7 +21,7 @@
30 #define MAX_VERSION 17
31
32 #define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1))
33-#define PALIGN(p, a) ((void *)(ALIGN((unsigned long)(p), (a))))
34+#define PALIGN(p, a) ((void *)(ALIGN((uintptr_t)(p), (a))))
35 #define GET_CELL(p) (p += 4, *((const fdt32_t *)(p-4)))
36
37 static const char *tagname(uint32_t tag)
38--
392.25.1
40
diff --git a/meta/recipes-kernel/dtc/dtc/make_install.patch b/meta/recipes-kernel/dtc/dtc/make_install.patch
deleted file mode 100644
index ea9359e..0000000
--- a/meta/recipes-kernel/dtc/dtc/make_install.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From e9852b9d206df1e42aa4c8afec55a0f5e099b533 Mon Sep 17 00:00:00 2001
2From: Saul Wold <sgw@linux.intel.com>
3Date: Thu, 3 Nov 2011 08:35:47 -0700
4Subject: [PATCH] dtc: Add patch to correctly install shared libraries and
5
6Upstream-Status: Inappropriate [configuration]
7
8---
9 Makefile | 4 ++--
10 1 file changed, 2 insertions(+), 2 deletions(-)
11
12diff --git a/Makefile b/Makefile
13index d8ebc4f..f5e01be 100644
14--- a/Makefile
15+++ b/Makefile
16@@ -205,8 +205,8 @@ install-bin: all $(SCRIPTS)
17 install-lib: all
18 @$(VECHO) INSTALL-LIB
19 $(INSTALL) -d $(DESTDIR)$(LIBDIR)
20- $(INSTALL_LIB) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
21- ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
22+ $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
23+ ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/$(notdir $(LIBFDT_lib))
24 ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT)
25 $(INSTALL_DATA) $(LIBFDT_archive) $(DESTDIR)$(LIBDIR)
26
diff --git a/meta/recipes-kernel/dtc/dtc_1.6.1.bb b/meta/recipes-kernel/dtc/dtc_1.6.1.bb
index de9a46d..2610b26 100644
--- a/meta/recipes-kernel/dtc/dtc_1.6.1.bb
+++ b/meta/recipes-kernel/dtc/dtc_1.6.1.bb
@@ -1,10 +1,30 @@
1require dtc.inc 1SUMMARY = "Device Tree Compiler"
2HOMEPAGE = "https://devicetree.org/"
3DESCRIPTION = "The Device Tree Compiler is a tool used to manipulate the Open-Firmware-like device tree used by PowerPC kernels."
4SECTION = "bootloader"
5LICENSE = "GPLv2 | BSD-2-Clause"
2 6
3LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ 7LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
4 file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407" 8 file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407"
5 9
10SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \
11 file://0001-fdtdump-fix-Werror-int-to-pointer-cast.patch"
6SRCREV = "b6910bec11614980a21e46fbccc35934b671bd81" 12SRCREV = "b6910bec11614980a21e46fbccc35934b671bd81"
7 13
14UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
15
8S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
9 17
18inherit meson pkgconfig
19
20EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled"
21
22PACKAGECONFIG ??= "tools"
23PACKAGECONFIG[tools] = "-Dtools=true,-Dtools=false,flex-native bison-native"
24PACKAGECONFIG[yaml] = "-Dyaml=enabled,-Dyaml=disabled,libyaml"
25
26PACKAGES =+ "${PN}-misc"
27FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
28RDEPENDS:${PN}-misc += "${@bb.utils.contains('PACKAGECONFIG', 'tools', 'bash diffutils', '', d)}"
29
10BBCLASSEXTEND = "native nativesdk" 30BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-doc-validate b/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-doc-validate
new file mode 100644
index 0000000..2aa5785
--- /dev/null
+++ b/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-doc-validate
@@ -0,0 +1,20 @@
1#!/bin/sh
2# dt-doc-validate wrapper to allow kernel dt-validation to pass
3#
4# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com>
5# License: MIT (see COPYING.MIT at the root of the repository for terms)
6
7for arg; do
8 case "$arg" in
9 --version)
10 echo "v2021.10"
11 ;;
12 esac
13done
14
15# TBD: left for future consideration
16# exec dt-doc-validate.real "$@"
17
18# we always succeed
19exit 0
20
diff --git a/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-mk-schema b/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-mk-schema
new file mode 100644
index 0000000..24b89d8
--- /dev/null
+++ b/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-mk-schema
@@ -0,0 +1,20 @@
1#!/bin/sh
2# dt-mk-schema wrapper to allow kernel dt-validation to pass
3#
4# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com>
5# License: MIT (see COPYING.MIT at the root of the repository for terms)
6
7for arg; do
8 case "$arg" in
9 --version)
10 echo "v2021.10"
11 ;;
12 esac
13done
14
15# TBD: left for future consideration
16# exec dt-mk-schema.real "$@"
17
18# we always succeed
19exit 0
20
diff --git a/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate b/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate
new file mode 100644
index 0000000..8a4710a
--- /dev/null
+++ b/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate
@@ -0,0 +1,20 @@
1#!/bin/sh
2# dt-validate wrapper to allow kernel dt-validation to pass
3#
4# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com>
5# License: MIT (see COPYING.MIT at the root of the repository for terms)
6
7for arg; do
8 case "$arg" in
9 --version)
10 echo "v2021.10"
11 ;;
12 esac
13done
14
15# TBD: left for future consideration
16# exec dt-validate.real "$@"
17
18# we always succeed
19exit 0
20
diff --git a/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb b/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb
new file mode 100644
index 0000000..c869274
--- /dev/null
+++ b/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "Wrapper for tooling for devicetree validation using YAML and jsonschema"
2HOMEPAGE = "https://yoctoproject.org"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
5
6SRC_URI = "file://dt-doc-validate \
7 file://dt-mk-schema \
8 file://dt-validate"
9
10do_install() {
11 install -d ${D}${bindir}/
12 install -m 755 ${WORKDIR}/dt-doc-validate ${D}${bindir}/
13 install -m 755 ${WORKDIR}/dt-mk-schema ${D}${bindir}/
14 install -m 755 ${WORKDIR}/dt-validate ${D}${bindir}/
15}
16
17BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index e967f48..74db936 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -8,15 +8,13 @@ LIC_FILES_CHKSUM = "file://tools/kgit;beginline=5;endline=9;md5=9c30e971d435e249
8 8
9DEPENDS = "git-native" 9DEPENDS = "git-native"
10 10
11SRCREV = "d220b063852245fdd16b9731a395ace525f932d6" 11SRCREV = "90598a5fae1172e3f7782a1b02f7b7518efd32c8"
12PR = "r12" 12PV = "0.3+git${SRCPV}"
13PV = "0.2+git${SRCPV}"
14 13
15inherit native 14inherit native
16 15
17SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git" 16SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git;branch=master"
18S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"
19UPSTREAM_CHECK_COMMITS = "1"
20 18
21do_configure() { 19do_configure() {
22 : 20 :
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch
deleted file mode 100644
index 6aeebc3..0000000
--- a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1From ba2fb5baf6b0a8c882ac32301dd7a8d16de0dcf6 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Sun, 27 Dec 2020 23:39:29 +0100
4Subject: [PATCH] kexec/arch/ppc/kexec-ppc.c: correct double definition error
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 kexec/arch/ppc/kexec-ppc.c | 1 -
10 1 file changed, 1 deletion(-)
11
12diff --git a/kexec/arch/ppc/kexec-ppc.c b/kexec/arch/ppc/kexec-ppc.c
13index 03bec36..5b3e244 100644
14--- a/kexec/arch/ppc/kexec-ppc.c
15+++ b/kexec/arch/ppc/kexec-ppc.c
16@@ -35,7 +35,6 @@ unsigned long long initrd_base = 0, initrd_size = 0;
17 unsigned long long ramdisk_base = 0, ramdisk_size = 0;
18 unsigned int rtas_base, rtas_size;
19 int max_memory_ranges;
20-const char *ramdisk;
21
22 /*
23 * Reads the #address-cells and #size-cells on this platform.
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0007-kexec-un-break-the-build-on-32-bit-x86.patch b/meta/recipes-kernel/kexec/kexec-tools/0007-kexec-un-break-the-build-on-32-bit-x86.patch
deleted file mode 100644
index 36b0845..0000000
--- a/meta/recipes-kernel/kexec/kexec-tools/0007-kexec-un-break-the-build-on-32-bit-x86.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From bb6a26371d15473b380459ac4404bf330634b585 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 20 Dec 2019 17:21:08 +0100
4Subject: [PATCH] kexec: un-break the build on 32 bit x86
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8
9---
10 kexec/arch/i386/Makefile | 1 +
11 kexec/arch/i386/kexec-x86.h | 4 ++++
12 2 files changed, 5 insertions(+)
13
14diff --git a/kexec/arch/i386/Makefile b/kexec/arch/i386/Makefile
15index f486103..5d560be 100644
16--- a/kexec/arch/i386/Makefile
17+++ b/kexec/arch/i386/Makefile
18@@ -12,6 +12,7 @@ i386_KEXEC_SRCS += kexec/arch/i386/kexec-beoboot-x86.c
19 i386_KEXEC_SRCS += kexec/arch/i386/kexec-nbi.c
20 i386_KEXEC_SRCS += kexec/arch/i386/x86-linux-setup.c
21 i386_KEXEC_SRCS += kexec/arch/i386/crashdump-x86.c
22+i386_KEXEC_SRCS += kexec/arch/i386/kexec-mb2-x86.c
23
24 dist += kexec/arch/i386/Makefile $(i386_KEXEC_SRCS) \
25 kexec/arch/i386/crashdump-x86.h \
26diff --git a/kexec/arch/i386/kexec-x86.h b/kexec/arch/i386/kexec-x86.h
27index 0f941df..c423171 100644
28--- a/kexec/arch/i386/kexec-x86.h
29+++ b/kexec/arch/i386/kexec-x86.h
30@@ -56,9 +56,13 @@ struct arch_options_t {
31 };
32
33 int multiboot_x86_probe(const char *buf, off_t len);
34+int multiboot2_x86_probe(const char *buf, off_t len);
35 int multiboot_x86_load(int argc, char **argv, const char *buf, off_t len,
36 struct kexec_info *info);
37+int multiboot2_x86_load(int argc, char **argv, const char *buf, off_t len,
38+ struct kexec_info *info);
39 void multiboot_x86_usage(void);
40+void multiboot2_x86_usage(void);
41
42 int multiboot2_x86_load(int argc, char **argv, const char *buf, off_t len,
43 struct kexec_info *info);
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.22.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.23.bb
index 95ff5e6..066de99 100644
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.22.bb
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.23.bb
@@ -17,12 +17,10 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
17 file://0002-purgatory-Pass-r-directly-to-linker.patch \ 17 file://0002-purgatory-Pass-r-directly-to-linker.patch \
18 file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \ 18 file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
19 file://0005-Disable-PIE-during-link.patch \ 19 file://0005-Disable-PIE-during-link.patch \
20 file://0007-kexec-un-break-the-build-on-32-bit-x86.patch \
21 file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \ 20 file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \
22 file://0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch \
23 " 21 "
24 22
25SRC_URI[sha256sum] = "40623d4321be2865ef9ea2cd6ec998d31dcf93d0f74353cbd3aa06d8821e3e41" 23SRC_URI[sha256sum] = "c7dcc59f5b66004d9d91264324e20e0387ea263dbb449708fbf84a4e5ff7decc"
26 24
27inherit autotools update-rc.d systemd 25inherit autotools update-rc.d systemd
28 26
diff --git a/meta/recipes-kernel/kmod/kmod-native_git.bb b/meta/recipes-kernel/kmod/kmod-native_git.bb
deleted file mode 100644
index 4dd34b1..0000000
--- a/meta/recipes-kernel/kmod/kmod-native_git.bb
+++ /dev/null
@@ -1,15 +0,0 @@
1# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4require kmod.inc
5
6DEPENDS += "zlib-native"
7
8inherit native
9
10do_install:append (){
11 for tool in depmod insmod lsmod modinfo modprobe rmmod
12 do
13 ln -s kmod ${D}${bindir}/$tool
14 done
15}
diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc
deleted file mode 100644
index c2d550a..0000000
--- a/meta/recipes-kernel/kmod/kmod.inc
+++ /dev/null
@@ -1,37 +0,0 @@
1# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4SUMMARY = "Tools for managing Linux kernel modules"
5DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \
6 insert, remove, list, check properties, resolve dependencies and aliases."
7HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kmod/"
8LICENSE = "GPL-2.0+ & LGPL-2.1+"
9LICENSE:libkmod = "LGPL-2.1+"
10SECTION = "base"
11
12LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
13 file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
14 file://tools/COPYING;md5=751419260aa954499f7abaabaa882bbe \
15 "
16inherit autotools gtk-doc pkgconfig manpages
17
18SRCREV = "b6ecfc916a17eab8f93be5b09f4e4f845aabd3d1"
19# Lookout for PV bump too when SRCREV is changed
20PV = "29"
21
22SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
23 file://depmod-search.conf \
24 file://avoid_parallel_tests.patch \
25 "
26
27S = "${WORKDIR}/git"
28
29EXTRA_OECONF +=" --enable-tools --with-zlib"
30
31PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
32PACKAGECONFIG[logging] = " --enable-logging,--disable-logging"
33PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native"
34PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz"
35PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
36
37GTKDOC_DOCDIR = "${S}/libkmod/docs"
diff --git a/meta/recipes-kernel/kmod/kmod_git.bb b/meta/recipes-kernel/kmod/kmod_29.bb
index eb5d176..9ac5214 100644
--- a/meta/recipes-kernel/kmod/kmod_git.bb
+++ b/meta/recipes-kernel/kmod/kmod_29.bb
@@ -1,9 +1,42 @@
1# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> 1# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms) 2# Released under the MIT license (see COPYING.MIT for the terms)
3 3
4require kmod.inc 4SUMMARY = "Tools for managing Linux kernel modules"
5DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \
6 insert, remove, list, check properties, resolve dependencies and aliases."
7HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kmod/"
8LICENSE = "GPL-2.0+ & LGPL-2.1+"
9LICENSE:libkmod = "LGPL-2.1+"
10SECTION = "base"
11
12LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
13 file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
14 file://tools/COPYING;md5=751419260aa954499f7abaabaa882bbe \
15 "
16inherit autotools bash-completion gtk-doc pkgconfig manpages update-alternatives
17
18SRCREV = "b6ecfc916a17eab8f93be5b09f4e4f845aabd3d1"
19
20SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git;branch=master \
21 file://depmod-search.conf \
22 file://avoid_parallel_tests.patch \
23 "
24
25S = "${WORKDIR}/git"
26
27EXTRA_OECONF += "--enable-tools"
28
29PACKAGECONFIG ??= "zlib"
30PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
31PACKAGECONFIG[logging] = " --enable-logging,--disable-logging"
32PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native"
33PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
34PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz"
35PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
36PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
37
38GTKDOC_DOCDIR = "${S}/libkmod/docs"
5 39
6DEPENDS += "zlib"
7PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" 40PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
8RPROVIDES:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" 41RPROVIDES:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
9RCONFLICTS:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" 42RCONFLICTS:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
@@ -13,15 +46,15 @@ RREPLACES:${PN} += "module-init-tools-insmod-static module-init-tools-depmod mod
13RCONFLICTS:libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" 46RCONFLICTS:libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
14 47
15# autotools set prefix to /usr, however we want them in /bin and /sbin 48# autotools set prefix to /usr, however we want them in /bin and /sbin
16EXTRA_OECONF += " --bindir=${base_bindir} --sbindir=${base_sbindir}" 49EXTRA_OECONF += "--bindir=${base_bindir} --sbindir=${base_sbindir}"
17 50
18do_install:append () { 51do_install:append () {
19 install -dm755 ${D}${base_bindir} 52 install -dm755 ${D}${base_bindir}
20 install -dm755 ${D}${base_sbindir} 53 install -dm755 ${D}${base_sbindir}
21 # add symlinks to kmod 54 # add symlinks to kmod
22 lnr ${D}${base_bindir}/kmod ${D}${base_bindir}/lsmod 55 ln -rs ${D}${base_bindir}/kmod ${D}${base_bindir}/lsmod
23 for tool in insmod rmmod depmod modinfo modprobe; do 56 for tool in insmod rmmod depmod modinfo modprobe; do
24 lnr ${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool} 57 ln -rs ${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool}
25 done 58 done
26 # configuration directories 59 # configuration directories
27 install -dm755 ${D}${nonarch_base_libdir}/depmod.d 60 install -dm755 ${D}${nonarch_base_libdir}/depmod.d
@@ -33,30 +66,21 @@ do_install:append () {
33 install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${nonarch_base_libdir}/depmod.d/search.conf" 66 install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${nonarch_base_libdir}/depmod.d/search.conf"
34} 67}
35 68
36do_compile:prepend() {
37 sed -i 's/ac_pwd=/#ac_pwd=/' config.status ; sed -i "/#ac_pwd=/a\ac_pwd='.'" config.status
38}
39
40inherit update-alternatives bash-completion
41
42ALTERNATIVE_PRIORITY = "70" 69ALTERNATIVE_PRIORITY = "70"
43 70
44ALTERNATIVE:kmod = "insmod modprobe rmmod modinfo bin-lsmod lsmod depmod" 71ALTERNATIVE:kmod = "insmod modprobe rmmod modinfo bin-lsmod lsmod depmod"
45 72
73ALTERNATIVE_LINK_NAME[depmod] = "${base_sbindir}/depmod"
46ALTERNATIVE_LINK_NAME[insmod] = "${base_sbindir}/insmod" 74ALTERNATIVE_LINK_NAME[insmod] = "${base_sbindir}/insmod"
47ALTERNATIVE_LINK_NAME[modprobe] = "${base_sbindir}/modprobe" 75ALTERNATIVE_LINK_NAME[modprobe] = "${base_sbindir}/modprobe"
48ALTERNATIVE_LINK_NAME[rmmod] = "${base_sbindir}/rmmod" 76ALTERNATIVE_LINK_NAME[rmmod] = "${base_sbindir}/rmmod"
49ALTERNATIVE_LINK_NAME[modinfo] = "${base_sbindir}/modinfo" 77ALTERNATIVE_LINK_NAME[modinfo] = "${base_sbindir}/modinfo"
50ALTERNATIVE_LINK_NAME[bin-lsmod] = "${base_bindir}/lsmod" 78ALTERNATIVE_LINK_NAME[bin-lsmod] = "${base_bindir}/lsmod"
51
52ALTERNATIVE_LINK_NAME[lsmod] = "${base_sbindir}/lsmod" 79ALTERNATIVE_LINK_NAME[lsmod] = "${base_sbindir}/lsmod"
53ALTERNATIVE_TARGET[lsmod] = "${base_bindir}/lsmod.${BPN}" 80ALTERNATIVE_TARGET[lsmod] = "${base_bindir}/lsmod.${BPN}"
54 81
55ALTERNATIVE_LINK_NAME[depmod] = "${base_sbindir}/depmod"
56
57PACKAGES =+ "libkmod" 82PACKAGES =+ "libkmod"
58
59FILES:libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}" 83FILES:libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}"
60FILES:${PN} += "${nonarch_base_libdir}/depmod.d ${nonarch_base_libdir}/modprobe.d" 84FILES:${PN} += "${nonarch_base_libdir}/depmod.d ${nonarch_base_libdir}/modprobe.d"
61 85
62BBCLASSEXTEND = "nativesdk" 86BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_20210818.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_20211216.bb
index 0249332..65bfda1 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_20210818.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_20211216.bb
@@ -132,7 +132,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
132 file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \ 132 file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \
133 file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \ 133 file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
134 file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \ 134 file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \
135 file://WHENCE;md5=15ad289bf2359e8ecf613f3b04f72fab \ 135 file://WHENCE;md5=79f477f9d53eedee5a65b45193785963 \
136 " 136 "
137 137
138# These are not common licenses, set NO_GENERIC_LICENSE for them 138# These are not common licenses, set NO_GENERIC_LICENSE for them
@@ -205,7 +205,7 @@ PE = "1"
205 205
206SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/firmware/${BPN}-${PV}.tar.xz" 206SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/firmware/${BPN}-${PV}.tar.xz"
207 207
208SRC_URI[sha256sum] = "bef3d317c348d962b3a1b95cb4e19ea4f282e18112b2c669cff74f9267ce3893" 208SRC_URI[sha256sum] = "eeddb4e6bef31fd1a3757f12ccc324929bbad97855c0b9ec5ed780f74de1837d"
209 209
210inherit allarch 210inherit allarch
211 211
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.14.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.15.bb
index 282c04d..588cc3a 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.14.bb
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.15.bb
@@ -14,7 +14,7 @@ SRC_URI:append = "\
14 14
15LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" 15LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
16 16
17SRC_URI[md5sum] = "a082ef5748b813abca0649dab8be5f52" 17SRC_URI[md5sum] = "071d49ff4e020d58c04f9f3f76d3b594"
18SRC_URI[sha256sum] = "7e068b5e0d26a62b10e5320b25dce57588cbbc6f781c090442138c9c9c3271b2" 18SRC_URI[sha256sum] = "57b2cf6991910e3b67a1b3490022e8a0674b6965c74c12da1e99d138d1991ee8"
19 19
20 20
diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index d395739..4ceb35f 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -48,7 +48,7 @@ do_install() {
48 mkdir -p ${D}/usr/src 48 mkdir -p ${D}/usr/src
49 ( 49 (
50 cd ${D}/usr/src 50 cd ${D}/usr/src
51 lnr ${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel 51 ln -rs ${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel
52 ) 52 )
53 53
54 # for on target purposes, we unify build and source 54 # for on target purposes, we unify build and source
@@ -109,8 +109,8 @@ do_install() {
109 fi 109 fi
110 fi 110 fi
111 111
112 if [ "${ARCH}" = "arm64" ]; then 112 if [ "${ARCH}" = "arm64" -o "${ARCH}" = "riscv" ]; then
113 cp -a --parents arch/arm64/kernel/vdso/vdso.lds $kerneldir/build/ 113 cp -a --parents arch/${ARCH}/kernel/vdso/vdso.lds $kerneldir/build/
114 fi 114 fi
115 if [ "${ARCH}" = "powerpc" ]; then 115 if [ "${ARCH}" = "powerpc" ]; then
116 cp -a --parents arch/powerpc/kernel/vdso32/vdso32.lds $kerneldir/build 2>/dev/null || : 116 cp -a --parents arch/powerpc/kernel/vdso32/vdso32.lds $kerneldir/build 2>/dev/null || :
@@ -185,6 +185,12 @@ do_install() {
185 cp -a --parents arch/${ARCH}/kernel/vdso32/* $kerneldir/build/ 2>/dev/null || : 185 cp -a --parents arch/${ARCH}/kernel/vdso32/* $kerneldir/build/ 2>/dev/null || :
186 cp -a --parents arch/${ARCH}/kernel/vdso64/* $kerneldir/build/ 2>/dev/null || : 186 cp -a --parents arch/${ARCH}/kernel/vdso64/* $kerneldir/build/ 2>/dev/null || :
187 fi 187 fi
188 if [ "${ARCH}" = "riscv" ]; then
189 cp -a --parents arch/riscv/kernel/vdso/*gettimeofday.* $kerneldir/build/
190 cp -a --parents arch/riscv/kernel/vdso/note.S $kerneldir/build/
191 cp -a --parents arch/riscv/kernel/vdso/gen_vdso_offsets.sh $kerneldir/build/
192 cp -a --parents arch/riscv/kernel/vdso/* $kerneldir/build/ 2>/dev/null || :
193 fi
188 194
189 # include the machine specific headers for ARM variants, if available. 195 # include the machine specific headers for ARM variants, if available.
190 if [ "${ARCH}" = "arm" ]; then 196 if [ "${ARCH}" = "arm" ]; then
diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index 005b688..0d94637 100644
--- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -16,7 +16,7 @@ inherit pkgconfig
16# provide this .inc to set specific revisions 16# provide this .inc to set specific revisions
17include recipes-kernel/linux/linux-yocto-dev-revisions.inc 17include recipes-kernel/linux/linux-yocto-dev-revisions.inc
18 18
19KBRANCH = "standard/base" 19KBRANCH = "v5.16/standard/base"
20KMETA = "kernel-meta" 20KMETA = "kernel-meta"
21 21
22SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name=machine \ 22SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name=machine \
@@ -30,7 +30,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name
30SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}' 30SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
31SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}' 31SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
32 32
33LINUX_VERSION ?= "5.15+" 33LINUX_VERSION ?= "5.16+"
34LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}" 34LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}"
35PV = "${LINUX_VERSION}+git${SRCPV}" 35PV = "${LINUX_VERSION}+git${SRCPV}"
36 36
@@ -40,6 +40,16 @@ DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
40DEPENDS += "openssl-native util-linux-native" 40DEPENDS += "openssl-native util-linux-native"
41DEPENDS += "gmp-native libmpc-native" 41DEPENDS += "gmp-native libmpc-native"
42 42
43# yaml and dtschema are required for 5.16+ device tree validation, libyaml is checked
44# via pkgconfig, so must always be present, but we can wrap the others to make them
45# conditional
46DEPENDS += "libyaml-native"
47
48PACKAGECONFIG ??= ""
49PACKAGECONFIG[dt-validation] = ",,python3-dtschema-native"
50# we need the wrappers if validation isn't in the packageconfig
51DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'dt-validation', '', 'python3-dtschema-wrapper-native', d)}"
52
43COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64|qemuriscv64)" 53COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64|qemuriscv64)"
44 54
45KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb" 55KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb b/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
index e35a91d..420d670 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
@@ -11,13 +11,13 @@ python () {
11 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") 11 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
12} 12}
13 13
14SRCREV_machine ?= "42d1c4e85643d634bddd98e5c4d8a9bcc61b3e18" 14SRCREV_machine ?= "85c14e209f1ab7cee673735c4561e656b4e65217"
15SRCREV_meta ?= "f8afd84b117f336477846b9e22178ebefb26c08d" 15SRCREV_meta ?= "de35f8006d0f932924752ddda94dd24e2da67fbc"
16 16
17SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ 17SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
18 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}" 18 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
19 19
20LINUX_VERSION ?= "5.10.70" 20LINUX_VERSION ?= "5.10.91"
21 21
22LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" 22LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
23 23
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.14.bb b/meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb
index 0baffe6..4713e45 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_5.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb
@@ -1,4 +1,4 @@
1KBRANCH ?= "v5.14/standard/preempt-rt/base" 1KBRANCH ?= "v5.15/standard/preempt-rt/base"
2 2
3require recipes-kernel/linux/linux-yocto.inc 3require recipes-kernel/linux/linux-yocto.inc
4 4
@@ -11,13 +11,13 @@ python () {
11 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") 11 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
12} 12}
13 13
14SRCREV_machine ?= "ca5b19aa3996eb1907f546fce7a7fa55053fbead" 14SRCREV_machine ?= "799919ec2113ffcec02207ea67abdc629f3bbebe"
15SRCREV_meta ?= "884dfea956ec6b166d1f99a295c47338573a974c" 15SRCREV_meta ?= "72e4eafb6b3c999aefc56e1c1b9dfa0c94ae2fbb"
16 16
17SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ 17SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
18 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.14;destsuffix=${KMETA}" 18 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA}"
19 19
20LINUX_VERSION ?= "5.14.9" 20LINUX_VERSION ?= "5.15.14"
21 21
22LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" 22LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
23 23
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
index c92a149..dabcb97 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"
6 6
7require recipes-kernel/linux/linux-yocto.inc 7require recipes-kernel/linux/linux-yocto.inc
8 8
9LINUX_VERSION ?= "5.10.70" 9LINUX_VERSION ?= "5.10.91"
10LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" 10LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
11 11
12DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" 12DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
15KMETA = "kernel-meta" 15KMETA = "kernel-meta"
16KCONF_BSP_AUDIT_LEVEL = "2" 16KCONF_BSP_AUDIT_LEVEL = "2"
17 17
18SRCREV_machine:qemuarm ?= "71ff272be9e9436f27088fbd494da2de613121ea" 18SRCREV_machine:qemuarm ?= "2227ab16358ca3193f03d0cd8509092076aeffbb"
19SRCREV_machine ?= "4d1eeccd06dd8d310b238d6350cb0f7d937f4427" 19SRCREV_machine ?= "b3fdab7a9f3c11a61565cead0445883a61081583"
20SRCREV_meta ?= "f8afd84b117f336477846b9e22178ebefb26c08d" 20SRCREV_meta ?= "de35f8006d0f932924752ddda94dd24e2da67fbc"
21 21
22PV = "${LINUX_VERSION}+git${SRCPV}" 22PV = "${LINUX_VERSION}+git${SRCPV}"
23 23
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.14.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_5.15.bb
index 5ca45ad..b539752 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.15.bb
@@ -1,12 +1,12 @@
1KBRANCH ?= "v5.14/standard/tiny/base" 1KBRANCH ?= "v5.15/standard/tiny/base"
2KBRANCH:qemuarm ?= "v5.14/standard/tiny/arm-versatile-926ejs" 2KBRANCH:qemuarm ?= "v5.15/standard/tiny/arm-versatile-926ejs"
3 3
4LINUX_KERNEL_TYPE = "tiny" 4LINUX_KERNEL_TYPE = "tiny"
5KCONFIG_MODE = "--allnoconfig" 5KCONFIG_MODE = "--allnoconfig"
6 6
7require recipes-kernel/linux/linux-yocto.inc 7require recipes-kernel/linux/linux-yocto.inc
8 8
9LINUX_VERSION ?= "5.14.9" 9LINUX_VERSION ?= "5.15.14"
10LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" 10LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
11 11
12DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" 12DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
@@ -15,14 +15,14 @@ DEPENDS += "openssl-native util-linux-native"
15KMETA = "kernel-meta" 15KMETA = "kernel-meta"
16KCONF_BSP_AUDIT_LEVEL = "2" 16KCONF_BSP_AUDIT_LEVEL = "2"
17 17
18SRCREV_machine:qemuarm ?= "66b3eb63900447948655628e141b54ce0dc3a009" 18SRCREV_machine:qemuarm ?= "a499d1d7ad7cee5ddea8a737bfd0c44b109b63b6"
19SRCREV_machine ?= "c4def465fc44a7f5311d9b942d6cdd33cb4804ca" 19SRCREV_machine ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1"
20SRCREV_meta ?= "884dfea956ec6b166d1f99a295c47338573a974c" 20SRCREV_meta ?= "72e4eafb6b3c999aefc56e1c1b9dfa0c94ae2fbb"
21 21
22PV = "${LINUX_VERSION}+git${SRCPV}" 22PV = "${LINUX_VERSION}+git${SRCPV}"
23 23
24SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ 24SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
25 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.14;destsuffix=${KMETA}" 25 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA}"
26 26
27COMPATIBLE_MACHINE = "qemux86|qemux86-64|qemuarm|qemuarmv5" 27COMPATIBLE_MACHINE = "qemux86|qemux86-64|qemuarm|qemuarmv5"
28 28
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index 331727d..a3b2416 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -46,6 +46,7 @@ LINUX_VERSION_EXTENSION ??= "-yocto-${LINUX_KERNEL_TYPE}"
46# Pick up shared functions 46# Pick up shared functions
47inherit kernel 47inherit kernel
48inherit kernel-yocto 48inherit kernel-yocto
49inherit pkgconfig
49 50
50B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build" 51B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build"
51 52
@@ -57,3 +58,15 @@ do_install:append(){
57 58
58# enable kernel-sample for oeqa/runtime/cases's ksample.py test 59# enable kernel-sample for oeqa/runtime/cases's ksample.py test
59KERNEL_FEATURES:append:qemuall=" features/kernel-sample/kernel-sample.scc" 60KERNEL_FEATURES:append:qemuall=" features/kernel-sample/kernel-sample.scc"
61
62KERNEL_DEBUG_OPTIONS ?= "stack"
63KERNEL_EXTRA_ARGS:append:x86-64 = "${@bb.utils.contains('KERNEL_DEBUG_OPTIONS', 'stack', 'HOST_LIBELF_LIBS="-L${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig/../../../usr/lib/ -lelf"', '', d)}"
64
65do_devshell:prepend() {
66 # setup native pkg-config variables (kconfig scripts call pkg-config directly, cannot generically be overriden to pkg-config-native)
67 d.setVar("PKG_CONFIG_DIR", "${STAGING_DIR_NATIVE}${libdir_native}/pkgconfig")
68 d.setVar("PKG_CONFIG_PATH", "${PKG_CONFIG_DIR}:${STAGING_DATADIR_NATIVE}/pkgconfig")
69 d.setVar("PKG_CONFIG_LIBDIR", "${PKG_CONFIG_DIR}")
70 d.setVarFlag("PKG_CONFIG_SYSROOT_DIR", "unexport", "1")
71 d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR")
72}
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.10.bb b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
index b4ccdb2..9c43738 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
@@ -13,17 +13,17 @@ KBRANCH:qemux86 ?= "v5.10/standard/base"
13KBRANCH:qemux86-64 ?= "v5.10/standard/base" 13KBRANCH:qemux86-64 ?= "v5.10/standard/base"
14KBRANCH:qemumips64 ?= "v5.10/standard/mti-malta64" 14KBRANCH:qemumips64 ?= "v5.10/standard/mti-malta64"
15 15
16SRCREV_machine:qemuarm ?= "011882741f10bd0c725139baa383eb5a4d833bca" 16SRCREV_machine:qemuarm ?= "fb570663823bd492e4c8d4339be825bda4210dc6"
17SRCREV_machine:qemuarm64 ?= "098464b7c0c3d6f2a5b9226aab3245c3fcfb4797" 17SRCREV_machine:qemuarm64 ?= "5a52b700c1693a95b8efa54cb65bec7807a75cd2"
18SRCREV_machine:qemumips ?= "88494c005ab76864e706097056557b5616da65c6" 18SRCREV_machine:qemumips ?= "8eb8a801f5f4764c362aefd5e97e704755cf740b"
19SRCREV_machine:qemuppc ?= "a2b9c27f431a20ebfcd4146971c9422f4216aa90" 19SRCREV_machine:qemuppc ?= "21b014e385a6b54a2fd7d667a1b556c69cda77de"
20SRCREV_machine:qemuriscv64 ?= "7dda2a9f69de7f80e572d38236896e97be79f39d" 20SRCREV_machine:qemuriscv64 ?= "77c8d144b066f69e009ce2ee540a593b11eb736a"
21SRCREV_machine:qemuriscv32 ?= "7dda2a9f69de7f80e572d38236896e97be79f39d" 21SRCREV_machine:qemuriscv32 ?= "77c8d144b066f69e009ce2ee540a593b11eb736a"
22SRCREV_machine:qemux86 ?= "7dda2a9f69de7f80e572d38236896e97be79f39d" 22SRCREV_machine:qemux86 ?= "77c8d144b066f69e009ce2ee540a593b11eb736a"
23SRCREV_machine:qemux86-64 ?= "7dda2a9f69de7f80e572d38236896e97be79f39d" 23SRCREV_machine:qemux86-64 ?= "77c8d144b066f69e009ce2ee540a593b11eb736a"
24SRCREV_machine:qemumips64 ?= "80da62cff32617711767cd6b01f64f1dc14f94d8" 24SRCREV_machine:qemumips64 ?= "5468343e50389dba73b5d441289d5094bd0dc9f0"
25SRCREV_machine ?= "7dda2a9f69de7f80e572d38236896e97be79f39d" 25SRCREV_machine ?= "77c8d144b066f69e009ce2ee540a593b11eb736a"
26SRCREV_meta ?= "f8afd84b117f336477846b9e22178ebefb26c08d" 26SRCREV_meta ?= "de35f8006d0f932924752ddda94dd24e2da67fbc"
27 27
28# remap qemuarm to qemuarma15 for the 5.8 kernel 28# remap qemuarm to qemuarma15 for the 5.8 kernel
29# KMACHINE:qemuarm ?= "qemuarma15" 29# KMACHINE:qemuarm ?= "qemuarma15"
@@ -32,11 +32,11 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
32 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}" 32 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
33 33
34LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" 34LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
35LINUX_VERSION ?= "5.10.70" 35LINUX_VERSION ?= "5.10.91"
36 36
37DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" 37DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
38DEPENDS += "openssl-native util-linux-native" 38DEPENDS += "openssl-native util-linux-native"
39DEPENDS += "gmp-native" 39DEPENDS += "gmp-native libmpc-native"
40 40
41PV = "${LINUX_VERSION}+git${SRCPV}" 41PV = "${LINUX_VERSION}+git${SRCPV}"
42 42
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.14.bb b/meta/recipes-kernel/linux/linux-yocto_5.15.bb
index 6a032a1..daa83eb 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.15.bb
@@ -1,29 +1,29 @@
1KBRANCH ?= "v5.14/standard/base" 1KBRANCH ?= "v5.15/standard/base"
2 2
3require recipes-kernel/linux/linux-yocto.inc 3require recipes-kernel/linux/linux-yocto.inc
4 4
5# board specific branches 5# board specific branches
6KBRANCH:qemuarm ?= "v5.14/standard/arm-versatile-926ejs" 6KBRANCH:qemuarm ?= "v5.15/standard/arm-versatile-926ejs"
7KBRANCH:qemuarm64 ?= "v5.14/standard/qemuarm64" 7KBRANCH:qemuarm64 ?= "v5.15/standard/qemuarm64"
8KBRANCH:qemumips ?= "v5.14/standard/mti-malta32" 8KBRANCH:qemumips ?= "v5.15/standard/mti-malta32"
9KBRANCH:qemuppc ?= "v5.14/standard/qemuppc" 9KBRANCH:qemuppc ?= "v5.15/standard/qemuppc"
10KBRANCH:qemuriscv64 ?= "v5.14/standard/base" 10KBRANCH:qemuriscv64 ?= "v5.15/standard/base"
11KBRANCH:qemuriscv32 ?= "v5.14/standard/base" 11KBRANCH:qemuriscv32 ?= "v5.15/standard/base"
12KBRANCH:qemux86 ?= "v5.14/standard/base" 12KBRANCH:qemux86 ?= "v5.15/standard/base"
13KBRANCH:qemux86-64 ?= "v5.14/standard/base" 13KBRANCH:qemux86-64 ?= "v5.15/standard/base"
14KBRANCH:qemumips64 ?= "v5.14/standard/mti-malta64" 14KBRANCH:qemumips64 ?= "v5.15/standard/mti-malta64"
15 15
16SRCREV_machine:qemuarm ?= "c3a887f62f231d6b31f0209712014f9cbc7fd77e" 16SRCREV_machine:qemuarm ?= "03294d897ba8374d172b5c035e8c5698f676a1d7"
17SRCREV_machine:qemuarm64 ?= "c4def465fc44a7f5311d9b942d6cdd33cb4804ca" 17SRCREV_machine:qemuarm64 ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1"
18SRCREV_machine:qemumips ?= "77174bdf6581bdb93f0f458601364800670f8531" 18SRCREV_machine:qemumips ?= "84d8700593a35c850938994e080422bd354245ce"
19SRCREV_machine:qemuppc ?= "c4def465fc44a7f5311d9b942d6cdd33cb4804ca" 19SRCREV_machine:qemuppc ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1"
20SRCREV_machine:qemuriscv64 ?= "c4def465fc44a7f5311d9b942d6cdd33cb4804ca" 20SRCREV_machine:qemuriscv64 ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1"
21SRCREV_machine:qemuriscv32 ?= "c4def465fc44a7f5311d9b942d6cdd33cb4804ca" 21SRCREV_machine:qemuriscv32 ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1"
22SRCREV_machine:qemux86 ?= "c4def465fc44a7f5311d9b942d6cdd33cb4804ca" 22SRCREV_machine:qemux86 ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1"
23SRCREV_machine:qemux86-64 ?= "c4def465fc44a7f5311d9b942d6cdd33cb4804ca" 23SRCREV_machine:qemux86-64 ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1"
24SRCREV_machine:qemumips64 ?= "e86c3a6ad2fde78ad03e0b899286bf603756207d" 24SRCREV_machine:qemumips64 ?= "4b8ef0714dd9fe90b5f92fab297926c482a58b88"
25SRCREV_machine ?= "c4def465fc44a7f5311d9b942d6cdd33cb4804ca" 25SRCREV_machine ?= "f77b2ba7d575bca40670dd20fcafa4574d9e56f1"
26SRCREV_meta ?= "884dfea956ec6b166d1f99a295c47338573a974c" 26SRCREV_meta ?= "72e4eafb6b3c999aefc56e1c1b9dfa0c94ae2fbb"
27 27
28# set your preferred provider of linux-yocto to 'linux-yocto-upstream', and you'll 28# set your preferred provider of linux-yocto to 'linux-yocto-upstream', and you'll
29# get the <version>/base branch, which is pure upstream -stable, and the same 29# get the <version>/base branch, which is pure upstream -stable, and the same
@@ -31,18 +31,18 @@ SRCREV_meta ?= "884dfea956ec6b166d1f99a295c47338573a974c"
31# normal PREFERRED_VERSION settings. 31# normal PREFERRED_VERSION settings.
32BBCLASSEXTEND = "devupstream:target" 32BBCLASSEXTEND = "devupstream:target"
33DEFAULT_PREFERENCE:class-devupstream = "-1" 33DEFAULT_PREFERENCE:class-devupstream = "-1"
34SRCREV_machine:class-devupstream ?= "70248e7b378b96f208d5544ee25b808a8ef2ddc2" 34SRCREV_machine:class-devupstream ?= "d114b082bef784345bfac1e1d5c17257005284f2"
35PN:class-devupstream = "linux-yocto-upstream" 35PN:class-devupstream = "linux-yocto-upstream"
36KBRANCH:class-devupstream = "v5.14/base" 36KBRANCH:class-devupstream = "v5.15/base"
37 37
38# remap qemuarm to qemuarma15 for the 5.8 kernel 38# remap qemuarm to qemuarma15 for the 5.8 kernel
39# KMACHINE:qemuarm ?= "qemuarma15" 39# KMACHINE:qemuarm ?= "qemuarma15"
40 40
41SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \ 41SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
42 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.14;destsuffix=${KMETA}" 42 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA}"
43 43
44LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" 44LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
45LINUX_VERSION ?= "5.14.9" 45LINUX_VERSION ?= "5.15.14"
46 46
47DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" 47DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
48DEPENDS += "openssl-native util-linux-native" 48DEPENDS += "openssl-native util-linux-native"
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch
deleted file mode 100644
index 4e52e5f..0000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch
+++ /dev/null
@@ -1,394 +0,0 @@
1From 8be4c8a38ee1e297578e094a6e4c143ec5259aba Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 13 Sep 2021 12:00:38 -0400
4Subject: [PATCH 1/2] fix: cpu/hotplug: Remove deprecated CPU-hotplug
5 functions. (v5.15)
6
7The CPU-hotplug functions get|put_online_cpus() were deprecated in v4.13
8and removed in v5.15.
9
10See upstream commits :
11
12commit 8c854303ce0e38e5bbedd725ff39da7e235865d8
13Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
14Date: Tue Aug 3 16:16:21 2021 +0200
15
16 cpu/hotplug: Remove deprecated CPU-hotplug functions.
17
18 No users in tree use the deprecated CPU-hotplug functions anymore.
19
20 Remove them.
21
22Introduced in v4.13 :
23
24 commit 8f553c498e1772cccb39a114da4a498d22992758
25 Author: Thomas Gleixner <tglx@linutronix.de>
26 Date: Wed May 24 10:15:12 2017 +0200
27
28 cpu/hotplug: Provide cpus_read|write_[un]lock()
29
30 The counting 'rwsem' hackery of get|put_online_cpus() is going to be
31 replaced by percpu rwsem.
32
33 Rename the functions to make it clear that it's locking and not some
34 refcount style interface. These new functions will be used for the
35 preparatory patches which make the code ready for the percpu rwsem
36 conversion.
37
38 Rename all instances in the cpu hotplug code while at it.
39
40Upstream-Status: backport [https://git.lttng.org/?p=lttng-modules.git;a=commit;h=ffcc873470121ef1ebb110df3d9038a38d9cb7cb]
41
42Change-Id: I5a37cf5afc075a402b7347989fac637dfa60a1ed
43Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
44Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
45---
46 include/wrapper/cpu.h | 44 +++++++++++++++++++++++
47 src/lib/ringbuffer/ring_buffer_backend.c | 8 ++---
48 src/lib/ringbuffer/ring_buffer_frontend.c | 17 ++++-----
49 src/lib/ringbuffer/ring_buffer_iterator.c | 15 ++++----
50 src/lttng-context-perf-counters.c | 11 +++---
51 src/lttng-statedump-impl.c | 6 ++--
52 6 files changed, 74 insertions(+), 27 deletions(-)
53 create mode 100644 include/wrapper/cpu.h
54
55diff --git a/include/wrapper/cpu.h b/include/wrapper/cpu.h
56new file mode 100644
57index 00000000..cbee1962
58--- /dev/null
59+++ b/include/wrapper/cpu.h
60@@ -0,0 +1,44 @@
61+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
62+ *
63+ * wrapper/cpu.h
64+ *
65+ * Copyright (C) 2021 Michael Jeanson <mjeanson@efficios.com>
66+ */
67+
68+#ifndef _LTTNG_WRAPPER_CPU_H
69+#define _LTTNG_WRAPPER_CPU_H
70+
71+#include <linux/cpu.h>
72+#include <lttng/kernel-version.h>
73+
74+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0))
75+
76+static inline
77+void lttng_cpus_read_lock(void)
78+{
79+ cpus_read_lock();
80+}
81+
82+static inline
83+void lttng_cpus_read_unlock(void)
84+{
85+ cpus_read_unlock();
86+}
87+
88+#else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0) */
89+
90+static inline
91+void lttng_cpus_read_lock(void)
92+{
93+ get_online_cpus();
94+}
95+
96+static inline
97+void lttng_cpus_read_unlock(void)
98+{
99+ put_online_cpus();
100+}
101+
102+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0) */
103+
104+#endif /* _LTTNG_WRAPPER_CPU_H */
105diff --git a/src/lib/ringbuffer/ring_buffer_backend.c b/src/lib/ringbuffer/ring_buffer_backend.c
106index 26efb2bc..9a339be0 100644
107--- a/src/lib/ringbuffer/ring_buffer_backend.c
108+++ b/src/lib/ringbuffer/ring_buffer_backend.c
109@@ -12,10 +12,10 @@
110 #include <linux/delay.h>
111 #include <linux/errno.h>
112 #include <linux/slab.h>
113-#include <linux/cpu.h>
114 #include <linux/mm.h>
115 #include <linux/vmalloc.h>
116
117+#include <wrapper/cpu.h>
118 #include <wrapper/mm.h>
119 #include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_mappings() */
120 #include <ringbuffer/config.h>
121@@ -445,14 +445,14 @@ int channel_backend_init(struct channel_backend *chanb,
122 chanb->cpu_hp_notifier.priority = 5;
123 register_hotcpu_notifier(&chanb->cpu_hp_notifier);
124
125- get_online_cpus();
126+ lttng_cpus_read_lock();
127 for_each_online_cpu(i) {
128 ret = lib_ring_buffer_create(per_cpu_ptr(chanb->buf, i),
129 chanb, i);
130 if (ret)
131 goto free_bufs; /* cpu hotplug locked */
132 }
133- put_online_cpus();
134+ lttng_cpus_read_unlock();
135 #else
136 for_each_possible_cpu(i) {
137 ret = lib_ring_buffer_create(per_cpu_ptr(chanb->buf, i),
138@@ -485,7 +485,7 @@ free_bufs:
139 */
140 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
141 #ifdef CONFIG_HOTPLUG_CPU
142- put_online_cpus();
143+ lttng_cpus_read_unlock();
144 unregister_hotcpu_notifier(&chanb->cpu_hp_notifier);
145 #endif
146 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
147diff --git a/src/lib/ringbuffer/ring_buffer_frontend.c b/src/lib/ringbuffer/ring_buffer_frontend.c
148index e9056118..87a575d0 100644
149--- a/src/lib/ringbuffer/ring_buffer_frontend.c
150+++ b/src/lib/ringbuffer/ring_buffer_frontend.c
151@@ -48,6 +48,7 @@
152 #include <ringbuffer/iterator.h>
153 #include <ringbuffer/nohz.h>
154 #include <wrapper/atomic.h>
155+#include <wrapper/cpu.h>
156 #include <wrapper/kref.h>
157 #include <wrapper/percpu-defs.h>
158 #include <wrapper/timer.h>
159@@ -724,7 +725,7 @@ static void channel_unregister_notifiers(struct lttng_kernel_ring_buffer_channel
160 int cpu;
161
162 #ifdef CONFIG_HOTPLUG_CPU
163- get_online_cpus();
164+ lttng_cpus_read_lock();
165 chan->cpu_hp_enable = 0;
166 for_each_online_cpu(cpu) {
167 struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
168@@ -732,7 +733,7 @@ static void channel_unregister_notifiers(struct lttng_kernel_ring_buffer_channel
169 lib_ring_buffer_stop_switch_timer(buf);
170 lib_ring_buffer_stop_read_timer(buf);
171 }
172- put_online_cpus();
173+ lttng_cpus_read_unlock();
174 unregister_cpu_notifier(&chan->cpu_hp_notifier);
175 #else
176 for_each_possible_cpu(cpu) {
177@@ -772,14 +773,14 @@ void lib_ring_buffer_set_quiescent_channel(struct lttng_kernel_ring_buffer_chann
178 const struct lttng_kernel_ring_buffer_config *config = &chan->backend.config;
179
180 if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
181- get_online_cpus();
182+ lttng_cpus_read_lock();
183 for_each_channel_cpu(cpu, chan) {
184 struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
185 cpu);
186
187 lib_ring_buffer_set_quiescent(buf);
188 }
189- put_online_cpus();
190+ lttng_cpus_read_unlock();
191 } else {
192 struct lttng_kernel_ring_buffer *buf = chan->backend.buf;
193
194@@ -794,14 +795,14 @@ void lib_ring_buffer_clear_quiescent_channel(struct lttng_kernel_ring_buffer_cha
195 const struct lttng_kernel_ring_buffer_config *config = &chan->backend.config;
196
197 if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
198- get_online_cpus();
199+ lttng_cpus_read_lock();
200 for_each_channel_cpu(cpu, chan) {
201 struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
202 cpu);
203
204 lib_ring_buffer_clear_quiescent(buf);
205 }
206- put_online_cpus();
207+ lttng_cpus_read_unlock();
208 } else {
209 struct lttng_kernel_ring_buffer *buf = chan->backend.buf;
210
211@@ -899,7 +900,7 @@ struct lttng_kernel_ring_buffer_channel *channel_create(const struct lttng_kerne
212 chan->cpu_hp_notifier.priority = 6;
213 register_cpu_notifier(&chan->cpu_hp_notifier);
214
215- get_online_cpus();
216+ lttng_cpus_read_lock();
217 for_each_online_cpu(cpu) {
218 struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
219 cpu);
220@@ -909,7 +910,7 @@ struct lttng_kernel_ring_buffer_channel *channel_create(const struct lttng_kerne
221 spin_unlock(&per_cpu(ring_buffer_nohz_lock, cpu));
222 }
223 chan->cpu_hp_enable = 1;
224- put_online_cpus();
225+ lttng_cpus_read_unlock();
226 #else
227 for_each_possible_cpu(cpu) {
228 struct lttng_kernel_ring_buffer *buf = per_cpu_ptr(chan->backend.buf,
229diff --git a/src/lib/ringbuffer/ring_buffer_iterator.c b/src/lib/ringbuffer/ring_buffer_iterator.c
230index 25839af6..60c95ca6 100644
231--- a/src/lib/ringbuffer/ring_buffer_iterator.c
232+++ b/src/lib/ringbuffer/ring_buffer_iterator.c
233@@ -10,6 +10,7 @@
234 */
235
236 #include <ringbuffer/iterator.h>
237+#include <wrapper/cpu.h>
238 #include <wrapper/file.h>
239 #include <wrapper/uaccess.h>
240 #include <linux/jiffies.h>
241@@ -440,13 +441,13 @@ int channel_iterator_init(struct lttng_kernel_ring_buffer_channel *chan)
242 chan->hp_iter_notifier.priority = 10;
243 register_cpu_notifier(&chan->hp_iter_notifier);
244
245- get_online_cpus();
246+ lttng_cpus_read_lock();
247 for_each_online_cpu(cpu) {
248 buf = per_cpu_ptr(chan->backend.buf, cpu);
249 lib_ring_buffer_iterator_init(chan, buf);
250 }
251 chan->hp_iter_enable = 1;
252- put_online_cpus();
253+ lttng_cpus_read_unlock();
254 #else
255 for_each_possible_cpu(cpu) {
256 buf = per_cpu_ptr(chan->backend.buf, cpu);
257@@ -519,7 +520,7 @@ int channel_iterator_open(struct lttng_kernel_ring_buffer_channel *chan)
258 CHAN_WARN_ON(chan, config->output != RING_BUFFER_ITERATOR);
259
260 if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
261- get_online_cpus();
262+ lttng_cpus_read_lock();
263 /* Allow CPU hotplug to keep track of opened reader */
264 chan->iter.read_open = 1;
265 for_each_channel_cpu(cpu, chan) {
266@@ -529,7 +530,7 @@ int channel_iterator_open(struct lttng_kernel_ring_buffer_channel *chan)
267 goto error;
268 buf->iter.read_open = 1;
269 }
270- put_online_cpus();
271+ lttng_cpus_read_unlock();
272 } else {
273 buf = channel_get_ring_buffer(config, chan, 0);
274 ret = lib_ring_buffer_iterator_open(buf);
275@@ -538,7 +539,7 @@ int channel_iterator_open(struct lttng_kernel_ring_buffer_channel *chan)
276 error:
277 /* Error should always happen on CPU 0, hence no close is required. */
278 CHAN_WARN_ON(chan, cpu != 0);
279- put_online_cpus();
280+ lttng_cpus_read_unlock();
281 return ret;
282 }
283 EXPORT_SYMBOL_GPL(channel_iterator_open);
284@@ -550,7 +551,7 @@ void channel_iterator_release(struct lttng_kernel_ring_buffer_channel *chan)
285 int cpu;
286
287 if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
288- get_online_cpus();
289+ lttng_cpus_read_lock();
290 for_each_channel_cpu(cpu, chan) {
291 buf = channel_get_ring_buffer(config, chan, cpu);
292 if (buf->iter.read_open) {
293@@ -559,7 +560,7 @@ void channel_iterator_release(struct lttng_kernel_ring_buffer_channel *chan)
294 }
295 }
296 chan->iter.read_open = 0;
297- put_online_cpus();
298+ lttng_cpus_read_unlock();
299 } else {
300 buf = channel_get_ring_buffer(config, chan, 0);
301 lib_ring_buffer_iterator_release(buf);
302diff --git a/src/lttng-context-perf-counters.c b/src/lttng-context-perf-counters.c
303index b0227d47..372f05e0 100644
304--- a/src/lttng-context-perf-counters.c
305+++ b/src/lttng-context-perf-counters.c
306@@ -16,6 +16,7 @@
307 #include <lttng/events.h>
308 #include <lttng/events-internal.h>
309 #include <ringbuffer/frontend_types.h>
310+#include <wrapper/cpu.h>
311 #include <wrapper/vmalloc.h>
312 #include <wrapper/perf.h>
313 #include <lttng/tracer.h>
314@@ -97,10 +98,10 @@ void lttng_destroy_perf_counter_ctx_field(void *priv)
315 {
316 int cpu;
317
318- get_online_cpus();
319+ lttng_cpus_read_lock();
320 for_each_online_cpu(cpu)
321 perf_event_release_kernel(events[cpu]);
322- put_online_cpus();
323+ lttng_cpus_read_unlock();
324 #ifdef CONFIG_HOTPLUG_CPU
325 unregister_cpu_notifier(&perf_field->nb);
326 #endif
327@@ -304,7 +305,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type,
328 perf_field->nb.priority = 0;
329 register_cpu_notifier(&perf_field->nb);
330 #endif
331- get_online_cpus();
332+ lttng_cpus_read_lock();
333 for_each_online_cpu(cpu) {
334 events[cpu] = wrapper_perf_event_create_kernel_counter(attr,
335 cpu, NULL, overflow_callback);
336@@ -317,7 +318,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type,
337 goto counter_busy;
338 }
339 }
340- put_online_cpus();
341+ lttng_cpus_read_unlock();
342 perf_field->hp_enable = 1;
343 }
344 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
345@@ -351,7 +352,7 @@ counter_error:
346 if (events[cpu] && !IS_ERR(events[cpu]))
347 perf_event_release_kernel(events[cpu]);
348 }
349- put_online_cpus();
350+ lttng_cpus_read_unlock();
351 #ifdef CONFIG_HOTPLUG_CPU
352 unregister_cpu_notifier(&perf_field->nb);
353 #endif
354diff --git a/src/lttng-statedump-impl.c b/src/lttng-statedump-impl.c
355index 4dfbca0b..2b42783a 100644
356--- a/src/lttng-statedump-impl.c
357+++ b/src/lttng-statedump-impl.c
358@@ -23,7 +23,6 @@
359 #include <linux/file.h>
360 #include <linux/interrupt.h>
361 #include <linux/irqnr.h>
362-#include <linux/cpu.h>
363 #include <linux/netdevice.h>
364 #include <linux/inetdevice.h>
365 #include <linux/mm.h>
366@@ -34,6 +33,7 @@
367
368 #include <lttng/events.h>
369 #include <lttng/tracer.h>
370+#include <wrapper/cpu.h>
371 #include <wrapper/irqdesc.h>
372 #include <wrapper/fdtable.h>
373 #include <wrapper/namespace.h>
374@@ -770,7 +770,7 @@ int do_lttng_statedump(struct lttng_kernel_session *session)
375 * is to guarantee that each CPU has been in a state where is was in
376 * syscall mode (i.e. not in a trap, an IRQ or a soft IRQ).
377 */
378- get_online_cpus();
379+ lttng_cpus_read_lock();
380 atomic_set(&kernel_threads_to_run, num_online_cpus());
381 for_each_online_cpu(cpu) {
382 INIT_DELAYED_WORK(&cpu_work[cpu], lttng_statedump_work_func);
383@@ -778,7 +778,7 @@ int do_lttng_statedump(struct lttng_kernel_session *session)
384 }
385 /* Wait for all threads to run */
386 __wait_event(statedump_wq, (atomic_read(&kernel_threads_to_run) == 0));
387- put_online_cpus();
388+ lttng_cpus_read_unlock();
389 /* Our work is done */
390 trace_lttng_statedump_end(session);
391 return 0;
392--
3932.19.1
394
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch b/meta/recipes-kernel/lttng/lttng-modules/0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch
deleted file mode 100644
index 5b5edc5..0000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch
+++ /dev/null
@@ -1,829 +0,0 @@
1From c570be0da77e963d77bac099d468bc0cd5f1bd63 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 13 Sep 2021 14:16:22 -0400
4Subject: [PATCH 2/2] fix: Revert "Makefile: Enable -Wimplicit-fallthrough for
5 Clang" (v5.15)
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10Starting with v5.15, "-Wimplicit-fallthrough=5" was added to the build
11flags which requires the use of "__attribute__((__fallthrough__))" to
12annotate fallthrough case statements.
13
14See upstream commit by the man himself:
15
16 commit d936eb23874433caa3e3d841cfa16f5434b85dcf
17 Author: Linus Torvalds <torvalds@linux-foundation.org>
18 Date: Thu Jul 15 18:05:31 2021 -0700
19
20 Revert "Makefile: Enable -Wimplicit-fallthrough for Clang"
21
22 This reverts commit b7eb335e26a9c7f258c96b3962c283c379d3ede0.
23
24 It turns out that the problem with the clang -Wimplicit-fallthrough
25 warning is not about the kernel source code, but about clang itself, and
26 that the warning is unusable until clang fixes its broken ways.
27
28 In particular, when you enable this warning for clang, you not only get
29 warnings about implicit fallthroughs. You also get this:
30
31 warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]
32
33 which is completely broken becasue it
34
35 (a) doesn't even tell you where the problem is (seriously: no line
36 numbers, no filename, no nothing).
37
38 (b) is fundamentally broken anyway, because there are perfectly valid
39 reasons to have a fallthrough statement even if it turns out that
40 it can perhaps not be reached.
41
42 In the kernel, an example of that second case is code in the scheduler:
43
44 switch (state) {
45 case cpuset:
46 if (IS_ENABLED(CONFIG_CPUSETS)) {
47 cpuset_cpus_allowed_fallback(p);
48 state = possible;
49 break;
50 }
51 fallthrough;
52 case possible:
53
54 where if CONFIG_CPUSETS is enabled you actually never hit the
55 fallthrough case at all. But that in no way makes the fallthrough
56 wrong.
57
58 So the warning is completely broken, and enabling it for clang is a very
59 bad idea.
60
61 In the meantime, we can keep the gcc option enabled, and make the gcc
62 build use
63
64 -Wimplicit-fallthrough=5
65
66 which means that we will at least continue to require a proper
67 fallthrough statement, and that gcc won't silently accept the magic
68 comment versions. Because gcc does this all correctly, and while the odd
69 "=5" part is kind of obscure, it's documented in [1]:
70
71 "-Wimplicit-fallthrough=5 doesn’t recognize any comments as
72 fallthrough comments, only attributes disable the warning"
73
74 so if clang ever fixes its bad behavior we can try enabling it there again.
75
76Upstream-Status: backport [https://git.lttng.org/?p=lttng-modules.git;a=commit;h=c190d76e8c7b44d62b3651ab845b765c1b1f8104]
77
78Change-Id: Iea69849592fb69ac04fb9bb28efcd6b8dce8ba88
79Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
80Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
81---
82 include/counter/counter-api.h | 4 +-
83 include/lttng/events-internal.h | 11 ++-
84 include/wrapper/compiler_attributes.h | 34 +++++++
85 src/lib/counter/counter.c | 13 ++-
86 src/lttng-abi.c | 91 ++++++++++++------
87 src/lttng-bytecode-interpreter.c | 4 +-
88 src/lttng-bytecode-specialize.c | 5 +-
89 src/lttng-events.c | 129 +++++++++++++++++---------
90 src/lttng-string-utils.c | 3 +-
91 src/probes/lttng-kretprobes.c | 7 +-
92 10 files changed, 215 insertions(+), 86 deletions(-)
93 create mode 100644 include/wrapper/compiler_attributes.h
94
95diff --git a/include/counter/counter-api.h b/include/counter/counter-api.h
96index fbc65818..c9f2b141 100644
97--- a/include/counter/counter-api.h
98+++ b/include/counter/counter-api.h
99@@ -15,6 +15,7 @@
100 #include <linux/bitops.h>
101 #include <counter/counter.h>
102 #include <counter/counter-internal.h>
103+#include <wrapper/compiler_attributes.h>
104 #include <wrapper/limits.h>
105
106 /*
107@@ -256,7 +257,8 @@ static __always_inline int lttng_counter_add(const struct lib_counter_config *co
108 const size_t *dimension_indexes, int64_t v)
109 {
110 switch (config->alloc) {
111- case COUNTER_ALLOC_PER_CPU: /* Fallthrough */
112+ case COUNTER_ALLOC_PER_CPU:
113+ lttng_fallthrough;
114 case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL:
115 return __lttng_counter_add_percpu(config, counter, dimension_indexes, v);
116 case COUNTER_ALLOC_GLOBAL:
117diff --git a/include/lttng/events-internal.h b/include/lttng/events-internal.h
118index cd560de8..ca2190c4 100644
119--- a/include/lttng/events-internal.h
120+++ b/include/lttng/events-internal.h
121@@ -8,6 +8,8 @@
122 #ifndef _LTTNG_EVENTS_INTERNAL_H
123 #define _LTTNG_EVENTS_INTERNAL_H
124
125+#include <wrapper/compiler_attributes.h>
126+
127 #include <lttng/events.h>
128
129 struct lttng_syscall_filter;
130@@ -561,9 +563,12 @@ static inline bool lttng_kernel_type_is_bytewise_integer(const struct lttng_kern
131 if (!type_integer)
132 return false;
133 switch (type_integer->size) {
134- case 8: /* Fall-through. */
135- case 16: /* Fall-through. */
136- case 32: /* Fall-through. */
137+ case 8:
138+ lttng_fallthrough;
139+ case 16:
140+ lttng_fallthrough;
141+ case 32:
142+ lttng_fallthrough;
143 case 64:
144 break;
145 default:
146diff --git a/include/wrapper/compiler_attributes.h b/include/wrapper/compiler_attributes.h
147new file mode 100644
148index 00000000..c2c96e76
149--- /dev/null
150+++ b/include/wrapper/compiler_attributes.h
151@@ -0,0 +1,34 @@
152+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
153+ *
154+ * wrapper/compiler_attributes.h
155+ *
156+ * Copyright (C) 2021 Michael Jeanson <mjeanson@efficios.com>
157+ */
158+
159+#ifndef _LTTNG_WRAPPER_COMPILER_ATTRIBUTES_H
160+#define _LTTNG_WRAPPER_COMPILER_ATTRIBUTES_H
161+
162+#include <lttng/kernel-version.h>
163+
164+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,20,0))
165+#include <linux/compiler_attributes.h>
166+#endif
167+
168+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,4,0))
169+
170+/*
171+ * Use the kernel provided fallthrough attribute macro.
172+ */
173+#define lttng_fallthrough fallthrough
174+
175+#else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,4,0) */
176+
177+/*
178+ * Fallback to the comment for kernels pre 5.15 that don't build with
179+ * '-Wimplicit-fallthrough=5'.
180+ */
181+#define lttng_fallthrough do {} while (0) /* fallthrough */
182+
183+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,4,0) */
184+
185+#endif /* _LTTNG_WRAPPER_COMPILER_ATTRIBUTES_H */
186diff --git a/src/lib/counter/counter.c b/src/lib/counter/counter.c
187index a4500a0e..bf038aac 100644
188--- a/src/lib/counter/counter.c
189+++ b/src/lib/counter/counter.c
190@@ -11,6 +11,7 @@
191 #include <linux/cpumask.h>
192 #include <counter/counter.h>
193 #include <counter/counter-internal.h>
194+#include <wrapper/compiler_attributes.h>
195 #include <wrapper/vmalloc.h>
196 #include <wrapper/limits.h>
197
198@@ -324,7 +325,8 @@ int lttng_counter_aggregate(const struct lib_counter_config *config,
199 *underflow = false;
200
201 switch (config->alloc) {
202- case COUNTER_ALLOC_GLOBAL: /* Fallthrough */
203+ case COUNTER_ALLOC_GLOBAL:
204+ lttng_fallthrough;
205 case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL:
206 /* Read global counter. */
207 ret = lttng_counter_read(config, counter, dimension_indexes,
208@@ -342,7 +344,8 @@ int lttng_counter_aggregate(const struct lib_counter_config *config,
209 switch (config->alloc) {
210 case COUNTER_ALLOC_GLOBAL:
211 break;
212- case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: /* Fallthrough */
213+ case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL:
214+ lttng_fallthrough;
215 case COUNTER_ALLOC_PER_CPU:
216 //TODO: integrate with CPU hotplug and online cpus
217 for (cpu = 0; cpu < num_possible_cpus(); cpu++) {
218@@ -448,7 +451,8 @@ int lttng_counter_clear(const struct lib_counter_config *config,
219 int cpu, ret;
220
221 switch (config->alloc) {
222- case COUNTER_ALLOC_GLOBAL: /* Fallthrough */
223+ case COUNTER_ALLOC_GLOBAL:
224+ lttng_fallthrough;
225 case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL:
226 /* Clear global counter. */
227 ret = lttng_counter_clear_cpu(config, counter, dimension_indexes, -1);
228@@ -462,7 +466,8 @@ int lttng_counter_clear(const struct lib_counter_config *config,
229 switch (config->alloc) {
230 case COUNTER_ALLOC_GLOBAL:
231 break;
232- case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: /* Fallthrough */
233+ case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL:
234+ lttng_fallthrough;
235 case COUNTER_ALLOC_PER_CPU:
236 //TODO: integrate with CPU hotplug and online cpus
237 for (cpu = 0; cpu < num_possible_cpus(); cpu++) {
238diff --git a/src/lttng-abi.c b/src/lttng-abi.c
239index cc453894..eac1afd1 100644
240--- a/src/lttng-abi.c
241+++ b/src/lttng-abi.c
242@@ -34,6 +34,7 @@
243 #include <ringbuffer/vfs.h>
244 #include <ringbuffer/backend.h>
245 #include <ringbuffer/frontend.h>
246+#include <wrapper/compiler_attributes.h>
247 #include <wrapper/poll.h>
248 #include <wrapper/file.h>
249 #include <wrapper/kref.h>
250@@ -1332,7 +1333,8 @@ long lttng_metadata_ring_buffer_ioctl(struct file *filp,
251 */
252 return -ENOSYS;
253 }
254- case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY: /* Fall-through. */
255+ case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY:
256+ lttng_fallthrough;
257 case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH:
258 {
259 struct lttng_metadata_stream *stream = filp->private_data;
260@@ -1441,7 +1443,8 @@ long lttng_metadata_ring_buffer_compat_ioctl(struct file *filp,
261 */
262 return -ENOSYS;
263 }
264- case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY: /* Fall-through. */
265+ case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY:
266+ lttng_fallthrough;
267 case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH:
268 {
269 struct lttng_metadata_stream *stream = filp->private_data;
270@@ -1758,8 +1761,10 @@ int lttng_abi_validate_event_param(struct lttng_kernel_abi_event *event_param)
271 switch (event_param->instrumentation) {
272 case LTTNG_KERNEL_ABI_SYSCALL:
273 switch (event_param->u.syscall.entryexit) {
274- case LTTNG_KERNEL_ABI_SYSCALL_ENTRY: /* Fall-through */
275- case LTTNG_KERNEL_ABI_SYSCALL_EXIT: /* Fall-through */
276+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRY:
277+ lttng_fallthrough;
278+ case LTTNG_KERNEL_ABI_SYSCALL_EXIT:
279+ lttng_fallthrough;
280 case LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT:
281 break;
282 default:
283@@ -1783,20 +1788,26 @@ int lttng_abi_validate_event_param(struct lttng_kernel_abi_event *event_param)
284 switch (event_param->u.kretprobe.entryexit) {
285 case LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT:
286 break;
287- case LTTNG_KERNEL_ABI_SYSCALL_ENTRY: /* Fall-through */
288- case LTTNG_KERNEL_ABI_SYSCALL_EXIT: /* Fall-through */
289+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRY:
290+ lttng_fallthrough;
291+ case LTTNG_KERNEL_ABI_SYSCALL_EXIT:
292+ lttng_fallthrough;
293 default:
294 return -EINVAL;
295 }
296 break;
297
298- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
299- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
300+ case LTTNG_KERNEL_ABI_TRACEPOINT:
301+ lttng_fallthrough;
302+ case LTTNG_KERNEL_ABI_KPROBE:
303+ lttng_fallthrough;
304 case LTTNG_KERNEL_ABI_UPROBE:
305 break;
306
307- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
308- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
309+ case LTTNG_KERNEL_ABI_FUNCTION:
310+ lttng_fallthrough;
311+ case LTTNG_KERNEL_ABI_NOOP:
312+ lttng_fallthrough;
313 default:
314 return -EINVAL;
315 }
316@@ -1830,18 +1841,23 @@ int lttng_abi_create_event(struct file *channel_file,
317 }
318
319 switch (event_param->instrumentation) {
320- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
321+ case LTTNG_KERNEL_ABI_TRACEPOINT:
322+ lttng_fallthrough;
323 case LTTNG_KERNEL_ABI_SYSCALL:
324 fops = &lttng_event_recorder_enabler_fops;
325 break;
326- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
327- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
328+ case LTTNG_KERNEL_ABI_KPROBE:
329+ lttng_fallthrough;
330+ case LTTNG_KERNEL_ABI_KRETPROBE:
331+ lttng_fallthrough;
332 case LTTNG_KERNEL_ABI_UPROBE:
333 fops = &lttng_event_recorder_event_fops;
334 break;
335
336- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
337- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
338+ case LTTNG_KERNEL_ABI_FUNCTION:
339+ lttng_fallthrough;
340+ case LTTNG_KERNEL_ABI_NOOP:
341+ lttng_fallthrough;
342 default:
343 return -EINVAL;
344 }
345@@ -1867,7 +1883,8 @@ int lttng_abi_create_event(struct file *channel_file,
346 goto event_error;
347
348 switch (event_param->instrumentation) {
349- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
350+ case LTTNG_KERNEL_ABI_TRACEPOINT:
351+ lttng_fallthrough;
352 case LTTNG_KERNEL_ABI_SYSCALL:
353 {
354 struct lttng_event_enabler *event_enabler;
355@@ -1887,8 +1904,10 @@ int lttng_abi_create_event(struct file *channel_file,
356 break;
357 }
358
359- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
360- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
361+ case LTTNG_KERNEL_ABI_KPROBE:
362+ lttng_fallthrough;
363+ case LTTNG_KERNEL_ABI_KRETPROBE:
364+ lttng_fallthrough;
365 case LTTNG_KERNEL_ABI_UPROBE:
366 {
367 struct lttng_kernel_event_recorder *event;
368@@ -1908,8 +1927,10 @@ int lttng_abi_create_event(struct file *channel_file,
369 break;
370 }
371
372- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
373- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
374+ case LTTNG_KERNEL_ABI_FUNCTION:
375+ lttng_fallthrough;
376+ case LTTNG_KERNEL_ABI_NOOP:
377+ lttng_fallthrough;
378 default:
379 ret = -EINVAL;
380 goto event_error;
381@@ -2043,18 +2064,23 @@ int lttng_abi_create_event_notifier(struct file *event_notifier_group_file,
382 }
383
384 switch (event_notifier_param->event.instrumentation) {
385- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
386+ case LTTNG_KERNEL_ABI_TRACEPOINT:
387+ lttng_fallthrough;
388 case LTTNG_KERNEL_ABI_SYSCALL:
389 fops = &lttng_event_notifier_enabler_fops;
390 break;
391- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
392- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
393+ case LTTNG_KERNEL_ABI_KPROBE:
394+ lttng_fallthrough;
395+ case LTTNG_KERNEL_ABI_KRETPROBE:
396+ lttng_fallthrough;
397 case LTTNG_KERNEL_ABI_UPROBE:
398 fops = &lttng_event_notifier_event_fops;
399 break;
400
401- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
402- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
403+ case LTTNG_KERNEL_ABI_FUNCTION:
404+ lttng_fallthrough;
405+ case LTTNG_KERNEL_ABI_NOOP:
406+ lttng_fallthrough;
407 default:
408 ret = -EINVAL;
409 goto inval_instr;
410@@ -2086,7 +2112,8 @@ int lttng_abi_create_event_notifier(struct file *event_notifier_group_file,
411 goto event_notifier_error;
412
413 switch (event_notifier_param->event.instrumentation) {
414- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
415+ case LTTNG_KERNEL_ABI_TRACEPOINT:
416+ lttng_fallthrough;
417 case LTTNG_KERNEL_ABI_SYSCALL:
418 {
419 struct lttng_event_notifier_enabler *enabler;
420@@ -2110,8 +2137,10 @@ int lttng_abi_create_event_notifier(struct file *event_notifier_group_file,
421 break;
422 }
423
424- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
425- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
426+ case LTTNG_KERNEL_ABI_KPROBE:
427+ lttng_fallthrough;
428+ case LTTNG_KERNEL_ABI_KRETPROBE:
429+ lttng_fallthrough;
430 case LTTNG_KERNEL_ABI_UPROBE:
431 {
432 struct lttng_kernel_event_notifier *event_notifier;
433@@ -2135,8 +2164,10 @@ int lttng_abi_create_event_notifier(struct file *event_notifier_group_file,
434 break;
435 }
436
437- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
438- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
439+ case LTTNG_KERNEL_ABI_FUNCTION:
440+ lttng_fallthrough;
441+ case LTTNG_KERNEL_ABI_NOOP:
442+ lttng_fallthrough;
443 default:
444 ret = -EINVAL;
445 goto event_notifier_error;
446diff --git a/src/lttng-bytecode-interpreter.c b/src/lttng-bytecode-interpreter.c
447index b46a23b7..a2a932c6 100644
448--- a/src/lttng-bytecode-interpreter.c
449+++ b/src/lttng-bytecode-interpreter.c
450@@ -7,6 +7,7 @@
451 * Copyright (C) 2010-2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
452 */
453
454+#include <wrapper/compiler_attributes.h>
455 #include <wrapper/uaccess.h>
456 #include <wrapper/objtool.h>
457 #include <wrapper/types.h>
458@@ -421,7 +422,8 @@ static int dynamic_get_index(struct lttng_kernel_probe_ctx *lttng_probe_ctx,
459 }
460 break;
461 case LOAD_ROOT_CONTEXT:
462- case LOAD_ROOT_APP_CONTEXT: /* Fall-through */
463+ lttng_fallthrough;
464+ case LOAD_ROOT_APP_CONTEXT:
465 {
466 ret = context_get_index(lttng_probe_ctx,
467 &stack_top->u.ptr,
468diff --git a/src/lttng-bytecode-specialize.c b/src/lttng-bytecode-specialize.c
469index c4b9d04b..f8b5f19d 100644
470--- a/src/lttng-bytecode-specialize.c
471+++ b/src/lttng-bytecode-specialize.c
472@@ -8,6 +8,8 @@
473 */
474
475 #include <linux/slab.h>
476+#include <wrapper/compiler_attributes.h>
477+
478 #include <lttng/lttng-bytecode.h>
479 #include <lttng/align.h>
480 #include <lttng/events-internal.h>
481@@ -271,7 +273,8 @@ static int specialize_get_index(struct bytecode_runtime *runtime,
482 }
483 case OBJECT_TYPE_STRUCT:
484 /* Only generated by the specialize phase. */
485- case OBJECT_TYPE_VARIANT: /* Fall-through */
486+ case OBJECT_TYPE_VARIANT:
487+ lttng_fallthrough;
488 default:
489 printk(KERN_WARNING "LTTng: bytecode: Unexpected get index type %d",
490 (int) stack_top->load.object_type);
491diff --git a/src/lttng-events.c b/src/lttng-events.c
492index e785fe4d..230e3934 100644
493--- a/src/lttng-events.c
494+++ b/src/lttng-events.c
495@@ -28,6 +28,7 @@
496 #include <linux/vmalloc.h>
497 #include <linux/dmi.h>
498
499+#include <wrapper/compiler_attributes.h>
500 #include <wrapper/uuid.h>
501 #include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_mappings() */
502 #include <wrapper/random.h>
503@@ -659,12 +660,14 @@ int lttng_event_enable(struct lttng_kernel_event_common *event)
504 goto end;
505 }
506 switch (event->priv->instrumentation) {
507- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
508+ case LTTNG_KERNEL_ABI_TRACEPOINT:
509+ lttng_fallthrough;
510 case LTTNG_KERNEL_ABI_SYSCALL:
511 ret = -EINVAL;
512 break;
513
514- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
515+ case LTTNG_KERNEL_ABI_KPROBE:
516+ lttng_fallthrough;
517 case LTTNG_KERNEL_ABI_UPROBE:
518 WRITE_ONCE(event->enabled, 1);
519 break;
520@@ -673,8 +676,10 @@ int lttng_event_enable(struct lttng_kernel_event_common *event)
521 ret = lttng_kretprobes_event_enable_state(event, 1);
522 break;
523
524- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
525- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
526+ case LTTNG_KERNEL_ABI_FUNCTION:
527+ lttng_fallthrough;
528+ case LTTNG_KERNEL_ABI_NOOP:
529+ lttng_fallthrough;
530 default:
531 WARN_ON_ONCE(1);
532 ret = -EINVAL;
533@@ -719,12 +724,14 @@ int lttng_event_disable(struct lttng_kernel_event_common *event)
534 goto end;
535 }
536 switch (event->priv->instrumentation) {
537- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
538+ case LTTNG_KERNEL_ABI_TRACEPOINT:
539+ lttng_fallthrough;
540 case LTTNG_KERNEL_ABI_SYSCALL:
541 ret = -EINVAL;
542 break;
543
544- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
545+ case LTTNG_KERNEL_ABI_KPROBE:
546+ lttng_fallthrough;
547 case LTTNG_KERNEL_ABI_UPROBE:
548 WRITE_ONCE(event->enabled, 0);
549 break;
550@@ -733,8 +740,10 @@ int lttng_event_disable(struct lttng_kernel_event_common *event)
551 ret = lttng_kretprobes_event_enable_state(event, 0);
552 break;
553
554- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
555- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
556+ case LTTNG_KERNEL_ABI_FUNCTION:
557+ lttng_fallthrough;
558+ case LTTNG_KERNEL_ABI_NOOP:
559+ lttng_fallthrough;
560 default:
561 WARN_ON_ONCE(1);
562 ret = -EINVAL;
563@@ -873,15 +882,20 @@ struct lttng_kernel_event_recorder *_lttng_kernel_event_recorder_create(struct l
564 event_name = event_desc->event_name;
565 break;
566
567- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
568- case LTTNG_KERNEL_ABI_UPROBE: /* Fall-through */
569- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
570+ case LTTNG_KERNEL_ABI_KPROBE:
571+ lttng_fallthrough;
572+ case LTTNG_KERNEL_ABI_UPROBE:
573+ lttng_fallthrough;
574+ case LTTNG_KERNEL_ABI_KRETPROBE:
575+ lttng_fallthrough;
576 case LTTNG_KERNEL_ABI_SYSCALL:
577 event_name = event_param->name;
578 break;
579
580- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
581- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
582+ case LTTNG_KERNEL_ABI_FUNCTION:
583+ lttng_fallthrough;
584+ case LTTNG_KERNEL_ABI_NOOP:
585+ lttng_fallthrough;
586 default:
587 WARN_ON_ONCE(1);
588 ret = -EINVAL;
589@@ -1093,8 +1107,10 @@ struct lttng_kernel_event_recorder *_lttng_kernel_event_recorder_create(struct l
590 WARN_ON_ONCE(!ret);
591 break;
592
593- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
594- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
595+ case LTTNG_KERNEL_ABI_FUNCTION:
596+ lttng_fallthrough;
597+ case LTTNG_KERNEL_ABI_NOOP:
598+ lttng_fallthrough;
599 default:
600 WARN_ON_ONCE(1);
601 ret = -EINVAL;
602@@ -1141,15 +1157,20 @@ struct lttng_kernel_event_notifier *_lttng_event_notifier_create(
603 event_name = event_desc->event_name;
604 break;
605
606- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
607- case LTTNG_KERNEL_ABI_UPROBE: /* Fall-through */
608+ case LTTNG_KERNEL_ABI_KPROBE:
609+ lttng_fallthrough;
610+ case LTTNG_KERNEL_ABI_UPROBE:
611+ lttng_fallthrough;
612 case LTTNG_KERNEL_ABI_SYSCALL:
613 event_name = event_notifier_param->event.name;
614 break;
615
616- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
617- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
618- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
619+ case LTTNG_KERNEL_ABI_KRETPROBE:
620+ lttng_fallthrough;
621+ case LTTNG_KERNEL_ABI_FUNCTION:
622+ lttng_fallthrough;
623+ case LTTNG_KERNEL_ABI_NOOP:
624+ lttng_fallthrough;
625 default:
626 WARN_ON_ONCE(1);
627 ret = -EINVAL;
628@@ -1296,9 +1317,12 @@ struct lttng_kernel_event_notifier *_lttng_event_notifier_create(
629 WARN_ON_ONCE(!ret);
630 break;
631
632- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
633- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
634- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
635+ case LTTNG_KERNEL_ABI_KRETPROBE:
636+ lttng_fallthrough;
637+ case LTTNG_KERNEL_ABI_FUNCTION:
638+ lttng_fallthrough;
639+ case LTTNG_KERNEL_ABI_NOOP:
640+ lttng_fallthrough;
641 default:
642 WARN_ON_ONCE(1);
643 ret = -EINVAL;
644@@ -1423,14 +1447,18 @@ void register_event(struct lttng_kernel_event_recorder *event_recorder)
645 ret = lttng_syscall_filter_enable_event(event_recorder->chan, event_recorder);
646 break;
647
648- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
649- case LTTNG_KERNEL_ABI_UPROBE: /* Fall-through */
650+ case LTTNG_KERNEL_ABI_KPROBE:
651+ lttng_fallthrough;
652+ case LTTNG_KERNEL_ABI_UPROBE:
653+ lttng_fallthrough;
654 case LTTNG_KERNEL_ABI_KRETPROBE:
655 ret = 0;
656 break;
657
658- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
659- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
660+ case LTTNG_KERNEL_ABI_FUNCTION:
661+ lttng_fallthrough;
662+ case LTTNG_KERNEL_ABI_NOOP:
663+ lttng_fallthrough;
664 default:
665 WARN_ON_ONCE(1);
666 }
667@@ -1481,7 +1509,8 @@ int _lttng_event_unregister(struct lttng_kernel_event_recorder *event_recorder)
668 ret = 0;
669 break;
670
671- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
672+ case LTTNG_KERNEL_ABI_FUNCTION:
673+ lttng_fallthrough;
674 default:
675 WARN_ON_ONCE(1);
676 }
677@@ -1512,14 +1541,18 @@ void register_event_notifier(struct lttng_kernel_event_notifier *event_notifier)
678 ret = lttng_syscall_filter_enable_event_notifier(event_notifier);
679 break;
680
681- case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
682+ case LTTNG_KERNEL_ABI_KPROBE:
683+ lttng_fallthrough;
684 case LTTNG_KERNEL_ABI_UPROBE:
685 ret = 0;
686 break;
687
688- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
689- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
690- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
691+ case LTTNG_KERNEL_ABI_KRETPROBE:
692+ lttng_fallthrough;
693+ case LTTNG_KERNEL_ABI_FUNCTION:
694+ lttng_fallthrough;
695+ case LTTNG_KERNEL_ABI_NOOP:
696+ lttng_fallthrough;
697 default:
698 WARN_ON_ONCE(1);
699 }
700@@ -1559,9 +1592,12 @@ int _lttng_event_notifier_unregister(
701 ret = lttng_syscall_filter_disable_event_notifier(event_notifier);
702 break;
703
704- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
705- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
706- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
707+ case LTTNG_KERNEL_ABI_KRETPROBE:
708+ lttng_fallthrough;
709+ case LTTNG_KERNEL_ABI_FUNCTION:
710+ lttng_fallthrough;
711+ case LTTNG_KERNEL_ABI_NOOP:
712+ lttng_fallthrough;
713 default:
714 WARN_ON_ONCE(1);
715 }
716@@ -1614,8 +1650,10 @@ void _lttng_event_destroy(struct lttng_kernel_event_common *event)
717 lttng_uprobes_destroy_event_private(event_recorder);
718 break;
719
720- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
721- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
722+ case LTTNG_KERNEL_ABI_FUNCTION:
723+ lttng_fallthrough;
724+ case LTTNG_KERNEL_ABI_NOOP:
725+ lttng_fallthrough;
726 default:
727 WARN_ON_ONCE(1);
728 }
729@@ -1647,9 +1685,12 @@ void _lttng_event_destroy(struct lttng_kernel_event_common *event)
730 lttng_uprobes_destroy_event_notifier_private(event_notifier);
731 break;
732
733- case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
734- case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
735- case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
736+ case LTTNG_KERNEL_ABI_KRETPROBE:
737+ lttng_fallthrough;
738+ case LTTNG_KERNEL_ABI_FUNCTION:
739+ lttng_fallthrough;
740+ case LTTNG_KERNEL_ABI_NOOP:
741+ lttng_fallthrough;
742 default:
743 WARN_ON_ONCE(1);
744 }
745@@ -2713,7 +2754,8 @@ void lttng_session_sync_event_enablers(struct lttng_kernel_session *session)
746 int nr_filters = 0;
747
748 switch (event_recorder_priv->parent.instrumentation) {
749- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
750+ case LTTNG_KERNEL_ABI_TRACEPOINT:
751+ lttng_fallthrough;
752 case LTTNG_KERNEL_ABI_SYSCALL:
753 /* Enable events */
754 list_for_each_entry(enabler_ref,
755@@ -2807,7 +2849,8 @@ void lttng_event_notifier_group_sync_enablers(struct lttng_event_notifier_group
756 int nr_filters = 0, nr_captures = 0;
757
758 switch (event_notifier_priv->parent.instrumentation) {
759- case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
760+ case LTTNG_KERNEL_ABI_TRACEPOINT:
761+ lttng_fallthrough;
762 case LTTNG_KERNEL_ABI_SYSCALL:
763 /* Enable event_notifiers */
764 list_for_each_entry(enabler_ref,
765@@ -3877,7 +3920,7 @@ int print_escaped_ctf_string(struct lttng_kernel_session *session, const char *s
766 if (ret)
767 goto error;
768 /* We still print the current char */
769- /* Fallthrough */
770+ lttng_fallthrough;
771 default:
772 ret = lttng_metadata_printf(session, "%c", cur);
773 break;
774diff --git a/src/lttng-string-utils.c b/src/lttng-string-utils.c
775index d9447903..65946193 100644
776--- a/src/lttng-string-utils.c
777+++ b/src/lttng-string-utils.c
778@@ -4,6 +4,7 @@
779 */
780
781 #include <linux/types.h>
782+#include <wrapper/compiler_attributes.h>
783
784 #include <lttng/string-utils.h>
785
786@@ -302,7 +303,7 @@ retry:
787 p = pattern_get_char_at_cb(p_at,
788 pattern_get_char_at_cb_data);
789
790- /* Fall-through. */
791+ lttng_fallthrough;
792 default:
793 /*
794 * Default case which will compare the escaped
795diff --git a/src/probes/lttng-kretprobes.c b/src/probes/lttng-kretprobes.c
796index 0fa6a1bf..1d0a5ecb 100644
797--- a/src/probes/lttng-kretprobes.c
798+++ b/src/probes/lttng-kretprobes.c
799@@ -14,6 +14,7 @@
800 #include <lttng/events.h>
801 #include <lttng/events-internal.h>
802 #include <ringbuffer/frontend_types.h>
803+#include <wrapper/compiler_attributes.h>
804 #include <wrapper/vmalloc.h>
805 #include <wrapper/irqflags.h>
806 #include <lttng/tracer.h>
807@@ -61,7 +62,8 @@ int _lttng_kretprobes_handler(struct kretprobe_instance *krpi,
808 return 0;
809 break;
810 }
811- case LTTNG_KERNEL_EVENT_TYPE_NOTIFIER: /* Fall-through. */
812+ case LTTNG_KERNEL_EVENT_TYPE_NOTIFIER:
813+ lttng_fallthrough;
814 default:
815 WARN_ON_ONCE(1);
816 }
817@@ -90,7 +92,8 @@ int _lttng_kretprobes_handler(struct kretprobe_instance *krpi,
818 chan->ops->event_commit(&ctx);
819 break;
820 }
821- case LTTNG_KERNEL_EVENT_TYPE_NOTIFIER: /* Fall-through. */
822+ case LTTNG_KERNEL_EVENT_TYPE_NOTIFIER:
823+ lttng_fallthrough;
824 default:
825 WARN_ON_ONCE(1);
826 }
827--
8282.19.1
829
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.13.0.bb b/meta/recipes-kernel/lttng/lttng-modules_2.13.1.bb
index 6dfde8d..b05cad6 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.13.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.13.1.bb
@@ -10,13 +10,11 @@ inherit module
10include lttng-platforms.inc 10include lttng-platforms.inc
11 11
12SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ 12SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
13 file://0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch \
14 file://0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch \
15 " 13 "
16# Use :append here so that the patch is applied also when using devupstream 14# Use :append here so that the patch is applied also when using devupstream
17SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch" 15SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch"
18 16
19SRC_URI[sha256sum] = "5ebf2b3cd128b3a1c8afaea1e98d5a6f7f0676fd524fcf72361c34d9dc603356" 17SRC_URI[sha256sum] = "a7c86d91c9bbe66d27f025aa04b8cfc6d7785ed2fc7ef774930800ee44d7f343"
20 18
21export INSTALL_MOD_DIR="kernel/lttng-modules" 19export INSTALL_MOD_DIR="kernel/lttng-modules"
22 20
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-Tests-race-condition-in-test_event_tracker.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-Tests-race-condition-in-test_event_tracker.patch
deleted file mode 100644
index 10020e1..0000000
--- a/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-Tests-race-condition-in-test_event_tracker.patch
+++ /dev/null
@@ -1,221 +0,0 @@
1From d3392e4850532c02e53e3c3ff1cc27df7e51c941 Mon Sep 17 00:00:00 2001
2From: Francis Deslauriers <francis.deslauriers@efficios.com>
3Date: Tue, 7 Sep 2021 17:10:31 -0400
4Subject: [PATCH 1/2] Fix: Tests: race condition in test_event_tracker
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Background
10==========
11The `test_event_tracker` file contains test cases when the event
12generating app in executed in two distinct steps. Those two steps are
13preparation and execution.
14 1. the preparation is the launching the app in the background, and
15 2. the execution is actually generating the event that should or
16 should not be traced depending on the test case.
17
18This is useful to test the tracker feature since we want to ensure that
19already running apps are notified properly when changing their tracking
20status.
21
22Issue
23=====
24The `test_event_vpid_track_untrack` test case suffers from a race
25condition that is easy to reproduce on Yocto.
26
27The issue is that sometimes events are end up the trace when none is
28expected.
29
30This is due to the absence of synchronization point at the launch of the
31app which leads to the app being scheduled in-between the track-untrack
32calls leading to events being recorded to the trace.
33
34It's easy to reproduce this issue on my machine by adding a `sleep 5`
35between the track and untrack calls and setting the `NR_USEC_WAIT`
36variable to 1.
37
38Fix
39===
40Using the testapp `--sync-before-last-event-touch` flag to make the app
41create a file when all but the last event are executed. We then have the
42app wait until we create a file (`--sync-before-last-event`) to generate
43that last event. This way, we are sure no event will be generated when
44running the track and untrack commands.
45
46Notes
47=====
48- This issue affects other test cases in this file.
49- This commit fixes a typo in the test header.
50- This commit adds `diag` calls to help tracking to what test the output
51 relates to when reading the log.
52
53Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
54Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
55Change-Id: Ia2b68128dc9a805526f9748f31ec2c2d95566f31
56Upstream-Status: Backport
57Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
58---
59 .../tools/tracker/test_event_tracker | 56 ++++++++++++++-----
60 1 file changed, 42 insertions(+), 14 deletions(-)
61
62diff --git a/tests/regression/tools/tracker/test_event_tracker b/tests/regression/tools/tracker/test_event_tracker
63index feb3787..cc0f698 100755
64--- a/tests/regression/tools/tracker/test_event_tracker
65+++ b/tests/regression/tools/tracker/test_event_tracker
66@@ -5,7 +5,7 @@
67 #
68 # SPDX-License-Identifier: GPL-2.0-only
69
70-TEST_DESC="LTTng - Event traker test"
71+TEST_DESC="LTTng - Event tracker test"
72
73 CURDIR=$(dirname "$0")/
74 TESTDIR="$CURDIR/../../.."
75@@ -15,7 +15,7 @@ TESTAPP_KERNEL_NAME="gen-kernel-test-events"
76 TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
77 TESTAPP_KERNEL_BIN="$TESTAPP_PATH/$TESTAPP_KERNEL_NAME/$TESTAPP_KERNEL_NAME"
78 SESSION_NAME="tracker"
79-NR_ITER=100
80+NR_ITER=1
81 NUM_GLOBAL_TESTS=2
82 NUM_UST_TESTS=283
83 NUM_KERNEL_TESTS=462
84@@ -30,27 +30,41 @@ SCRIPT_GROUPNAME="$(id -gn)"
85
86 CHILD_PID=-1
87 WAIT_PATH=
88-AFTER_FIRST_PATH=
89-BEFORE_LAST_PATH=
90+TOUCH_BEFORE_LAST_PATH=
91+SYNC_BEFORE_LAST_PATH=
92
93 source $TESTDIR/utils/utils.sh
94
95+# Launch the testapp and execute it up until right before the last event. It is
96+# useful to do it in two seperate steps in order to test tracking and
97+# untracking on an active app.
98 function prepare_ust_app
99 {
100- AFTER_FIRST_PATH=$(mktemp --tmpdir -u tmp.${FUNCNAME[0]}_sync_after_first.XXXXXX)
101- BEFORE_LAST_PATH=$(mktemp --tmpdir -u tmp.${FUNCNAME[0]}_sync_before_last.XXXXXX)
102+ TOUCH_BEFORE_LAST_PATH=$(mktemp --tmpdir -u tmp.${FUNCNAME[0]}_touch_before_last.XXXXXX)
103+ SYNC_BEFORE_LAST_PATH=$(mktemp --tmpdir -u tmp.${FUNCNAME[0]}_sync_before_last.XXXXXX)
104+
105+ $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT \
106+ --sync-before-last-event-touch "$TOUCH_BEFORE_LAST_PATH" \
107+ --sync-before-last-event "$SYNC_BEFORE_LAST_PATH" &
108
109- $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT -a "$AFTER_FIRST_PATH" -b "$BEFORE_LAST_PATH" &
110 CHILD_PID=$!
111+
112+ # Wait for the app to execute all the way to right before the last
113+ # event.
114+ while [ ! -f "${TOUCH_BEFORE_LAST_PATH}" ]; do
115+ sleep 0.5
116+ done
117 }
118
119+# Generate the last event.
120 function trace_ust_app
121 {
122- touch "$BEFORE_LAST_PATH"
123- wait
124+ # Ask the test app to generate the last event.
125+ touch "$SYNC_BEFORE_LAST_PATH"
126+ wait "$CHILD_PID"
127 ok $? "Traced application stopped."
128- rm "$BEFORE_LAST_PATH"
129- rm "$AFTER_FIRST_PATH"
130+ rm "$SYNC_BEFORE_LAST_PATH"
131+ rm "$TOUCH_BEFORE_LAST_PATH"
132 }
133
134 function prepare_kernel_app
135@@ -64,7 +78,7 @@ function prepare_kernel_app
136 function trace_kernel_app
137 {
138 touch "$WAIT_PATH"
139- wait
140+ wait "$CHILD_PID"
141 ok $? "Traced application stopped."
142 rm "$WAIT_PATH"
143 }
144@@ -78,6 +92,8 @@ function test_event_tracker()
145 local tracker="$4"
146 local channel=''
147
148+ diag "${FUNCNAME[0]} $*"
149+
150 trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX)
151
152 create_lttng_session_ok $SESSION_NAME "$trace_path"
153@@ -117,6 +133,8 @@ function test_event_vpid_tracker()
154 local wildcard="$3"
155 local channel=''
156
157+ diag "${FUNCNAME[0]} $*"
158+
159 trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX)
160
161 create_lttng_session_ok $SESSION_NAME "$trace_path"
162@@ -160,6 +178,8 @@ function test_event_pid_tracker()
163 local wildcard="$3"
164 local channel=''
165
166+ diag "${FUNCNAME[0]} $*"
167+
168 trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX)
169
170 create_lttng_session_ok $SESSION_NAME "$trace_path"
171@@ -203,6 +223,8 @@ function test_event_tracker_fail()
172 local wildcard="$2"
173 local tracker="$3"
174
175+ diag "${FUNCNAME[0]} $*"
176+
177 trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX)
178
179 create_lttng_session_ok $SESSION_NAME "$trace_path"
180@@ -222,6 +244,8 @@ function test_event_track_untrack()
181 local tracker="$4"
182 local channel=''
183
184+ diag "${FUNCNAME[0]} $*"
185+
186 trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX)
187
188 create_lttng_session_ok $SESSION_NAME "$trace_path"
189@@ -262,6 +286,8 @@ function test_event_vpid_track_untrack()
190 local wildcard="$3"
191 local channel=''
192
193+ diag "${FUNCNAME[0]} $*"
194+
195 trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX)
196
197 create_lttng_session_ok $SESSION_NAME "$trace_path"
198@@ -302,6 +328,8 @@ function test_event_pid_track_untrack()
199 local wildcard="$3"
200 local channel=''
201
202+ diag "${FUNCNAME[0]} $*"
203+
204 trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX)
205
206 create_lttng_session_ok $SESSION_NAME "$trace_path"
207@@ -336,9 +364,9 @@ function test_event_pid_track_untrack()
208
209 function test_event_ust_vpid_untrack_snapshot()
210 {
211- local trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX)
212+ diag "${FUNCNAME[0]} $*"
213
214- diag "Test_event_ust_vpid_untrack_snapshot"
215+ local trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX)
216
217 create_lttng_session_ok $SESSION_NAME "$trace_path" "--snapshot"
218
219--
2202.20.1
221
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch
deleted file mode 100644
index 925b51c..0000000
--- a/meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1From 790ef313364d1f1efb6f283705bb324eea2979ba Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Sun, 5 Sep 2021 10:13:08 +0200
4Subject: [PATCH] src/common: correct header location
5
6sys/unistd.h is not guaranteed to exist, and does not with
7e.g. musl C library.
8
9Upstream-Status: Pending
10Signed-off-by: Alexander Kanavin <alex@linutronix.de>
11---
12 src/common/kernel-probe.c | 2 +-
13 src/common/userspace-probe.c | 2 +-
14 2 files changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/src/common/kernel-probe.c b/src/common/kernel-probe.c
17index 2beb53f..44100bc 100644
18--- a/src/common/kernel-probe.c
19+++ b/src/common/kernel-probe.c
20@@ -20,7 +20,7 @@
21 #include <lttng/kernel-probe.h>
22 #include <sys/stat.h>
23 #include <sys/types.h>
24-#include <sys/unistd.h>
25+#include <unistd.h>
26
27 static
28 int lttng_kernel_probe_location_address_serialize(
29diff --git a/src/common/userspace-probe.c b/src/common/userspace-probe.c
30index 67b0ee6..66afc6f 100644
31--- a/src/common/userspace-probe.c
32+++ b/src/common/userspace-probe.c
33@@ -20,7 +20,7 @@
34 #include <lttng/userspace-probe-internal.h>
35 #include <sys/stat.h>
36 #include <sys/types.h>
37-#include <sys/unistd.h>
38+#include <unistd.h>
39
40 static
41 int lttng_userspace_probe_location_function_set_binary_fd_handle(
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch b/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch
deleted file mode 100644
index a8d9831..0000000
--- a/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From d284752e616dfc4c9288be3bb21c04ea78cdd967 Mon Sep 17 00:00:00 2001
2From: Francis Deslauriers <francis.deslauriers@efficios.com>
3Date: Wed, 8 Sep 2021 10:16:23 -0400
4Subject: [PATCH 2/2] Fix: Tests: race condition in test_ns_contexts_change
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Issue
10=====
11The test script doesn't wait for the test application to complete before
12stopping the tracing session. The race is that depending on the
13scheduling the application is not always done generating events when the
14session is stopped.
15
16Fix
17===
18Make the test script wait for the termination of the test app before
19stopping the session.
20
21Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
22Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
23Change-Id: I29d9b41d2a2ed60a6c42020509c2067442ae332c
24Upstream-Status: Backport
25Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
26---
27 tests/regression/ust/namespaces/test_ns_contexts_change | 3 +++
28 1 file changed, 3 insertions(+)
29
30diff --git a/tests/regression/ust/namespaces/test_ns_contexts_change b/tests/regression/ust/namespaces/test_ns_contexts_change
31index c0af15e..8a4b62c 100755
32--- a/tests/regression/ust/namespaces/test_ns_contexts_change
33+++ b/tests/regression/ust/namespaces/test_ns_contexts_change
34@@ -79,6 +79,9 @@ function test_ns()
35
36 touch "$file_sync_before_last"
37
38+ # Wait for the test app to generate all expected events and exit.
39+ wait $app_pid
40+
41 # stop and destroy
42 stop_lttng_tracing_ok "$session_name"
43 destroy_lttng_session_ok "$session_name"
44--
452.20.1
46
diff --git a/meta/recipes-kernel/lttng/lttng-tools/disable-tests.patch b/meta/recipes-kernel/lttng/lttng-tools/disable-tests.patch
new file mode 100644
index 0000000..3a77ea2
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/disable-tests.patch
@@ -0,0 +1,34 @@
1Upstream-Status: Inappropriate [need to root cause the test hangs]
2
3We keep seeing hangs in the tools/notifications tests on x86 and arm for
4a variety of distros. Exclude them for now to work out if this is the
5only place we see them and give SWAT/triage a break from the stream
6of them.
7
8https://bugzilla.yoctoproject.org/show_bug.cgi?id=14263
9
10Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
11
12Index: lttng-tools-2.13.1/tests/regression/Makefile.am
13===================================================================
14--- lttng-tools-2.13.1.orig/tests/regression/Makefile.am
15+++ lttng-tools-2.13.1/tests/regression/Makefile.am
16@@ -29,18 +29,6 @@ TESTS = tools/base-path/test_ust \
17 tools/crash/test_crash \
18 tools/regen-metadata/test_ust \
19 tools/regen-statedump/test_ust \
20- tools/notification/test_notification_ust_error \
21- tools/notification/test_notification_ust_buffer_usage \
22- tools/notification/test_notification_ust_capture \
23- tools/notification/test_notification_ust_event_rule_condition_exclusion \
24- tools/notification/test_notification_kernel_error \
25- tools/notification/test_notification_kernel_buffer_usage \
26- tools/notification/test_notification_kernel_capture \
27- tools/notification/test_notification_kernel_instrumentation \
28- tools/notification/test_notification_kernel_syscall \
29- tools/notification/test_notification_notifier_discarded_count \
30- tools/notification/test_notification_kernel_userspace_probe \
31- tools/notification/test_notification_multi_app \
32 tools/rotation/test_ust \
33 tools/rotation/test_kernel \
34 tools/rotation/test_save_load_mi \
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.13.0.bb b/meta/recipes-kernel/lttng/lttng-tools_2.13.2.bb
index 1491aff..d6ce2c7 100644
--- a/meta/recipes-kernel/lttng/lttng-tools_2.13.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.13.2.bb
@@ -36,12 +36,10 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
36 file://run-ptest \ 36 file://run-ptest \
37 file://lttng-sessiond.service \ 37 file://lttng-sessiond.service \
38 file://determinism.patch \ 38 file://determinism.patch \
39 file://0001-src-common-correct-header-location.patch \ 39 file://disable-tests.patch \
40 file://0001-Fix-Tests-race-condition-in-test_event_tracker.patch \
41 file://0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch \
42 " 40 "
43 41
44SRC_URI[sha256sum] = "8dc894f9a7a840e943c1c344345c75f001a9529daa9157f1a0e6175c081c29e6" 42SRC_URI[sha256sum] = "ced2ba00020da77fd17ac92b5a53825502409a07e3aeca28f9515d4a844fd7bd"
45 43
46inherit autotools ptest pkgconfig useradd python3-dir manpages systemd 44inherit autotools ptest pkgconfig useradd python3-dir manpages systemd
47 45
diff --git a/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch b/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch
index 2d61dfa..d3c451f 100644
--- a/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch
+++ b/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] lttng-ust-common: link with liburcu explicitly
5 5
6Otherwise linking errors are seen on x86-32. 6Otherwise linking errors are seen on x86-32.
7 7
8Upstream-Status: Pending 8Upstream-Status: Submitted [by email to lttng-dev, Francis, Jonathan]
9Signed-off-by: Alexander Kanavin <alex@linutronix.de> 9Signed-off-by: Alexander Kanavin <alex@linutronix.de>
10--- 10---
11 src/lib/lttng-ust-common/Makefile.am | 1 + 11 src/lib/lttng-ust-common/Makefile.am | 1 +
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.13.0.bb b/meta/recipes-kernel/lttng/lttng-ust_2.13.1.bb
index 7c6a074..82e544a 100644
--- a/meta/recipes-kernel/lttng/lttng-ust_2.13.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-ust_2.13.1.bb
@@ -34,7 +34,7 @@ SRC_URI = "https://lttng.org/files/lttng-ust/lttng-ust-${PV}.tar.bz2 \
34 file://0001-Makefile.am-update-rpath-link.patch \ 34 file://0001-Makefile.am-update-rpath-link.patch \
35 " 35 "
36 36
37SRC_URI[sha256sum] = "54e4c933679cf6a07971dc5861ce57fc4876ab740ab612407b30b5fc85371750" 37SRC_URI[sha256sum] = "5667bf0269e1e62e2d9cb974c456ff86e0401bd7aa3bfc8d5fdb97233249eddc"
38 38
39CVE_PRODUCT = "ust" 39CVE_PRODUCT = "ust"
40 40
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index f473272..ec0c6ef 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -31,7 +31,6 @@ PACKAGECONFIG[coresight] = "CORESIGHT=1,,opencsd"
31 31
32# libunwind is not yet ported for some architectures 32# libunwind is not yet ported for some architectures
33PACKAGECONFIG:remove:arc = "libunwind" 33PACKAGECONFIG:remove:arc = "libunwind"
34PACKAGECONFIG:remove:riscv64 = "libunwind"
35PACKAGECONFIG:remove:riscv32 = "libunwind" 34PACKAGECONFIG:remove:riscv32 = "libunwind"
36 35
37DEPENDS = " \ 36DEPENDS = " \
@@ -126,9 +125,11 @@ PERF_SRC ?= "Makefile \
126 125
127PERF_EXTRA_LDFLAGS = "" 126PERF_EXTRA_LDFLAGS = ""
128 127
129# MIPS N32 128# MIPS N32/N64
130PERF_EXTRA_LDFLAGS:mipsarchn32eb = "-m elf32btsmipn32" 129PERF_EXTRA_LDFLAGS:mipsarchn32eb = "-m elf32btsmipn32"
131PERF_EXTRA_LDFLAGS:mipsarchn32el = "-m elf32ltsmipn32" 130PERF_EXTRA_LDFLAGS:mipsarchn32el = "-m elf32ltsmipn32"
131PERF_EXTRA_LDFLAGS:mipsarchn64eb = "-m elf64btsmip"
132PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip"
132 133
133do_compile() { 134do_compile() {
134 # Linux kernel build system is expected to do the right thing 135 # Linux kernel build system is expected to do the right thing
diff --git a/meta/recipes-kernel/perf/perf/sort-pmuevents.py b/meta/recipes-kernel/perf/perf/sort-pmuevents.py
index 5ddf0f1..09ba332 100755
--- a/meta/recipes-kernel/perf/perf/sort-pmuevents.py
+++ b/meta/recipes-kernel/perf/perf/sort-pmuevents.py
@@ -33,10 +33,10 @@ if os.path.exists(outfile):
33with open(infile, 'r') as file: 33with open(infile, 'r') as file:
34 data = file.read() 34 data = file.read()
35 35
36preamble_regex = re.compile( '^(.*?)^struct', re.MULTILINE | re.DOTALL ) 36preamble_regex = re.compile( '^(.*?)^(struct|const struct|static struct|static const struct)', re.MULTILINE | re.DOTALL )
37 37
38preamble = re.search( preamble_regex, data ) 38preamble = re.search( preamble_regex, data )
39struct_block_regex = re.compile( '^struct.*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL ) 39struct_block_regex = re.compile( '^(struct|const struct|static struct|static const struct).*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL )
40field_regex = re.compile( '{.*?},', re.MULTILINE | re.DOTALL ) 40field_regex = re.compile( '{.*?},', re.MULTILINE | re.DOTALL )
41cpuid_regex = re.compile( '\.cpuid = (.*?),', re.MULTILINE | re.DOTALL ) 41cpuid_regex = re.compile( '\.cpuid = (.*?),', re.MULTILINE | re.DOTALL )
42name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL ) 42name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL )
@@ -45,22 +45,25 @@ name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL )
45# types and then their fields. 45# types and then their fields.
46entry_dict = {} 46entry_dict = {}
47for struct in re.findall( struct_block_regex, data ): 47for struct in re.findall( struct_block_regex, data ):
48 # print( "struct: %s %s" % (struct[0],struct[1]) ) 48 # print( "struct: %s %s %s" % (struct[0],struct[1],struct[2]) )
49 entry_dict[struct[1]] = {} 49 entry_dict[struct[2]] = {}
50 entry_dict[struct[1]]['type'] = struct[0] 50 entry_dict[struct[2]]['type_prefix'] = struct[0]
51 entry_dict[struct[1]]['fields'] = {} 51 entry_dict[struct[2]]['type'] = struct[1]
52 for entry in re.findall( field_regex, struct[2] ): 52 entry_dict[struct[2]]['fields'] = {}
53 for entry in re.findall( field_regex, struct[3] ):
53 #print( " entry: %s" % entry ) 54 #print( " entry: %s" % entry )
54 cpuid = re.search( cpuid_regex, entry ) 55 cpuid = re.search( cpuid_regex, entry )
55 if cpuid: 56 if cpuid:
56 #print( " cpuid found: %s" % cpuid.group(1) ) 57 #print( " cpuid found: %s" % cpuid.group(1) )
57 entry_dict[struct[1]]['fields'][cpuid.group(1)] = entry 58 entry_dict[struct[2]]['fields'][cpuid.group(1)] = entry
58 59
59 name = re.search( name_regex, entry ) 60 name = re.search( name_regex, entry )
60 if name: 61 if name:
61 #print( " name found: %s" % name.group(1) ) 62 #print( " name found: %s" % name.group(1) )
62 entry_dict[struct[1]]['fields'][name.group(1)] = entry 63 entry_dict[struct[2]]['fields'][name.group(1)] = entry
63 64
65 if not entry_dict[struct[2]]['fields']:
66 entry_dict[struct[2]]['fields']['0'] = entry
64 67
65# created ordered dictionaries from the captured values. These are ordered by 68# created ordered dictionaries from the captured values. These are ordered by
66# a sorted() iteration of the keys. We don't care about the order we read 69# a sorted() iteration of the keys. We don't care about the order we read
@@ -72,6 +75,7 @@ for struct in re.findall( struct_block_regex, data ):
72entry_dict_sorted = OrderedDict() 75entry_dict_sorted = OrderedDict()
73for i in sorted(entry_dict.keys()): 76for i in sorted(entry_dict.keys()):
74 entry_dict_sorted[i] = {} 77 entry_dict_sorted[i] = {}
78 entry_dict_sorted[i]['type_prefix'] = entry_dict[i]['type_prefix']
75 entry_dict_sorted[i]['type'] = entry_dict[i]['type'] 79 entry_dict_sorted[i]['type'] = entry_dict[i]['type']
76 entry_dict_sorted[i]['fields'] = {} 80 entry_dict_sorted[i]['fields'] = {}
77 for f in sorted(entry_dict[i]['fields'].keys()): 81 for f in sorted(entry_dict[i]['fields'].keys()):
@@ -83,7 +87,7 @@ outf = open( outfile, 'w' )
83print( preamble.group(1) ) 87print( preamble.group(1) )
84outf.write( preamble.group(1) ) 88outf.write( preamble.group(1) )
85for d in entry_dict_sorted: 89for d in entry_dict_sorted:
86 outf.write( "struct %s %s[] = {\n" % (entry_dict_sorted[d]['type'],d) ) 90 outf.write( "%s %s %s[] = {\n" % (entry_dict_sorted[d]['type_prefix'], entry_dict_sorted[d]['type'],d) )
87 for f in entry_dict_sorted[d]['fields']: 91 for f in entry_dict_sorted[d]['fields']:
88 outf.write( entry_dict_sorted[d]['fields'][f] + '\n' ) 92 outf.write( entry_dict_sorted[d]['fields'][f] + '\n' )
89 93
diff --git a/meta/recipes-kernel/powertop/powertop/0001-src-fix-compatibility-with-ncurses-6.3.patch b/meta/recipes-kernel/powertop/powertop/0001-src-fix-compatibility-with-ncurses-6.3.patch
new file mode 100644
index 0000000..84b05ac
--- /dev/null
+++ b/meta/recipes-kernel/powertop/powertop/0001-src-fix-compatibility-with-ncurses-6.3.patch
@@ -0,0 +1,52 @@
1From 76d3f0851520bc8488e432f423941f1e72cc7405 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Mon, 25 Oct 2021 17:47:23 +0200
4Subject: [PATCH] src: fix compatibility with ncurses 6.3
5
6Upstream-Status: Submitted [https://github.com/fenrus75/powertop/pull/92]
7Signed-off-by: Alexander Kanavin <alex@linutronix.de>
8---
9 src/devices/devfreq.cpp | 2 +-
10 src/display.cpp | 2 +-
11 src/lib.cpp | 2 +-
12 3 files changed, 3 insertions(+), 3 deletions(-)
13
14diff --git a/src/devices/devfreq.cpp b/src/devices/devfreq.cpp
15index 0509d0f..b194ac4 100644
16--- a/src/devices/devfreq.cpp
17+++ b/src/devices/devfreq.cpp
18@@ -297,7 +297,7 @@ void display_devfreq_devices(void)
19 df->fill_freq_utilization(j, buf);
20 strcat(fline, buf);
21 strcat(fline, "\n");
22- wprintw(win, fline);
23+ wprintw(win, "%s", fline);
24 }
25 wprintw(win, "\n");
26 }
27diff --git a/src/display.cpp b/src/display.cpp
28index 7131144..cc03919 100644
29--- a/src/display.cpp
30+++ b/src/display.cpp
31@@ -125,7 +125,7 @@ void show_tab(unsigned int tab)
32
33 c = bottom_lines[tab_names[tab]].c_str();
34 if (c && strlen(c) > 0)
35- mvwprintw(bottom_line, 0,0, c);
36+ mvwprintw(bottom_line, 0,0, "%s", c);
37 else
38 mvwprintw(bottom_line, 0, 0,
39 "<ESC> %s | <TAB> / <Shift + TAB> %s | ", _("Exit"),
40diff --git a/src/lib.cpp b/src/lib.cpp
41index 5e48f37..5cd1c4a 100644
42--- a/src/lib.cpp
43+++ b/src/lib.cpp
44@@ -583,7 +583,7 @@ void ui_notify_user_ncurses(const char *frmt, ...)
45 * buffer */
46 vsnprintf(notify, UI_NOTIFY_BUFF_SZ - 1, frmt, list);
47 va_end(list);
48- mvprintw(1, 0, notify);
49+ mvprintw(1, 0, "%s", notify);
50 attroff(COLOR_PAIR(1));
51 }
52
diff --git a/meta/recipes-kernel/powertop/powertop_2.14.bb b/meta/recipes-kernel/powertop/powertop_2.14.bb
index c176cba..b46e5e8 100644
--- a/meta/recipes-kernel/powertop/powertop_2.14.bb
+++ b/meta/recipes-kernel/powertop/powertop_2.14.bb
@@ -6,9 +6,10 @@ DEPENDS = "ncurses libnl pciutils autoconf-archive"
6LICENSE = "GPLv2" 6LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" 7LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
8 8
9SRC_URI = "git://github.com/fenrus75/powertop;protocol=https \ 9SRC_URI = "git://github.com/fenrus75/powertop;protocol=https;branch=master \
10 file://0001-wakeup_xxx.h-include-limits.h.patch \ 10 file://0001-wakeup_xxx.h-include-limits.h.patch \
11" 11 file://0001-src-fix-compatibility-with-ncurses-6.3.patch \
12 "
12SRCREV = "52f022f9bbe6e060fba11701d657a8d9762702ba" 13SRCREV = "52f022f9bbe6e060fba11701d657a8d9762702ba"
13 14
14S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-PR28778-gcc-warning-tweak-for-sprintf-precision-para.patch b/meta/recipes-kernel/systemtap/systemtap/0001-PR28778-gcc-warning-tweak-for-sprintf-precision-para.patch
new file mode 100644
index 0000000..0801cb5
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-PR28778-gcc-warning-tweak-for-sprintf-precision-para.patch
@@ -0,0 +1,45 @@
1Upstream-Status: Backport
2Signed-off-by: Ross Burton <ross.burton@arm.com>
3
4From b0422e9e5a539164af75cddcaeb01bceca56bf12 Mon Sep 17 00:00:00 2001
5From: "Frank Ch. Eigler" <fche@redhat.com>
6Date: Thu, 13 Jan 2022 18:33:15 -0500
7Subject: [PATCH] PR28778: gcc warning tweak for sprintf precision parameter
8
9A precision=-1 sentinel value got interpreted as UINT_MAX in a
10context, leading to diagnostics like:
11
12/usr/share/systemtap/runtime/vsprintf.c:341:23: error: 'strnlen' specified bound 4294967295 may exceed maximum object size 2147483647 [-Werror=stringop-overread]
13
14Adding a clamp_t() around the parameter field to keep it limited to
15STP_BUFFER_SIZE (8K by default), which is apprx. the limit for a
16single printf.
17---
18 runtime/vsprintf.c | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c
22index cd31a938b..606f685e8 100644
23--- a/runtime/vsprintf.c
24+++ b/runtime/vsprintf.c
25@@ -338,7 +338,7 @@ _stp_vsprint_memory(char * str, char * end, const char * ptr,
26 if (format == 's') {
27 if ((unsigned long)ptr < PAGE_SIZE)
28 ptr = "<NULL>";
29- len = strnlen(ptr, precision);
30+ len = strnlen(ptr, clamp_t(size_t, precision, 0, STP_BUFFER_SIZE));
31 }
32 else if (precision > 0)
33 len = precision;
34@@ -410,7 +410,7 @@ _stp_vsprint_memory_size(const char * ptr, int width, int precision,
35 if (format == 's') {
36 if ((unsigned long)ptr < PAGE_SIZE)
37 ptr = "<NULL>";
38- len = strnlen(ptr, precision);
39+ len = strnlen(ptr, clamp_t(size_t, precision, 0, STP_BUFFER_SIZE));
40 }
41 else if (precision > 0)
42 len = precision;
43--
442.25.1
45
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-staprun-address-ncurses-6.3-failures.patch b/meta/recipes-kernel/systemtap/systemtap/0001-staprun-address-ncurses-6.3-failures.patch
new file mode 100644
index 0000000..1decf21
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-staprun-address-ncurses-6.3-failures.patch
@@ -0,0 +1,61 @@
1From 191f528da19193d713d94ee252e2485efd9af4d3 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Mon, 25 Oct 2021 17:59:24 +0200
4Subject: [PATCH] staprun: address ncurses 6.3 failures
5
6Upstream-Status: Submitted [by email to smakarov@redhat.com,systemtap@sourceware.org]
7Signed-off-by: Alexander Kanavin <alex@linutronix.de>
8---
9 staprun/monitor.c | 24 ++++++++++++------------
10 1 file changed, 12 insertions(+), 12 deletions(-)
11
12diff --git a/staprun/monitor.c b/staprun/monitor.c
13index 478634c09..f4fbfd686 100644
14--- a/staprun/monitor.c
15+++ b/staprun/monitor.c
16@@ -448,12 +448,12 @@ void monitor_render(void)
17 if (active_window == 0)
18 wattron(status, A_BOLD);
19 wprintw(status, "\n%*s\t%*s\t%*s\t%*s\t%*s\t%*s\t%s\n",
20- width[p_index], HIGHLIGHT("index", p_index, comp_fn_index),
21- width[p_state], HIGHLIGHT("state", p_state, comp_fn_index),
22- width[p_hits], HIGHLIGHT("hits", p_hits, comp_fn_index),
23- width[p_min], HIGHLIGHT("min", p_min, comp_fn_index),
24- width[p_avg], HIGHLIGHT("avg", p_avg, comp_fn_index),
25- width[p_max], HIGHLIGHT("max", p_max, comp_fn_index),
26+ (int)width[p_index], HIGHLIGHT("index", p_index, comp_fn_index),
27+ (int)width[p_state], HIGHLIGHT("state", p_state, comp_fn_index),
28+ (int)width[p_hits], HIGHLIGHT("hits", p_hits, comp_fn_index),
29+ (int)width[p_min], HIGHLIGHT("min", p_min, comp_fn_index),
30+ (int)width[p_avg], HIGHLIGHT("avg", p_avg, comp_fn_index),
31+ (int)width[p_max], HIGHLIGHT("max", p_max, comp_fn_index),
32 HIGHLIGHT("name", p_name, comp_fn_index));
33 if (active_window == 0)
34 wattroff(status, A_BOLD);
35@@ -466,17 +466,17 @@ void monitor_render(void)
36 json_object *probe, *field;
37 probe = json_object_array_get_idx(jso_probe_list, i);
38 json_object_object_get_ex(probe, "index", &field);
39- wprintw(status, "%*s\t", width[p_index], json_object_get_string(field));
40+ wprintw(status, "%*s\t", (int)width[p_index], json_object_get_string(field));
41 json_object_object_get_ex(probe, "state", &field);
42- wprintw(status, "%*s\t", width[p_state], json_object_get_string(field));
43+ wprintw(status, "%*s\t", (int)width[p_state], json_object_get_string(field));
44 json_object_object_get_ex(probe, "hits", &field);
45- wprintw(status, "%*s\t", width[p_hits], json_object_get_string(field));
46+ wprintw(status, "%*s\t", (int)width[p_hits], json_object_get_string(field));
47 json_object_object_get_ex(probe, "min", &field);
48- wprintw(status, "%*s\t", width[p_min], json_object_get_string(field));
49+ wprintw(status, "%*s\t", (int)width[p_min], json_object_get_string(field));
50 json_object_object_get_ex(probe, "avg", &field);
51- wprintw(status, "%*s\t", width[p_avg], json_object_get_string(field));
52+ wprintw(status, "%*s\t", (int)width[p_avg], json_object_get_string(field));
53 json_object_object_get_ex(probe, "max", &field);
54- wprintw(status, "%*s\t", width[p_max], json_object_get_string(field));
55+ wprintw(status, "%*s\t", (int)width[p_max], json_object_get_string(field));
56 getyx(status, discard, cur_x);
57 json_object_object_get_ex(probe, "name", &field);
58 wprintw(status, "%.*s", max_cols-cur_x-1, json_object_get_string(field));
59--
602.20.1
61
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
index 8f0de5f..04f7e03 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -6,7 +6,9 @@ HOMEPAGE = "https://sourceware.org/systemtap/"
6 6
7require systemtap_git.inc 7require systemtap_git.inc
8 8
9SRC_URI += "file://0001-improve-reproducibility-for-c-compiling.patch" 9SRC_URI += "file://0001-improve-reproducibility-for-c-compiling.patch \
10 file://0001-staprun-address-ncurses-6.3-failures.patch \
11 "
10 12
11DEPENDS = "elfutils" 13DEPENDS = "elfutils"
12 14
@@ -29,7 +31,7 @@ PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
29PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native" 31PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native"
30 32
31inherit autotools gettext pkgconfig systemd 33inherit autotools gettext pkgconfig systemd
32inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'distutils3-base', '', d)} 34inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)}
33 35
34# exporter comes with python3-probes 36# exporter comes with python3-probes
35PACKAGES =+ "${PN}-exporter" 37PACKAGES =+ "${PN}-exporter"
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index b6ff98f..36c934c 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -1,12 +1,13 @@
1LICENSE = "GPLv2" 1LICENSE = "GPLv2"
2LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 2LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
3SRCREV = "7f6992539fb22c93c21ac30c94508bf655d496a7" 3SRCREV = "2e9f2f6967e44ce2bf8f34932b5bdd738ece2161"
4PV = "4.5" 4PV = "4.6"
5 5
6SRC_URI = "git://sourceware.org/git/systemtap.git \ 6SRC_URI = "git://sourceware.org/git/systemtap.git;branch=master \
7 file://0001-Do-not-let-configure-write-a-python-location-into-th.patch \ 7 file://0001-Do-not-let-configure-write-a-python-location-into-th.patch \
8 file://0001-Install-python-modules-to-correct-library-dir.patch \ 8 file://0001-Install-python-modules-to-correct-library-dir.patch \
9 file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \ 9 file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \
10 file://0001-PR28778-gcc-warning-tweak-for-sprintf-precision-para.patch \
10 " 11 "
11 12
12COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips).*-linux' 13COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips).*-linux'
diff --git a/meta/recipes-kernel/wireless-regdb/wireless-regdb_2021.07.14.bb b/meta/recipes-kernel/wireless-regdb/wireless-regdb_2021.08.28.bb
index a396f15..c673f80 100644
--- a/meta/recipes-kernel/wireless-regdb/wireless-regdb_2021.07.14.bb
+++ b/meta/recipes-kernel/wireless-regdb/wireless-regdb_2021.08.28.bb
@@ -5,7 +5,7 @@ LICENSE = "ISC"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c" 5LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c"
6 6
7SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz" 7SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz"
8SRC_URI[sha256sum] = "2e2dd216a5f1a310b849774af63e6309d94c2207c34771a534c47ae18b162742" 8SRC_URI[sha256sum] = "cff370c410d1e6d316ae0a7fa8ac6278fdf1efca5d3d664aca7cfd2aafa54446"
9 9
10inherit bin_package allarch 10inherit bin_package allarch
11 11