lttng-modules: add post 2.11.6 patches
PATCH 1/1 lttng-modules: add post 2.11.6 patches
From: Bruce Ashfield <[email protected]>
To fix building against the latest 5.4.x kernels (and other versions as well), we import the lttng patches that have been added since the 2.11.6 release.
When 2.11.7 is released, we can drop these patches and go with the release tarball.
---
Steve reported that my latest 5.4.x updates broke lttng on dunfell, grabbing all of the upstream patches since the release is the best bet, since it fixes the build and future proofs us until the next release of 2.11.x
Bruce
...ncpy-equals-destination-size-warning.patch | 42 +++ ...jtool-Rename-frame.h-objtool.h-v5.10.patch | 88 +++++ ...oints-output-proper-root-owner-for-t.patch | 316 ++++++++++++++++++ ...rdered-extent-tracepoint-take-btrfs_.patch | 179 ++++++++++ ...ext4-fast-commit-recovery-path-v5.10.patch | 91 +++++ ...intr-vectoring-info-and-error-code-t.patch | 124 +++++++ ...x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch | 82 +++++ ...Return-unique-RET_PF_-values-if-the-.patch | 71 ++++ ...int-Optimize-using-static_call-v5.10.patch | 155 +++++++++ ...-fix-include-order-for-older-kernels.patch | 31 ++ .../0011-Add-release-maintainer-script.patch | 59 ++++ .../0012-Improve-the-release-script.patch | 173 ++++++++++ ...fix-ext4-fast-commit-recovery-path-v.patch | 32 ++ ...-fix-include-order-for-older-kernels.patch | 32 ++ ...fix-tracepoint-Optimize-using-static.patch | 46 +++ ...ion-range-for-trace_find_free_extent.patch | 30 ++ .../lttng/lttng-modules_2.11.6.bb | 16 + 17 files changed, 1567 insertions(+) create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0001-fix-strncpy-equals-destination-size-warning.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0002-fix-objtool-Rename-frame.h-objtool.h-v5.10.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0004-fix-btrfs-make-ordered-extent-tracepoint-take-btrfs_.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0005-fix-ext4-fast-commit-recovery-path-v5.10.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0006-fix-KVM-x86-Add-intr-vectoring-info-and-error-code-t.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0007-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0008-fix-KVM-x86-mmu-Return-unique-RET_PF_-values-if-the-.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0009-fix-tracepoint-Optimize-using-static_call-v5.10.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0010-fix-include-order-for-older-kernels.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0011-Add-release-maintainer-script.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0012-Improve-the-release-script.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0013-fix-backport-of-fix-ext4-fast-commit-recovery-path-v.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0014-Revert-fix-include-order-for-older-kernels.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0015-fix-backport-of-fix-tracepoint-Optimize-using-static.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0016-fix-adjust-version-range-for-trace_find_free_extent.patch
meta/recipes-kernel/lttng/lttng-modules/0001-fix-strncpy-equals-destination-size-warning.patch new file +42 -0
@@ -0,0 +1,42 @@ +From cb78974394a9af865e1d2d606e838dbec0de80e8 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <[email protected]> +Date: Mon, 5 Oct 2020 15:31:42 -0400 +Subject: [PATCH 01/16] fix: strncpy equals destination size warning +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Some versions of GCC when called with -Wstringop-truncation will warn +when doing a copy of the same size as the destination buffer with +strncpy : + + ‘strncpy’ specified bound 256 equals destination size [-Werror=stringop-truncation] + +Since we unconditionally write '\0' in the last byte, reduce the copy +size by one. + +Upstream-Status: Backport + +Change-Id: Idb907c9550817a06fc0dffc489740f63d440e7d4 +Signed-off-by: Mathieu Desnoyers <[email protected]> +Signed-off-by: Michael Jeanson <[email protected]> +--- + lttng-syscalls.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lttng-syscalls.c b/lttng-syscalls.c +index 49c0d81b..b43dd570 100644 +--- a/lttng-syscalls.c ++++ b/lttng-syscalls.c +@@ -719,7 +719,7 @@ int fill_table(const struct trace_syscall_entry *table, size_t table_len, + ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT; + break; + } +- strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN); ++ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN - 1); + ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0'; + ev.instrumentation = LTTNG_KERNEL_SYSCALL; + chan_table[i] = _lttng_event_create(chan, &ev, filter, +-- +2.25.1 +
meta/recipes-kernel/lttng/lttng-modules/0002-fix-objtool-Rename-frame.h-objtool.h-v5.10.patch new file +88 -0
88 lines not on this page · raw message
meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch new file +316 -0
316 lines not on this page · raw message
meta/recipes-kernel/lttng/lttng-modules/0004-fix-btrfs-make-ordered-extent-tracepoint-take-btrfs_.patch new file +179 -0
179 lines not on this page · raw message
meta/recipes-kernel/lttng/lttng-modules/0005-fix-ext4-fast-commit-recovery-path-v5.10.patch new file +91 -0
91 lines not on this page · raw message
meta/recipes-kernel/lttng/lttng-modules/0006-fix-KVM-x86-Add-intr-vectoring-info-and-error-code-t.patch new file +124 -0
124 lines not on this page · raw message
meta/recipes-kernel/lttng/lttng-modules/0007-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch new file +82 -0
82 lines not on this page · raw message
meta/recipes-kernel/lttng/lttng-modules/0008-fix-KVM-x86-mmu-Return-unique-RET_PF_-values-if-the-.patch new file +71 -0
71 lines not on this page · raw message
meta/recipes-kernel/lttng/lttng-modules/0009-fix-tracepoint-Optimize-using-static_call-v5.10.patch new file +155 -0
155 lines not on this page · raw message
meta/recipes-kernel/lttng/lttng-modules/0010-fix-include-order-for-older-kernels.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 2ce89d35c9477d8c17c00489c72e1548e16af9b9 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <[email protected]> +Date: Fri, 20 Nov 2020 11:42:30 -0500 +Subject: [PATCH 10/16] fix: include order for older kernels + +Fixes a build failure on v3.0 and v3.1. + +Upstream-Status: Backport + +Change-Id: Ic48512d2aa5ee46678e67d147b92dba6d0959615 +Signed-off-by: Michael Jeanson <[email protected]> +Signed-off-by: Mathieu Desnoyers <[email protected]> +--- + lttng-events.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lttng-events.h b/lttng-events.h +index 099fd78b..f5cc57c6 100644 +--- a/lttng-events.h ++++ b/lttng-events.h +@@ -16,6 +16,7 @@ + #include <linux/kref.h> + #include <lttng-cpuhotplug.h> + #include <linux/uuid.h> ++#include <linux/irq_work.h> + #include <wrapper/uprobes.h> + #include <lttng-tracer.h> + #include <lttng-abi.h> +-- +2.25.1 +
meta/recipes-kernel/lttng/lttng-modules/0011-Add-release-maintainer-script.patch new file +59 -0
59 lines not on this page · raw message
meta/recipes-kernel/lttng/lttng-modules/0012-Improve-the-release-script.patch new file +173 -0
173 lines not on this page · raw message
meta/recipes-kernel/lttng/lttng-modules/0013-fix-backport-of-fix-ext4-fast-commit-recovery-path-v.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 59fcc704bea8ecf4bd401e744df41e3331359524 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <[email protected]> +Date: Mon, 23 Nov 2020 10:19:52 -0500 +Subject: [PATCH 13/16] fix: backport of fix: ext4: fast commit recovery path + (v5.10) + +Add missing '#endif'. + +Upstream-Status: Backport + +Signed-off-by: Michael Jeanson <[email protected]> +Signed-off-by: Mathieu Desnoyers <[email protected]> +Change-Id: I43349d685d7ed740b32ce992be0c2e7e6f12c799 +--- + instrumentation/events/lttng-module/ext4.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h +index 5fddccad..d454fa6e 100644 +--- a/instrumentation/events/lttng-module/ext4.h ++++ b/instrumentation/events/lttng-module/ext4.h +@@ -1446,6 +1446,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_load_inode, + ) + ) + #endif ++#endif + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0)) + +-- +2.25.1 +
meta/recipes-kernel/lttng/lttng-modules/0014-Revert-fix-include-order-for-older-kernels.patch new file +32 -0
@@ -0,0 +1,32 @@ +From b2df75dd378ce5260bb51872e43ac1d76fbf4588 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers <[email protected]> +Date: Mon, 23 Nov 2020 14:21:51 -0500 +Subject: [PATCH 14/16] Revert "fix: include order for older kernels" + +This reverts commit 2ce89d35c9477d8c17c00489c72e1548e16af9b9. + +This commit is only needed for master and stable-2.12, because +stable-2.11 does not include irq_work.h. + +Upstream-Status: Backport + +Signed-off-by: Mathieu Desnoyers <[email protected]> +--- + lttng-events.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/lttng-events.h b/lttng-events.h +index f5cc57c6..099fd78b 100644 +--- a/lttng-events.h ++++ b/lttng-events.h +@@ -16,7 +16,6 @@ + #include <linux/kref.h> + #include <lttng-cpuhotplug.h> + #include <linux/uuid.h> +-#include <linux/irq_work.h> + #include <wrapper/uprobes.h> + #include <lttng-tracer.h> + #include <lttng-abi.h> +-- +2.25.1 +
meta/recipes-kernel/lttng/lttng-modules/0015-fix-backport-of-fix-tracepoint-Optimize-using-static.patch new file +46 -0
46 lines not on this page · raw message
meta/recipes-kernel/lttng/lttng-modules/0016-fix-adjust-version-range-for-trace_find_free_extent.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 5c3e67d7994097cc75f45258b7518aacb55dde1b Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <[email protected]> +Date: Tue, 24 Nov 2020 11:27:18 -0500 +Subject: [PATCH 16/16] fix: adjust version range for trace_find_free_extent() + +Upstream-Status: Backport + +Signed-off-by: Michael Jeanson <[email protected]> +Signed-off-by: Mathieu Desnoyers <[email protected]> +Change-Id: Iaa6088092cf58b4d29d55f3ff9586c57ae272302 +--- + instrumentation/events/lttng-module/btrfs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h +index d47f3280..efe7af96 100644 +--- a/instrumentation/events/lttng-module/btrfs.h ++++ b/instrumentation/events/lttng-module/btrfs.h +@@ -1917,7 +1917,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f + #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0) || \ +- LTTNG_KERNEL_RANGE(5,9,6, 5,10,0) || \ ++ LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \ + LTTNG_KERNEL_RANGE(5,4,78, 5,5,0)) + LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, + +-- +2.25.1 +
meta/recipes-kernel/lttng/lttng-modules_2.11.6.bb +16 -0
@@ -11,6 +11,22 @@ COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux' SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \ file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \ + file://0001-fix-strncpy-equals-destination-size-warning.patch \ + file://0002-fix-objtool-Rename-frame.h-objtool.h-v5.10.patch \ + file://0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch \ + file://0004-fix-btrfs-make-ordered-extent-tracepoint-take-btrfs_.patch \ + file://0005-fix-ext4-fast-commit-recovery-path-v5.10.patch \ + file://0006-fix-KVM-x86-Add-intr-vectoring-info-and-error-code-t.patch \ + file://0007-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch \ + file://0008-fix-KVM-x86-mmu-Return-unique-RET_PF_-values-if-the-.patch \ + file://0009-fix-tracepoint-Optimize-using-static_call-v5.10.patch \ + file://0010-fix-include-order-for-older-kernels.patch \ + file://0011-Add-release-maintainer-script.patch \ + file://0012-Improve-the-release-script.patch \ + file://0013-fix-backport-of-fix-ext4-fast-commit-recovery-path-v.patch \ + file://0014-Revert-fix-include-order-for-older-kernels.patch \ + file://0015-fix-backport-of-fix-tracepoint-Optimize-using-static.patch \ + file://0016-fix-adjust-version-range-for-trace_find_free_extent.patch \ " SRC_URI[md5sum] = "8ef09fdfcdec669d33f7fc1c1c80f2c4"
Signature · 1 line
2.25.1