Skip to contentSkip to conversation

lttng-modules: backport patches for kernel v6.11

PATCH New [email protected] 1 participant 1 message Aug 7, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lttng-modules: backport patches for kernel v6.11

From: Bruce Ashfield <[email protected]>

While we wait for a new lttng-release, we backport 6 patches to fix the build against the 6.11 kernel.

---
 ...01-Fix-kfree_skb-changed-in-6.11-rc1.patch |  65 ++++++
 ...da_reserve_space-changed-in-6.11-rc1.patch |  58 +++++
 ...emoved-from-btrfs_get_extent-in-6.11.patch |  67 ++++++
 ...moved-frmo-btrfs_get_extent-in-6.11-.patch |  47 ++++
 ...removed-from-btrfs_get_extent-in-6.1.patch |  54 +++++
 ...omic-write-support-added-in-6.11-rc1.patch | 203 ++++++++++++++++++
 .../lttng/lttng-modules_2.13.13.bb            |   6 +
 7 files changed, 500 insertions(+)
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0001-Fix-kfree_skb-changed-in-6.11-rc1.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0002-Fix-ext4_da_reserve_space-changed-in-6.11-rc1.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0003-Fix-orig_start-removed-from-btrfs_get_extent-in-6.11.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0004-Fix-block_len-removed-frmo-btrfs_get_extent-in-6.11-.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0005-Fix-block_start-removed-from-btrfs_get_extent-in-6.1.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0006-Fix-scsi-sd-Atomic-write-support-added-in-6.11-rc1.patch
meta/recipes-kernel/lttng/lttng-modules/0001-Fix-kfree_skb-changed-in-6.11-rc1.patch new file +65 -0
new file mode 100644
index 0000000000..83b753994e
@@ -0,0 +1,65 @@
+From 9706d0431c9cc4178db4cf630fee6f5f85f2543e Mon Sep 17 00:00:00 2001
+From: Kienan Stewart <[email protected]>
+Date: Mon, 29 Jul 2024 14:01:18 +0000
+Subject: [PATCH 1/6] Fix: kfree_skb changed in 6.11-rc1
+
+See upstream commit:
+
+    commit c53795d48ee8f385c6a9e394651e7ee914baaeba
+    Author: Yan Zhai <[email protected]>
+    Date:   Mon Jun 17 11:09:04 2024 -0700
+
+        net: add rx_sk to trace_kfree_skb
+
+        skb does not include enough information to find out receiving
+        sockets/services and netns/containers on packet drops. In theory
+        skb->dev tells about netns, but it can get cleared/reused, e.g. by TCP
+        stack for OOO packet lookup. Similarly, skb->sk often identifies a local
+        sender, and tells nothing about a receiver.
+
+        Allow passing an extra receiving socket to the tracepoint to improve
+        the visibility on receiving drops.
+
+Upstream-Status: Backport
+
+Change-Id: I33c8ce1a48006456f198ab1592f733b55be01016
+Signed-off-by: Kienan Stewart <[email protected]>
+Signed-off-by: Mathieu Desnoyers <[email protected]>
+---
+ include/instrumentation/events/skb.h | 20 +++++++++++++++++++-
+ 1 file changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/include/instrumentation/events/skb.h b/include/instrumentation/events/skb.h
+index edfda7ff..0b5a95dc 100644
+--- a/include/instrumentation/events/skb.h
++++ b/include/instrumentation/events/skb.h
+@@ -43,7 +43,25 @@ LTTNG_TRACEPOINT_ENUM(skb_drop_reason,
+ )
+ #endif
+ 
+-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0) \
++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,11,0))
++LTTNG_TRACEPOINT_EVENT_MAP(kfree_skb,
++
++	skb_kfree,
++
++	TP_PROTO(struct sk_buff *skb, void *location,
++		enum skb_drop_reason reason, struct sock *rx_sk),
++
++	TP_ARGS(skb, location, reason, rx_sk),
++
++	TP_FIELDS(
++		ctf_integer_hex(void *, skbaddr, skb)
++		ctf_integer_hex(void *, location, location)
++		ctf_integer_network(unsigned short, protocol, skb->protocol)
++		ctf_enum(skb_drop_reason, uint8_t, reason, reason)
++		ctf_integer_hex(void *, rx_skaddr, rx_sk)
++	)
++)
++#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0) \
+ 	|| LTTNG_KERNEL_RANGE(5,15,58, 5,16,0) \
+ 	|| LTTNG_RHEL_KERNEL_RANGE(5,14,0,70,0,0, 5,15,0,0,0,0) \
+ 	|| LTTNG_RHEL_KERNEL_RANGE(4,18,0,477,10,1, 4,19,0,0,0,0))
+-- 
+2.39.2
+
meta/recipes-kernel/lttng/lttng-modules/0002-Fix-ext4_da_reserve_space-changed-in-6.11-rc1.patch new file +58 -0

58 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0003-Fix-orig_start-removed-from-btrfs_get_extent-in-6.11.patch new file +67 -0

67 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0004-Fix-block_len-removed-frmo-btrfs_get_extent-in-6.11-.patch new file +47 -0

47 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0005-Fix-block_start-removed-from-btrfs_get_extent-in-6.1.patch new file +54 -0

54 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0006-Fix-scsi-sd-Atomic-write-support-added-in-6.11-rc1.patch new file +203 -0

203 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules_2.13.13.bb +6 -0
index 75b144757a..0363e8be70 100644
@@ -14,6 +14,12 @@ SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://0002-fix-btrfs-move-parent-and-ref_root-into-btrfs_delaye.patch \
            file://0003-fix-net-udp-add-IP-port-data-to-the-tracepoint-udp-u.patch \
            file://0001-fix-close_on_exec-pass-files_struct-instead-of-fdtab.patch \
+           file://0001-Fix-kfree_skb-changed-in-6.11-rc1.patch \
+           file://0002-Fix-ext4_da_reserve_space-changed-in-6.11-rc1.patch \
+           file://0003-Fix-orig_start-removed-from-btrfs_get_extent-in-6.11.patch \
+           file://0004-Fix-block_len-removed-frmo-btrfs_get_extent-in-6.11-.patch \
+           file://0005-Fix-block_start-removed-from-btrfs_get_extent-in-6.1.patch \
+           file://0006-Fix-scsi-sd-Atomic-write-support-added-in-6.11-rc1.patch \
         "
 
 # Use :append here so that the patch is applied also when using devupstream
Signature · 1 line
2.39.2