Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: [email protected]
Control: affects -1 + src:lttng-modules
User: [email protected]
Usertags: pu

[ Reason ]

The lttng-modules-dkms fails to build at install time with the current
trixie stable kernel (>= 6.12.91).

Tracked in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1147959

[ Impact ]

Can't use lttng kernel tracing with current stable kernel.

[ Tests ]

Tested in a trixie VM with the upstream test suite.

[ Risks ]

Minimal, code change only applies to kernel version that currently fail
to build.


[ Checklist ]
  [*] *all* changes are documented in the d/changelog
  [*] I reviewed all changes and I approve them
  [*] attach debdiff against the package in (old)stable
  [*] the issue is verified as fixed in unstable

[ Changes ]

Add an upstream patch addressing the build failure.
diff -Nru lttng-modules-2.13.18/debian/changelog 
lttng-modules-2.13.18/debian/changelog
--- lttng-modules-2.13.18/debian/changelog      2025-10-07 13:46:28.000000000 
-0400
+++ lttng-modules-2.13.18/debian/changelog      2026-09-15 14:07:50.000000000 
-0400
@@ -1,3 +1,9 @@
+lttng-modules (2.13.18-1+deb13u2) trixie; urgency=medium
+
+  * Add patch to fix build on kernels >= v6.12.91 (Closes: #1147959)
+
+ -- Michael Jeanson <[email protected]>  Tue, 15 Sep 2026 14:07:50 -0400
+
 lttng-modules (2.13.18-1+deb13u1) trixie; urgency=medium
 
   * Fix potential kernel crash with syscall tracing (Closes: ##1117551)
diff -Nru 
lttng-modules-2.13.18/debian/patches/fix-hrtimer-Reduce-trace-noise-in-hrtimer_start-v7.1.patch
 
lttng-modules-2.13.18/debian/patches/fix-hrtimer-Reduce-trace-noise-in-hrtimer_start-v7.1.patch
--- 
lttng-modules-2.13.18/debian/patches/fix-hrtimer-Reduce-trace-noise-in-hrtimer_start-v7.1.patch
     1969-12-31 19:00:00.000000000 -0500
+++ 
lttng-modules-2.13.18/debian/patches/fix-hrtimer-Reduce-trace-noise-in-hrtimer_start-v7.1.patch
     2026-09-15 13:44:55.000000000 -0400
@@ -0,0 +1,102 @@
+From 0be0b37f22477f074f597700b7d7b16dfdedc21e Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <[email protected]>
+Date: Mon, 25 May 2026 10:38:18 -0400
+Subject: [PATCH] fix: hrtimer: Reduce trace noise in hrtimer_start() (v7.1)
+
+See upstream commit:
+
+  commit f2e388a019e4cf83a15883a3d1f1384298e9a6aa
+  Author: Thomas Gleixner <[email protected]>
+  Date:   Tue Feb 24 17:36:59 2026 +0100
+
+    hrtimer: Reduce trace noise in hrtimer_start()
+
+    hrtimer_start() when invoked with an already armed timer traces like:
+
+     <comm>-..   [032] d.h2. 5.002263: hrtimer_cancel: hrtimer= ....
+     <comm>-..   [032] d.h1. 5.002263: hrtimer_start: hrtimer= ....
+
+    Which is incorrect as the timer doesn't get canceled. Just the expiry time
+    changes. The internal dequeue operation which is required for that is not
+    really interesting for trace analysis. But it makes it tedious to keep real
+    cancellations and the above case apart.
+
+    Remove the cancel tracing in hrtimer_start() and add a 'was_armed'
+    indicator to the hrtimer start tracepoint, which clearly indicates what the
+    state of the hrtimer is when hrtimer_start() is invoked:
+
+    <comm>-..   [032] d.h1. 6.200103: hrtimer_start: hrtimer= .... was_armed=0
+     <comm>-..   [032] d.h1. 6.200558: hrtimer_start: hrtimer= .... was_armed=1
+
+Change-Id: I37ee0ae0af665a51fd4f92adffb6b1dcb2ecd9d2
+Signed-off-by: Michael Jeanson <[email protected]>
+Signed-off-by: Mathieu Desnoyers <[email protected]>
+---
+ include/instrumentation/events/timer.h | 40 ++++++++++++++++++++++++--
+ 1 file changed, 38 insertions(+), 2 deletions(-)
+
+diff --git a/include/instrumentation/events/timer.h 
b/include/instrumentation/events/timer.h
+index 9cce7d24..199dffd8 100644
+--- a/include/instrumentation/events/timer.h
++++ b/include/instrumentation/events/timer.h
+@@ -205,12 +205,44 @@ LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_init,
+       )
+ )
+ 
++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(7,1,0) || \
++      LTTNG_KERNEL_RANGE(7,0,10, 7,1,0) || \
++      LTTNG_KERNEL_RANGE(6,18,33, 6,19,0) || \
++      LTTNG_KERNEL_RANGE(6,12,91, 6,13,0) || \
++      LTTNG_KERNEL_RANGE(6,6,141, 6,7,0) || \
++      LTTNG_KERNEL_RANGE(6,1,175, 6,2,0))
+ /**
+  * hrtimer_start - called when the hrtimer is started
+- * @timer: pointer to struct hrtimer
++ * @hrtimer:  pointer to struct hrtimer
++ * @mode:     the hrtimers mode
++ * @was_armed:        Was armed when hrtimer_start*() was invoked
+  */
+-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,16,0) || \
++LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start,
++
++      timer_hrtimer_start,
++
++      TP_PROTO(struct hrtimer *hrtimer, enum hrtimer_mode mode, bool 
was_armed),
++
++      TP_ARGS(hrtimer, mode, was_armed),
++
++      TP_FIELDS(
++              ctf_integer_hex(void *, hrtimer, hrtimer)
++              ctf_integer_hex(void *, function, hrtimer->function)
++              ctf_integer(s64, expires,
++                      lttng_ktime_get_tv64(hrtimer_get_expires(hrtimer)))
++              ctf_integer(s64, softexpires,
++                      lttng_ktime_get_tv64(hrtimer_get_softexpires(hrtimer)))
++              ctf_integer(enum hrtimer_mode, mode, mode)
++              ctf_integer(bool, was_armed, was_armed)
++      )
++)
++#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,16,0) || \
+       LTTNG_RT_KERNEL_RANGE(4,14,0,0, 4,15,0,0))
++/**
++ * hrtimer_start - called when the hrtimer is started
++ * @hrtimer:  pointer to struct hrtimer
++ * @mode:     the hrtimers mode
++ */
+ LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start,
+ 
+       timer_hrtimer_start,
+@@ -230,6 +262,10 @@ LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start,
+       )
+ )
+ #else
++/**
++ * hrtimer_start - called when the hrtimer is started
++ * @hrtimer: pointer to struct hrtimer
++ */
+ LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start,
+ 
+       timer_hrtimer_start,
+-- 
+2.47.3
+
diff -Nru lttng-modules-2.13.18/debian/patches/series 
lttng-modules-2.13.18/debian/patches/series
--- lttng-modules-2.13.18/debian/patches/series 2025-10-07 13:46:28.000000000 
-0400
+++ lttng-modules-2.13.18/debian/patches/series 2026-09-15 13:46:17.000000000 
-0400
@@ -1,2 +1,3 @@
 fix-linux-rt-4.9-sched.patch
 fix-protect-syscall-probes-with-preemption-disable.patch
+fix-hrtimer-Reduce-trace-noise-in-hrtimer_start-v7.1.patch

Reply via email to