Skip to contentSkip to conversation

lttng-modules: update to v2.13.9

PATCH New [email protected] 1 participant 2 messages Mar 18, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 lttng-modules: update to v2.13.9

From: Bruce Ashfield <[email protected]>

Bumping lttng-modules to version v2.13.9-4-g12f43cab, which comprises the following commits:

    da1f5a26 Version 2.13.9
    dc2d1294 fix: jbd2: use the correct print format (v5.4.229)
    d04c1211 fix: jbd2 upper bound for v5.10.163
    4b8864fc fix: jbd2: use the correct print format (v5.10.163)
    69d3aa79 fix: btrfs: move accessor helpers into accessors.h (v6.2)

We drop our previously backported commits as well, since they are part of the release.

---
 ...ccessor-helpers-into-accessors.h-v6..patch | 45 --------------
 .../fix-jbd2-upper-bound-for-v5.10.163.patch  | 52 ----------------
 ...e-the-correct-print-format-v5.10.163.patch | 61 -------------------
 ...ules_2.13.8.bb => lttng-modules_2.13.9.bb} |  5 +-
 4 files changed, 1 insertion(+), 162 deletions(-)
 delete mode 100644 meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-move-accessor-helpers-into-accessors.h-v6..patch
 delete mode 100644 meta/recipes-kernel/lttng/lttng-modules/fix-jbd2-upper-bound-for-v5.10.163.patch
 delete mode 100644 meta/recipes-kernel/lttng/lttng-modules/fix-jbd2-use-the-correct-print-format-v5.10.163.patch
 rename meta/recipes-kernel/lttng/{lttng-modules_2.13.8.bb => lttng-modules_2.13.9.bb} (83%)
meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-move-accessor-helpers-into-accessors.h-v6..patch deleted +0 -45
deleted file mode 100644
index 26ae605b31..0000000000
@@ -1,45 +0,0 @@
-From 69d3aa79a641f539cfd5c11b46b2dd9b4df9b0f0 Mon Sep 17 00:00:00 2001
-From: Michael Jeanson <[email protected]>
-Date: Mon, 16 Jan 2023 15:01:51 -0500
-Subject: [PATCH] fix: btrfs: move accessor helpers into accessors.h (v6.2)
-
-See upstream commit :
-
-  commit 07e81dc94474eb62705c6f96d9ab1a5a797b8703
-  Author: Josef Bacik <[email protected]>
-  Date:   Wed Oct 19 10:51:00 2022 -0400
-
-    btrfs: move accessor helpers into accessors.h
-
-    This is a large patch, but because they're all macros it's impossible to
-    split up.  Simply copy all of the item accessors in ctree.h and paste
-    them in accessors.h, and then update any files to include the header so
-    everything compiles.
-
-Upstream-Status: Backport
-
-Change-Id: I1f0876dd8b7a8687f6802b60c3e3baabd017cc52
-Signed-off-by: Michael Jeanson <[email protected]>
-Signed-off-by: Mathieu Desnoyers <[email protected]>
----
- include/instrumentation/events/btrfs.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/include/instrumentation/events/btrfs.h b/include/instrumentation/events/btrfs.h
-index 785f16ac..01157107 100644
---- a/include/instrumentation/events/btrfs.h
-+++ b/include/instrumentation/events/btrfs.h
-@@ -9,6 +9,10 @@
- #include <linux/writeback.h>
- #include <lttng/kernel-version.h>
- 
-+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0))
-+#include <../fs/btrfs/accessors.h>
-+#endif
-+
- #ifndef _TRACE_BTRFS_DEF_
- #define _TRACE_BTRFS_DEF_
- struct btrfs_root;
--- 
-2.34.1
-
meta/recipes-kernel/lttng/lttng-modules/fix-jbd2-upper-bound-for-v5.10.163.patch deleted +0 -52

52 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/fix-jbd2-use-the-correct-print-format-v5.10.163.patch deleted +0 -61

61 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules_2.13.9.bb renamed from meta/recipes-kernel/lttng/lttng-modules_2.13.8.bb +1 -4
similarity index 83%
rename from meta/recipes-kernel/lttng/lttng-modules_2.13.8.bb
rename to meta/recipes-kernel/lttng/lttng-modules_2.13.9.bb
index c04796be16..a08386b053 100644
@@ -11,15 +11,12 @@ include lttng-platforms.inc
 
 SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://0009-Rename-genhd-wrapper-to-blkdev.patch \
-           file://fix-jbd2-use-the-correct-print-format-v5.10.163.patch \
-           file://fix-jbd2-upper-bound-for-v5.10.163.patch \
-           file://0001-fix-btrfs-move-accessor-helpers-into-accessors.h-v6..patch \
            "
 
 # Use :append here so that the patch is applied also when using devupstream
 SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch"
 
-SRC_URI[sha256sum] = "f525d3d48ea3a475cb535339c201666d0e4c75ec8c46d29837bcf381ea02cb19"
+SRC_URI[sha256sum] = "bf808b113544287cfe837a6382887fa66354ef5cc8216460cebbef3d27dc3581"
 
 export INSTALL_MOD_DIR="kernel/lttng-modules"
 
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 lttng-modules: fix for v6.3+ kernels

From: Bruce Ashfield <[email protected]>

As part of updating linux-yocto-dev to v6.3, lttng-modules needs to have four backported patches to adjust for the new kernel version.

These are safe for inclusion in the upcoming release, as they are version protected and provide some future proofing for folks trying to use newer kernels than our released 6.1.

