From patchwork Sat Mar 18 15:32:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Ashfield X-Patchwork-Id: 21180 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DA1AC61DA4 for ; Sat, 18 Mar 2023 15:32:15 +0000 (UTC) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) by mx.groups.io with SMTP id smtpd.web10.8535.1679153526448256931 for ; Sat, 18 Mar 2023 08:32:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HVSUi8ke; spf=pass (domain: gmail.com, ip: 209.85.160.173, mailfrom: bruce.ashfield@gmail.com) Received: by mail-qt1-f173.google.com with SMTP id r5so8717963qtp.4 for ; Sat, 18 Mar 2023 08:32:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679153525; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SPJC7gyPDxhmriofIru1r+f2V8DWpB5p9M3/3idT5Xk=; b=HVSUi8keocHdqUb21gup8dm8yY8cXTJmr7A0XKCS5xfLwAX+njz0aVsMkcoqzvn5NT pWrAJGKoT7/HAvPdRVDAZ602cZZT7P/jsSQM28NotgKafcdu5NzqLCZ9AP8sLJH3Uymj K2wThg3WmanaGt1ecQR/4vulcfwJ/PGWPBdg1jLlLp2dlmM4G2uZRB9ReIStp5W1tsKy fJYA57zo9wH3dq5i8p3oFlg9FHZ0jYpvH+pgwEfcAoURvxmBQeqpoyFDB08IyRtD7BAw 4sXh4oBJYOjwCTRLSS56qCr9e6fyhDze6L3a4BOyd/GJh0nYcDyFmFIMphaf3eWMF53a Khdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679153525; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SPJC7gyPDxhmriofIru1r+f2V8DWpB5p9M3/3idT5Xk=; b=LpYspkScYyUbSi/LgIqsBfMxFQNtDSGac3iPMpD5IadR0uYf6UwQQetNCuBkXyzeaR c700fs8C+2GzPaR8BI4Vi8pp+ayWNjGMj08ESyOq36rjp7IOtwm/OlybQou/xGEcuh7P yxDUWuhdKIZsvFULoYSJ2kzVgyqxrl7YDLu0+a5JNE8k1SbNV3uDXh/A/yddi+By8Y/i 803N0PU98S7cXYLF3/+Km61BEVWWJ0/09EUjcI1sMAsC6jZGg+WZ+7OtKu6wk4Dqi8OE oMcCm2BbMdeagzWWaTZhwDHxjElE5YYQKeUKnob4ism26auC+UsEGh59xUCVYM2djyIC s3XA== X-Gm-Message-State: AO0yUKVvY56/W7AhJtkK0hgm72tNvjBfzIfiBHll7kXJfiFu3g4fUZc3 R8hM7qQ3AVJkssVaHGQz68+yvpKZfCF5dw== X-Google-Smtp-Source: AK7set9OCHCztu/g0Uxf0OlZZTyft5cMoj/eBs6vlQAqkafEJOPsOesXxW5Q6EVj78imW06HYECjPg== X-Received: by 2002:a05:622a:1cb:b0:3dc:91cc:384b with SMTP id t11-20020a05622a01cb00b003dc91cc384bmr5254135qtw.5.1679153525282; Sat, 18 Mar 2023 08:32:05 -0700 (PDT) Received: from build.lan (cpe7c9a54441c1f-cm7c9a54441c1d.cpe.net.cable.rogers.com. [173.34.238.88]) by smtp.gmail.com with ESMTPSA id z12-20020ac875cc000000b003d2298d847bsm3108714qtq.67.2023.03.18.08.32.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Mar 2023 08:32:04 -0700 (PDT) From: bruce.ashfield@gmail.com To: richard.purdie@linuxfoundation.org Cc: openembedded-core@lists.openembedded.org Subject: [PATCH 1/2] lttng-modules: update to v2.13.9 Date: Sat, 18 Mar 2023 11:32:01 -0400 Message-Id: <20230318153202.1697998-1-bruce.ashfield@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 18 Mar 2023 15:32:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178789 From: Bruce Ashfield 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. Signed-off-by: Bruce Ashfield --- ...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%) diff --git a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-move-accessor-helpers-into-accessors.h-v6..patch b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-move-accessor-helpers-into-accessors.h-v6..patch deleted file mode 100644 index 26ae605b31..0000000000 --- a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-move-accessor-helpers-into-accessors.h-v6..patch +++ /dev/null @@ -1,45 +0,0 @@ -From 69d3aa79a641f539cfd5c11b46b2dd9b4df9b0f0 Mon Sep 17 00:00:00 2001 -From: Michael Jeanson -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 - 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 -Signed-off-by: Mathieu Desnoyers ---- - 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 - #include - -+#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 - diff --git a/meta/recipes-kernel/lttng/lttng-modules/fix-jbd2-upper-bound-for-v5.10.163.patch b/meta/recipes-kernel/lttng/lttng-modules/fix-jbd2-upper-bound-for-v5.10.163.patch deleted file mode 100644 index bfc49294b0..0000000000 --- a/meta/recipes-kernel/lttng/lttng-modules/fix-jbd2-upper-bound-for-v5.10.163.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 4fd2615b87b3cac0fd5bdc5fc82db05f6fcfdecf Mon Sep 17 00:00:00 2001 -From: Michael Jeanson -Date: Tue, 17 Jan 2023 12:16:04 -0500 -Subject: [PATCH] fix: jbd2 upper bound for v5.10.163 - -Use the correct upper bound of 5,11,0. - -Change-Id: I435b44b940c7346ed8c3ef0d445365ed156702d0 -Signed-off-by: Michael Jeanson -Signed-off-by: Mathieu Desnoyers - -Upstream-Status: Backport -Signed-off-by: Armin Kuster - ---- - include/instrumentation/events/jbd2.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/include/instrumentation/events/jbd2.h b/include/instrumentation/events/jbd2.h -index f7993511..9b77ab92 100644 ---- a/include/instrumentation/events/jbd2.h -+++ b/include/instrumentation/events/jbd2.h -@@ -28,7 +28,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint, - ) - - #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0) \ -- || LTTNG_KERNEL_RANGE(5,10,163, 6,0,0) \ -+ || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \ - || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ - || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ - || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) -@@ -97,7 +97,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_drop_transaction, - #endif - - #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0) \ -- || LTTNG_KERNEL_RANGE(5,10,163, 6,0,0) \ -+ || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \ - || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ - || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ - || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) -@@ -140,7 +140,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode_data, - ) - - #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0) \ -- || LTTNG_KERNEL_RANGE(5,10,163, 6,0,0) \ -+ || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \ - || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ - || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ - || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) --- -2.35.4 - diff --git a/meta/recipes-kernel/lttng/lttng-modules/fix-jbd2-use-the-correct-print-format-v5.10.163.patch b/meta/recipes-kernel/lttng/lttng-modules/fix-jbd2-use-the-correct-print-format-v5.10.163.patch deleted file mode 100644 index 8067cffaab..0000000000 --- a/meta/recipes-kernel/lttng/lttng-modules/fix-jbd2-use-the-correct-print-format-v5.10.163.patch +++ /dev/null @@ -1,61 +0,0 @@ -From dd7be14bd04c1de309ba267097b03a308da87dae Mon Sep 17 00:00:00 2001 -From: Michael Jeanson -Date: Tue, 17 Jan 2023 11:03:12 -0500 -Subject: [PATCH] fix: jbd2: use the correct print format (v5.10.163) - -See upstream commit : - - commit d87a7b4c77a997d5388566dd511ca8e6b8e8a0a8 - Author: Bixuan Cui - Date: Tue Oct 11 19:33:44 2022 +0800 - - jbd2: use the correct print format - - The print format error was found when using ftrace event: - <...>-1406 [000] .... 23599442.895823: jbd2_end_commit: dev 252,8 transaction -1866216965 sync 0 head -1866217368 - <...>-1406 [000] .... 23599442.896299: jbd2_start_commit: dev 252,8 transaction -1866216964 sync 0 - - Use the correct print format for transaction, head and tid. - -Change-Id: I7601f5cbb86495c2607be7b11e02724c90b3ebf9 -Signed-off-by: Michael Jeanson -Signed-off-by: Mathieu Desnoyers - -Upstream-Status: Backport -Signed-off-by: Armin Kuster - ---- - include/instrumentation/events/jbd2.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/include/instrumentation/events/jbd2.h b/include/instrumentation/events/jbd2.h -index d5d8ea0c..f7993511 100644 ---- a/include/instrumentation/events/jbd2.h -+++ b/include/instrumentation/events/jbd2.h -@@ -28,6 +28,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint, - ) - - #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0) \ -+ || LTTNG_KERNEL_RANGE(5,10,163, 6,0,0) \ - || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ - || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ - || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) -@@ -96,6 +97,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_drop_transaction, - #endif - - #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0) \ -+ || LTTNG_KERNEL_RANGE(5,10,163, 6,0,0) \ - || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ - || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ - || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) -@@ -138,6 +140,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode_data, - ) - - #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0) \ -+ || LTTNG_KERNEL_RANGE(5,10,163, 6,0,0) \ - || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \ - || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \ - || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0)) --- -2.35.4 - diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.13.8.bb b/meta/recipes-kernel/lttng/lttng-modules_2.13.9.bb 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 --- a/meta/recipes-kernel/lttng/lttng-modules_2.13.8.bb +++ b/meta/recipes-kernel/lttng/lttng-modules_2.13.9.bb @@ -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" From patchwork Sat Mar 18 15:32:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Ashfield X-Patchwork-Id: 21179 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C68EC74A5B for ; Sat, 18 Mar 2023 15:32:15 +0000 (UTC) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) by mx.groups.io with SMTP id smtpd.web11.8601.1679153526947113237 for ; Sat, 18 Mar 2023 08:32:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YABPsm7U; spf=pass (domain: gmail.com, ip: 209.85.160.178, mailfrom: bruce.ashfield@gmail.com) Received: by mail-qt1-f178.google.com with SMTP id h19so8728424qtn.1 for ; Sat, 18 Mar 2023 08:32:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679153526; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=N8lyMPEHpnPezLYxah9LHVdGaDos9MOHa3pmlxspuQY=; b=YABPsm7U7OETitBF2GD47cg0lW+TYvqIISGV+L6RqqNALEOOk1ScfURjeVvDeWohuH wvicWYx2V96DG5AEBQAY/acF8tXBd4cVgNS5DllUjomXQo3ZHHq3IBaOKtgTptoWIVUF 29gPsVrPHlyRfesL4RJRK0YI56DGd55oroToQavtcpzrDlE0RriaRO3VDHyC7WYdSwKz QuRQhULx7bGlv/fHjN8LiEGrq0UMg9pdMhCOqu+lKjcMJt45qgy9oRJCTsj8rz8lxv1k dG2wqXyffyN1l5XV9aPkx0KEbSJlcG+kvkH3I5bvFpXNeRAPEJRaY2DtDX2OWj8DP2nn NJWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679153526; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N8lyMPEHpnPezLYxah9LHVdGaDos9MOHa3pmlxspuQY=; b=zypej0fo8MRW+NtaLhpsz6YNGp72pLh3jtX7HO0V+YNabONjgGy6ocOBku9xUyvm0a cq7fWj2uq5m7lgrbtEYYfJViwCJPfdpdVOvfMI6HA1O6W0VarzhA5I0IvEjWcRsGNp6Z pmQh4cfJgpJYNM3HQYZJZlnXPp6Xe1BEeJF83MQdD1fr8JLC7TQAEdbVAw/uTTnWY2Yq HHNDHTkl/mbV5TiToNsFSV4hC7UKN9xXlHDurE2p7+gFXr7HQZlmzU7eGHQerawhYtYs VbiA7fzMTo+uRoyCBHJGayBFuruz6f1x/uOSNWWFWolxiXiexViMPVpHDtX/ekWyosIo cTEw== X-Gm-Message-State: AO0yUKU0768meXGJLQ6OgHHOtWCcFiTDQLt2t2F8etBGEYxsbE/x+NkU WSyNLZ+PgAGw2U2jDAQDc4oeR/o3Sf4Weg== X-Google-Smtp-Source: AK7set8GhUTOqu7wGhFEHJO1tKyUXtMFIeJPPMsRje51LRbnRDxyNZrDGFGgZo7g3lDox0uz9h14SA== X-Received: by 2002:a05:622a:19a6:b0:3bf:ab9d:d322 with SMTP id u38-20020a05622a19a600b003bfab9dd322mr11388459qtc.10.1679153525937; Sat, 18 Mar 2023 08:32:05 -0700 (PDT) Received: from build.lan (cpe7c9a54441c1f-cm7c9a54441c1d.cpe.net.cable.rogers.com. [173.34.238.88]) by smtp.gmail.com with ESMTPSA id z12-20020ac875cc000000b003d2298d847bsm3108714qtq.67.2023.03.18.08.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Mar 2023 08:32:05 -0700 (PDT) From: bruce.ashfield@gmail.com To: richard.purdie@linuxfoundation.org Cc: openembedded-core@lists.openembedded.org Subject: [PATCH 2/2] lttng-modules: fix for v6.3+ kernels Date: Sat, 18 Mar 2023 11:32:02 -0400 Message-Id: <20230318153202.1697998-2-bruce.ashfield@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230318153202.1697998-1-bruce.ashfield@gmail.com> References: <20230318153202.1697998-1-bruce.ashfield@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 18 Mar 2023 15:32:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178790 From: Bruce Ashfield 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. Signed-off-by: Bruce Ashfield --- ...-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 diff --git a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-mm-introduce-vma-vm_flags-wrapper-functions-v6.3.patch b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-mm-introduce-vma-vm_flags-wrapper-functions-v6.3.patch new file mode 100644 index 0000000000..976eecc3ab --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-mm-introduce-vma-vm_flags-wrapper-functions-v6.3.patch @@ -0,0 +1,82 @@ +From 939200ef160c95c8a9d71fd80c99f42a1de0a9f0 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +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 + 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 +Signed-off-by: Mathieu Desnoyers +--- + 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 + ++#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 + #include + ++#include ++ + /* + * 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 + diff --git a/meta/recipes-kernel/lttng/lttng-modules/0002-fix-uuid-Decouple-guid_t-and-uuid_le-types-and-respe.patch b/meta/recipes-kernel/lttng/lttng-modules/0002-fix-uuid-Decouple-guid_t-and-uuid_le-types-and-respe.patch new file mode 100644 index 0000000000..00aa34ed9f --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/0002-fix-uuid-Decouple-guid_t-and-uuid_le-types-and-respe.patch @@ -0,0 +1,60 @@ +From b3756eaa49a3de2f388bc269b2928a0233358fea Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Tue, 7 Mar 2023 12:05:00 -0500 +Subject: [PATCH 2/4] fix: uuid: Decouple guid_t and uuid_le types and + respective macros (v6.3) + +See upstream commit : + + commit 5e6a51787fef20b849682d8c49ec9c2beed5c373 + Author: Andy Shevchenko + Date: Tue Jan 24 15:38:38 2023 +0200 + + uuid: Decouple guid_t and uuid_le types and respective macros + + The guid_t type and respective macros are being used internally only. + The uuid_le has its user outside the kernel. Decouple these types and + macros, and make guid_t completely internal type to the kernel. + +Upstream-Status: Backport + +Change-Id: I8644fd139b0630e9cf18886b84e33bffab1e5abd +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +--- + include/lttng/events-internal.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/include/lttng/events-internal.h b/include/lttng/events-internal.h +index e31e6abb..a91a659e 100644 +--- a/include/lttng/events-internal.h ++++ b/include/lttng/events-internal.h +@@ -9,6 +9,7 @@ + #define _LTTNG_EVENTS_INTERNAL_H + + #include ++#include + + #include + +@@ -289,7 +290,7 @@ struct lttng_metadata_cache { + atomic_t producing; /* Metadata being produced (incomplete) */ + struct kref refcount; /* Metadata cache usage */ + struct list_head metadata_stream; /* Metadata stream list */ +- uuid_le uuid; /* Trace session unique ID (copy) */ ++ guid_t uuid; /* Trace session unique ID (copy) */ + struct mutex lock; /* Produce/consume lock */ + uint64_t version; /* Current version of the metadata */ + }; +@@ -463,7 +464,7 @@ struct lttng_kernel_session_private { + struct list_head events; /* Event list head */ + struct list_head list; /* Session list */ + unsigned int free_chan_id; /* Next chan ID to allocate */ +- uuid_le uuid; /* Trace session unique ID */ ++ guid_t uuid; /* Trace session unique ID */ + struct lttng_metadata_cache *metadata_cache; + unsigned int metadata_dumped:1, + tstate:1; /* Transient enable state */ +-- +2.34.1 + diff --git a/meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-pass-find_free_extent_ctl-to-allocator-tra.patch b/meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-pass-find_free_extent_ctl-to-allocator-tra.patch new file mode 100644 index 0000000000..8ecdccf609 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-pass-find_free_extent_ctl-to-allocator-tra.patch @@ -0,0 +1,116 @@ +From d0eeda3f84ba1643831561a2488ca2e99e9472b1 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Tue, 7 Mar 2023 11:26:25 -0500 +Subject: [PATCH 3/4] fix: btrfs: pass find_free_extent_ctl to allocator + tracepoints (v6.3) + +See upstream commit : + + commit cfc2de0fce015d4249c674ef9f5e0b4817ba5c53 + Author: Boris Burkov + Date: Thu Dec 15 16:06:31 2022 -0800 + + btrfs: pass find_free_extent_ctl to allocator tracepoints + + The allocator tracepoints currently have a pile of values from ffe_ctl. + In modifying the allocator and adding more tracepoints, I found myself + adding to the already long argument list of the tracepoints. It makes it + a lot simpler to just send in the ffe_ctl itself. + +Upstream-Status: Backport + +Change-Id: Iab4132a9d3df3a6369591a50fb75374b1e399fa4 +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +--- + include/instrumentation/events/btrfs.h | 60 +++++++++++++++++++++++++- + 1 file changed, 58 insertions(+), 2 deletions(-) + +diff --git a/include/instrumentation/events/btrfs.h b/include/instrumentation/events/btrfs.h +index 01157107..7c7b9b0c 100644 +--- a/include/instrumentation/events/btrfs.h ++++ b/include/instrumentation/events/btrfs.h +@@ -13,6 +13,10 @@ + #include <../fs/btrfs/accessors.h> + #endif + ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0)) ++#include <../fs/btrfs/extent-tree.h> ++#endif ++ + #ifndef _TRACE_BTRFS_DEF_ + #define _TRACE_BTRFS_DEF_ + struct btrfs_root; +@@ -1963,7 +1967,26 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f + + #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \ ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0)) ++LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, ++ ++ btrfs_find_free_extent, ++ ++ TP_PROTO(const struct btrfs_root *root, ++ const struct find_free_extent_ctl *ffe_ctl), ++ ++ TP_ARGS(root, ffe_ctl), ++ ++ TP_FIELDS( ++ ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE) ++ ctf_integer(u64, root_objectid, root->root_key.objectid) ++ ctf_integer(u64, num_bytes, ffe_ctl->num_bytes) ++ ctf_integer(u64, empty_size, ffe_ctl->empty_size) ++ ctf_integer(u64, flags, ffe_ctl->flags) ++ ) ++) ++ ++#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \ + LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \ + LTTNG_KERNEL_RANGE(5,4,78, 5,5,0) || \ + LTTNG_UBUNTU_KERNEL_RANGE(5,8,18,44, 5,9,0,0)) +@@ -2102,7 +2125,40 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, + ) + #endif + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0)) ++LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, ++ ++ TP_PROTO(const struct btrfs_block_group *block_group, ++ const struct find_free_extent_ctl *ffe_ctl), ++ ++ TP_ARGS(block_group, ffe_ctl), ++ ++ TP_FIELDS( ++ ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE) ++ ctf_integer(u64, bg_objectid, block_group->start) ++ ctf_integer(u64, flags, block_group->flags) ++ ctf_integer(u64, start, ffe_ctl->search_start) ++ ctf_integer(u64, len, ffe_ctl->num_bytes) ++ ) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, ++ ++ TP_PROTO(const struct btrfs_block_group *block_group, ++ const struct find_free_extent_ctl *ffe_ctl), ++ ++ TP_ARGS(block_group, ffe_ctl) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, ++ ++ TP_PROTO(const struct btrfs_block_group *block_group, ++ const struct find_free_extent_ctl *ffe_ctl), ++ ++ TP_ARGS(block_group, ffe_ctl) ++) ++ ++#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) + LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, + + TP_PROTO(const struct btrfs_block_group *block_group, u64 start, +-- +2.34.1 + diff --git a/meta/recipes-kernel/lttng/lttng-modules/0004-fix-net-add-location-to-trace_consume_skb-v6.3.patch b/meta/recipes-kernel/lttng/lttng-modules/0004-fix-net-add-location-to-trace_consume_skb-v6.3.patch new file mode 100644 index 0000000000..59d96dc22d --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/0004-fix-net-add-location-to-trace_consume_skb-v6.3.patch @@ -0,0 +1,62 @@ +From 12f43cab7daceff0c73c78276b5a5b9cc1d5056f Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Tue, 7 Mar 2023 11:10:26 -0500 +Subject: [PATCH 4/4] fix: net: add location to trace_consume_skb() (v6.3) + +See upstream commit : + + commit dd1b527831a3ed659afa01b672d8e1f7e6ca95a5 + Author: Eric Dumazet + Date: Thu Feb 16 15:47:18 2023 +0000 + + net: add location to trace_consume_skb() + + kfree_skb() includes the location, it makes sense + to add it to consume_skb() as well. + +Upstream-Status: Backport + +Change-Id: I8d871187d90e7fe113a63e209b00aebe0df475f3 +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +--- + include/instrumentation/events/skb.h | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/include/instrumentation/events/skb.h b/include/instrumentation/events/skb.h +index 186732ea..3c43f32d 100644 +--- a/include/instrumentation/events/skb.h ++++ b/include/instrumentation/events/skb.h +@@ -61,6 +61,21 @@ LTTNG_TRACEPOINT_EVENT_MAP(kfree_skb, + ) + #endif + ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0)) ++LTTNG_TRACEPOINT_EVENT_MAP(consume_skb, ++ ++ skb_consume, ++ ++ TP_PROTO(struct sk_buff *skb, void *location), ++ ++ TP_ARGS(skb, location), ++ ++ TP_FIELDS( ++ ctf_integer_hex(void *, skbaddr, skb) ++ ctf_integer_hex(void *, location, location) ++ ) ++) ++#else + LTTNG_TRACEPOINT_EVENT_MAP(consume_skb, + + skb_consume, +@@ -73,6 +88,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(consume_skb, + ctf_integer_hex(void *, skbaddr, skb) + ) + ) ++#endif + + LTTNG_TRACEPOINT_EVENT(skb_copy_datagram_iovec, + +-- +2.34.1 + diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.13.9.bb b/meta/recipes-kernel/lttng/lttng-modules_2.13.9.bb index a08386b053..5197bf578f 100644 --- a/meta/recipes-kernel/lttng/lttng-modules_2.13.9.bb +++ b/meta/recipes-kernel/lttng/lttng-modules_2.13.9.bb @@ -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