---
 ...-vma-vm_flags-wrapper-functions-v6.3.patch |  82 +++++++++++++
 ...e-guid_t-and-uuid_le-types-and-respe.patch |  60 +++++++++
 ...ind_free_extent_ctl-to-allocator-tra.patch | 116 ++++++++++++++++++
 ...d-location-to-trace_consume_skb-v6.3.patch |  62 ++++++++++
 .../lttng/lttng-modules_2.13.9.bb             |   4 +
 5 files changed, 324 insertions(+)
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0001-fix-mm-introduce-vma-vm_flags-wrapper-functions-v6.3.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0002-fix-uuid-Decouple-guid_t-and-uuid_le-types-and-respe.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-pass-find_free_extent_ctl-to-allocator-tra.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0004-fix-net-add-location-to-trace_consume_skb-v6.3.patch
meta/recipes-kernel/lttng/lttng-modules/0001-fix-mm-introduce-vma-vm_flags-wrapper-functions-v6.3.patch new file +82 -0
new file mode 100644
index 0000000000..976eecc3ab
@@ -0,0 +1,82 @@
+From 939200ef160c95c8a9d71fd80c99f42a1de0a9f0 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <[email protected]>
+Date: Tue, 7 Mar 2023 11:41:14 -0500
+Subject: [PATCH 1/4] fix: mm: introduce vma->vm_flags wrapper functions (v6.3)
+
+See upstream commit :
+
+  commit bc292ab00f6c7a661a8a605c714e8a148f629ef6
+  Author: Suren Baghdasaryan <[email protected]>
+  Date:   Thu Jan 26 11:37:47 2023 -0800
+
+    mm: introduce vma->vm_flags wrapper functions
+
+    vm_flags are among VMA attributes which affect decisions like VMA merging
+    and splitting.  Therefore all vm_flags modifications are performed after
+    taking exclusive mmap_lock to prevent vm_flags updates racing with such
+    operations.  Introduce modifier functions for vm_flags to be used whenever
+    flags are updated.  This way we can better check and control correct
+    locking behavior during these updates.
+
+Upstream-Status: Backport
+
+Change-Id: I2cf662420d9d7748e5e310d3ea4bac98ba7d7f94
+Signed-off-by: Michael Jeanson <[email protected]>
+Signed-off-by: Mathieu Desnoyers <[email protected]>
+---
+ include/wrapper/mm.h                  | 16 ++++++++++++++++
+ src/lib/ringbuffer/ring_buffer_mmap.c |  4 +++-
+ 2 files changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/include/wrapper/mm.h b/include/wrapper/mm.h
+index d3bdda66..61ac8127 100644
+--- a/include/wrapper/mm.h
++++ b/include/wrapper/mm.h
+@@ -13,6 +13,22 @@
+ 
+ #include <lttng/kernel-version.h>
+ 
++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
++static inline
++void wrapper_vm_flags_set(struct vm_area_struct *vma,
++		vm_flags_t flags)
++{
++	vm_flags_set(vma, flags);
++}
++#else
++static inline
++void wrapper_vm_flags_set(struct vm_area_struct *vma,
++		vm_flags_t flags)
++{
++	vma->vm_flags |= flags;
++}
++#endif
++
+ #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0) \
+ 		|| LTTNG_UBUNTU_KERNEL_RANGE(4,4,25,44, 4,5,0,0))
+ 
+diff --git a/src/lib/ringbuffer/ring_buffer_mmap.c b/src/lib/ringbuffer/ring_buffer_mmap.c
+index 25e2d8d5..d24b76a3 100644
+--- a/src/lib/ringbuffer/ring_buffer_mmap.c
++++ b/src/lib/ringbuffer/ring_buffer_mmap.c
+@@ -17,6 +17,8 @@
+ #include <ringbuffer/frontend.h>
+ #include <ringbuffer/vfs.h>
+ 
++#include <wrapper/mm.h>
++
+ /*
+  * fault() vm_op implementation for ring buffer file mapping.
+  */
+@@ -113,7 +115,7 @@ static int lib_ring_buffer_mmap_buf(struct lttng_kernel_ring_buffer *buf,
+ 		return -EINVAL;
+ 
+ 	vma->vm_ops = &lib_ring_buffer_mmap_ops;
+-	vma->vm_flags |= VM_DONTEXPAND;
++	wrapper_vm_flags_set(vma, VM_DONTEXPAND);
+ 	vma->vm_private_data = buf;
+ 
+ 	return 0;
+-- 
+2.34.1
+
meta/recipes-kernel/lttng/lttng-modules/0002-fix-uuid-Decouple-guid_t-and-uuid_le-types-and-respe.patch new file +60 -0

60 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-pass-find_free_extent_ctl-to-allocator-tra.patch new file +116 -0

116 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0004-fix-net-add-location-to-trace_consume_skb-v6.3.patch new file +62 -0

62 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules_2.13.9.bb +4 -0
index a08386b053..5197bf578f 100644
@@ -11,6 +11,10 @@ include lttng-platforms.inc
 
 SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://0009-Rename-genhd-wrapper-to-blkdev.patch \
+           file://0001-fix-mm-introduce-vma-vm_flags-wrapper-functions-v6.3.patch \
+           file://0002-fix-uuid-Decouple-guid_t-and-uuid_le-types-and-respe.patch \
+           file://0003-fix-btrfs-pass-find_free_extent_ctl-to-allocator-tra.patch \
+           file://0004-fix-net-add-location-to-trace_consume_skb-v6.3.patch \
            "
 
 # Use :append here so that the patch is applied also when using devupstream
Signature · 1 line
2.34.1