1 diff --git a/README.md b/README.md
2 index fc083249..a2716c02 100644
5 @@ -148,3 +148,45 @@ Each PMU counter has its zero value set when it is attached to a context with
6 add-context. Therefore, it is normal that the same counters attached to both the
7 stream context and event context show different values for a given event; what
8 matters is that they increment at the same rate.
14 +The LTTng project supports the last two released stable versions
15 +(e.g. stable-2.13 and stable-2.12).
17 +Fixes are backported from the master branch to the last stable version
18 +unless those fixes would break the ABI or API. Those fixes may be backported
19 +to the second-last stable version, depending on complexity and ABI/API
22 +Security fixes are backported from the master branch to both of the last stable
23 +version and the the second-last stable version.
25 +New kernel version enablement commits are integrated into the master branch and
26 +backported to the last stable version.
28 +New features are integrated into the master branch and not backported to the
34 +You can contact the maintainers on the following mailing list:
35 +`lttng-dev@lists.lttng.org`.
37 +IRC channel: [#lttng](irc://irc.oftc.net/lttng) on the OFTC network
39 +Bug tracker: [LTTng-modules bug tracker](https://bugs.lttng.org/projects/lttng-modules)
41 +Code review: [_lttng-modules_ project](https://review.lttng.org/q/project:lttng-modules) on LTTng Review
43 +Continuous integration: [LTTng-modules](https://ci.lttng.org/view/LTTng-modules/) on LTTng's CI
45 +GitHub mirror: [lttng/lttng-modules](https://github.com/lttng/lttng-modules)
47 +Patches are principally submitted and reviewed on [LTTng Review](https://review.lttng.org),
48 +but may also be submitted to the [mailing list](mailto:lttng-dev@lists.lttng.org)
49 +with the subject prefix `PATCH lttng-modules` or by pull request on the
50 +[GitHub mirror](https://github.com/lttng/lttng-modules).
51 diff --git a/include/instrumentation/events/btrfs.h b/include/instrumentation/events/btrfs.h
52 index 7c7b9b0c..ffb1b646 100644
53 --- a/include/instrumentation/events/btrfs.h
54 +++ b/include/instrumentation/events/btrfs.h
55 @@ -177,7 +177,30 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
59 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
60 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
62 +LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
64 + TP_PROTO(const struct btrfs_root *root, const struct btrfs_inode *inode,
65 + const struct extent_map *map),
67 + TP_ARGS(root, inode, map),
70 + ctf_integer(u64, root_objectid, root->root_key.objectid)
71 + ctf_integer(u64, ino, btrfs_ino(inode))
72 + ctf_integer(u64, start, map->start)
73 + ctf_integer(u64, len, map->len)
74 + ctf_integer(u64, orig_start, map->orig_start)
75 + ctf_integer(u64, block_start, map->block_start)
76 + ctf_integer(u64, block_len, map->block_len)
77 + ctf_integer(unsigned int, flags, map->flags)
78 + ctf_integer(int, refs, refcount_read(&map->refs))
79 + ctf_integer(unsigned int, compress_type, extent_map_compression(map))
83 +#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
85 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
87 @@ -1609,7 +1632,42 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
91 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
92 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
94 +LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
96 + TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map,
97 + u64 offset, u64 size),
99 + TP_ARGS(fs_info, map, offset, size),
102 + ctf_integer(int, num_stripes, map->num_stripes)
103 + ctf_integer(u64, type, map->type)
104 + ctf_integer(int, sub_stripes, map->sub_stripes)
105 + ctf_integer(u64, offset, offset)
106 + ctf_integer(u64, size, size)
107 + ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid)
111 +LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
113 + TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map,
114 + u64 offset, u64 size),
116 + TP_ARGS(fs_info, map, offset, size)
119 +LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
121 + TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map,
122 + u64 offset, u64 size),
124 + TP_ARGS(fs_info, map, offset, size)
127 +#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
129 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
131 diff --git a/include/instrumentation/events/compaction.h b/include/instrumentation/events/compaction.h
132 index ecae39a8..67722141 100644
133 --- a/include/instrumentation/events/compaction.h
134 +++ b/include/instrumentation/events/compaction.h
135 @@ -97,7 +97,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(compaction_isolate_template,
137 #endif /* #else #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0) */
139 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
140 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0) || \
141 + LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0))
142 LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages,
144 compaction_migratepages,
145 diff --git a/include/instrumentation/events/ext4.h b/include/instrumentation/events/ext4.h
146 index 222416ec..05a64539 100644
147 --- a/include/instrumentation/events/ext4.h
148 +++ b/include/instrumentation/events/ext4.h
149 @@ -490,7 +490,19 @@ LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa,
153 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0) || \
154 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
155 +LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
156 + TP_PROTO(struct inode *inode, unsigned int len),
158 + TP_ARGS(inode, len),
161 + ctf_integer(dev_t, dev, inode->i_sb->s_dev)
162 + ctf_integer(ino_t, ino, inode->i_ino)
163 + ctf_integer(unsigned int, len, len)
166 +#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0) || \
167 LTTNG_KERNEL_RANGE(5,8,6, 5,9,0))
168 LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
169 TP_PROTO(struct inode *inode, unsigned int len, unsigned int needed),
170 diff --git a/include/instrumentation/events/jbd2.h b/include/instrumentation/events/jbd2.h
171 index 70f9426d..32e6fafe 100644
172 --- a/include/instrumentation/events/jbd2.h
173 +++ b/include/instrumentation/events/jbd2.h
174 @@ -147,6 +147,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode_data,
175 || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \
176 || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \
177 || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0) \
178 + || LTTNG_SLE_KERNEL_RANGE(5,14,21,150400,24,46, 5,15,0,0,0,0) \
179 || LTTNG_UBUNTU_KERNEL_RANGE(5,19,17,42, 5,19,18,0) \
180 || LTTNG_UBUNTU_KERNEL_RANGE(5,19,7,1024, 5,19,8,0))
181 LTTNG_TRACEPOINT_EVENT(jbd2_run_stats,
182 @@ -242,7 +243,8 @@ LTTNG_TRACEPOINT_EVENT(jbd2_cleanup_journal_tail,
186 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0))
187 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0) || \
188 + LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0))
190 #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
191 LTTNG_TRACEPOINT_ENUM(req_op,
192 diff --git a/include/instrumentation/events/kmem.h b/include/instrumentation/events/kmem.h
193 index aa9c98d1..f6ce8ac3 100644
194 --- a/include/instrumentation/events/kmem.h
195 +++ b/include/instrumentation/events/kmem.h
196 @@ -61,7 +61,9 @@ LTTNG_TRACEPOINT_EVENT(kmem_cache_alloc,
197 (s->flags & SLAB_ACCOUNT)) : false)
200 -#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0))
201 +#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0) || \
202 + LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0))
204 LTTNG_TRACEPOINT_EVENT_CLASS(kmem_alloc,
206 TP_PROTO(unsigned long call_site,
207 @@ -141,7 +143,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kmem_alloc, kmem_cache_alloc,
211 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0))
212 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0) || \
213 + LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0))
215 LTTNG_TRACEPOINT_EVENT_CLASS(kmem_alloc_node,
217 TP_PROTO(unsigned long call_site,
218 @@ -376,7 +380,9 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc, kmem_mm_page_alloc,
222 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,19,0))
223 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,19,0) || \
224 + LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0))
226 LTTNG_TRACEPOINT_EVENT_CLASS(kmem_mm_page,
228 TP_PROTO(struct page *page, unsigned int order, int migratetype,
229 diff --git a/include/instrumentation/events/sched.h b/include/instrumentation/events/sched.h
230 index 066a0f8e..24cf37c8 100644
231 --- a/include/instrumentation/events/sched.h
232 +++ b/include/instrumentation/events/sched.h
233 @@ -646,6 +646,24 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template, sched_stat_blocked,
237 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
239 + * Tracepoint for accounting runtime (time the task is executing
242 +LTTNG_TRACEPOINT_EVENT(sched_stat_runtime,
244 + TP_PROTO(struct task_struct *tsk, u64 runtime),
246 + TP_ARGS(tsk, runtime),
249 + ctf_array_text(char, comm, tsk->comm, TASK_COMM_LEN)
250 + ctf_integer(pid_t, tid, tsk->pid)
251 + ctf_integer(u64, runtime, runtime)
256 * Tracepoint for accounting runtime (time the task is executing
258 @@ -663,6 +681,7 @@ LTTNG_TRACEPOINT_EVENT(sched_stat_runtime,
259 ctf_integer(u64, vruntime, vruntime)
264 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0) || \
265 LTTNG_RT_KERNEL_RANGE(4,9,27,18, 4,10,0,0) || \
266 diff --git a/include/instrumentation/events/skb.h b/include/instrumentation/events/skb.h
267 index 08704b98..9f1047c6 100644
268 --- a/include/instrumentation/events/skb.h
269 +++ b/include/instrumentation/events/skb.h
270 @@ -77,7 +77,8 @@ LTTNG_TRACEPOINT_EVENT_MAP(kfree_skb,
274 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
275 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0) || \
276 + LTTNG_RHEL_KERNEL_RANGE(5,14,0,362,0,0, 5,15,0,0,0,0))
277 LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
280 diff --git a/include/instrumentation/events/timer.h b/include/instrumentation/events/timer.h
281 index 91a2cd93..bd21c037 100644
282 --- a/include/instrumentation/events/timer.h
283 +++ b/include/instrumentation/events/timer.h
284 @@ -45,7 +45,29 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(timer_class, timer_init,
288 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0) || \
289 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
291 + * timer_start - called when the timer is started
292 + * @timer: pointer to struct timer_list
293 + * @expires: the timers expiry time
294 + * @flags: the timers expiry time
296 +LTTNG_TRACEPOINT_EVENT(timer_start,
298 + TP_PROTO(struct timer_list *timer, unsigned long bucket_expiry),
300 + TP_ARGS(timer, bucket_expiry),
303 + ctf_integer_hex(void *, timer, timer)
304 + ctf_integer_hex(void *, function, timer->function)
305 + ctf_integer(unsigned long, expires, timer->expires)
306 + ctf_integer(unsigned long, bucket_expiry, bucket_expiry)
307 + ctf_integer(unsigned long, now, jiffies)
308 + ctf_integer(unsigned int, flags, timer->flags)
311 +#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0) || \
312 LTTNG_RHEL_KERNEL_RANGE(3,10,0,957,0,0, 3,11,0,0,0,0))
314 * timer_start - called when the timer is started
315 @@ -68,7 +90,7 @@ LTTNG_TRACEPOINT_EVENT(timer_start,
316 ctf_integer(unsigned int, flags, flags)
319 -#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
322 * timer_start - called when the timer is started
323 * @timer: pointer to struct timer_list
324 @@ -87,7 +109,7 @@ LTTNG_TRACEPOINT_EVENT(timer_start,
325 ctf_integer(unsigned long, now, jiffies)
328 -#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
331 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0) || \
332 LTTNG_RHEL_KERNEL_RANGE(4,18,0,193,0,0, 4,19,0,0,0,0))
333 diff --git a/include/lttng/kernel-version.h b/include/lttng/kernel-version.h
334 index d292c087..cfd21381 100644
335 --- a/include/lttng/kernel-version.h
336 +++ b/include/lttng/kernel-version.h
337 @@ -127,22 +127,48 @@
339 /* SUSE Linux enterprise */
341 -#define LTTNG_SLE_KERNEL_VERSION(a, b, c, d, e, f) \
342 - (((LTTNG_KERNEL_VERSION(a, b, c)) * 100000000ULL) + ((d) * 100000) + ((e) * 100) + (f))
344 + * SLE major version codes may be large, eg. 150400, and require more than
345 + * 32 bits to store. Multiplying `a` by `1ULL` avoids compiler warnings, eg:
347 + * `warning: result of β150400 << 16β requires 35 bits to represent, but βintβ only has 32 bits`
350 +#define LTTNG_SLE_VERSION(a, b, c) \
351 + ((((a * 1ULL) << 16) + (b << 8) + c) * 1ULL)
353 -#ifdef SLE_API_VERSION
354 +#if defined(SLE_API_VERSION_MAJOR) && defined(SLE_API_VERSION_MINOR) && defined(SLE_API_VERSION_PATCH)
355 #define LTTNG_SLE_VERSION_CODE \
356 - ((LTTNG_LINUX_VERSION_CODE * 100000000ULL) + SLE_API_VERSION)
357 + (LTTNG_SLE_VERSION(SLE_API_VERSION_MAJOR, SLE_API_VERSION_MINOR, SLE_API_VERSION_PATCH))
359 -#define LTTNG_SLE_VERSION_CODE 0
360 +#define LTTNG_SLE_VERSION_CODE 0
363 #define LTTNG_SLE_KERNEL_RANGE(a_low, b_low, c_low, d_low, e_low, f_low, \
364 a_high, b_high, c_high, d_high, e_high, f_high) \
365 - (LTTNG_SLE_VERSION_CODE >= \
366 - LTTNG_SLE_KERNEL_VERSION(a_low, b_low, c_low, d_low, e_low, f_low) && \
367 - LTTNG_SLE_VERSION_CODE < \
368 - LTTNG_SLE_KERNEL_VERSION(a_high, b_high, c_high, d_high, e_high, f_high))
370 + LTTNG_SLE_VERSION_CODE != 0 && \
372 + /* Linux kernel version code exclusive inside range */ \
373 + (LTTNG_LINUX_VERSION_CODE > LTTNG_KERNEL_VERSION(a_low, b_low, c_low) && \
374 + LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(a_high, b_high, c_high)) || \
376 + /* Linux kernel version code is at lower and upper limit */ \
377 + (LTTNG_LINUX_VERSION_CODE == LTTNG_KERNEL_VERSION(a_low, b_low, c_low) && \
378 + LTTNG_LINUX_VERSION_CODE == LTTNG_KERNEL_VERSION(a_high, b_high, c_high) && \
379 + LTTNG_SLE_VERSION_CODE >= LTTNG_SLE_VERSION(d_low, e_low, f_low) && \
380 + LTTNG_SLE_VERSION_CODE < LTTNG_SLE_VERSION(d_high, e_high, f_high)) || \
382 + /* Linux kernel version code is at lower limit */ \
383 + (LTTNG_LINUX_VERSION_CODE == LTTNG_KERNEL_VERSION(a_low, b_low, c_low) && \
384 + LTTNG_KERNEL_VERSION(a_low, b_low, c_low) != LTTNG_KERNEL_VERSION(a_high, b_high, c_high) && \
385 + LTTNG_SLE_VERSION_CODE >= LTTNG_SLE_VERSION(d_low, e_low, f_low)) || \
387 + /* Linux kernel version code is at upper limit */ \
388 + (LTTNG_LINUX_VERSION_CODE == LTTNG_KERNEL_VERSION(a_high, b_high, c_high) && \
389 + LTTNG_KERNEL_VERSION(a_low, b_low, c_low) != LTTNG_KERNEL_VERSION(a_high, b_high, c_high) && \
390 + LTTNG_SLE_VERSION_CODE < LTTNG_SLE_VERSION(d_high, e_high, f_high)) \
395 diff --git a/include/wrapper/kprobes.h b/include/wrapper/kprobes.h
396 index 51d32b7c..d906bcba 100644
397 --- a/include/wrapper/kprobes.h
398 +++ b/include/wrapper/kprobes.h
399 @@ -30,7 +30,8 @@ struct kretprobe *lttng_get_kretprobe(struct kretprobe_instance *ri)
400 #endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) */
403 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
404 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0) || \
405 + LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0))
407 unsigned long lttng_get_kretprobe_retaddr(struct kretprobe_instance *ri)
409 diff --git a/scripts/abi-sle-version.sh b/scripts/abi-sle-version.sh
410 index e079e065..9b7da92d 100755
411 --- a/scripts/abi-sle-version.sh
412 +++ b/scripts/abi-sle-version.sh
413 @@ -37,7 +37,4 @@ if [ "x$SLE_RELEASE_PATCH" = "x" ]; then
417 -# Combine all update numbers into one
418 -SLE_API_VERSION="$((SLE_RELEASE_MAJOR * 100000 + SLE_RELEASE_MINOR * 100 + SLE_RELEASE_PATCH))"
420 -echo ${SLE_API_VERSION}
421 +echo "${SLE_RELEASE_MAJOR} ${SLE_RELEASE_MINOR} ${SLE_RELEASE_PATCH}"
422 diff --git a/src/Kbuild.common b/src/Kbuild.common
423 index f64cb09d..78afa21e 100644
424 --- a/src/Kbuild.common
425 +++ b/src/Kbuild.common
426 @@ -25,7 +25,9 @@ endif
427 SLE_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/abi-sle-version.sh $(CURDIR))
429 ifneq ($(SLE_API_VERSION), 0)
430 - ccflags-y += -DSLE_API_VERSION=$(SLE_API_VERSION)
431 + ccflags-y += -DSLE_API_VERSION_MAJOR=$(word 1, $(SLE_API_VERSION))
432 + ccflags-y += -DSLE_API_VERSION_MINOR=$(word 2, $(SLE_API_VERSION))
433 + ccflags-y += -DSLE_API_VERSION_PATCH=$(word 3, $(SLE_API_VERSION))
436 FEDORA_REVISION_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/abi-fedora-version.sh $(CURDIR))
437 diff --git a/src/lib/ringbuffer/ring_buffer_backend.c b/src/lib/ringbuffer/ring_buffer_backend.c
438 index 9a339be0..2181145c 100644
439 --- a/src/lib/ringbuffer/ring_buffer_backend.c
440 +++ b/src/lib/ringbuffer/ring_buffer_backend.c
441 @@ -405,7 +405,11 @@ int channel_backend_init(struct channel_backend *chanb,
442 chanb->extra_reader_sb =
443 (config->mode == RING_BUFFER_OVERWRITE) ? 1 : 0;
444 chanb->num_subbuf = num_subbuf;
445 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
446 + strscpy(chanb->name, name, NAME_MAX);
448 strlcpy(chanb->name, name, NAME_MAX);
450 memcpy(&chanb->config, config, sizeof(chanb->config));
452 if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
453 diff --git a/src/lttng-statedump-impl.c b/src/lttng-statedump-impl.c
454 index 06088ad2..78dc6d0f 100644
455 --- a/src/lttng-statedump-impl.c
456 +++ b/src/lttng-statedump-impl.c
457 @@ -197,7 +197,8 @@ enum lttng_process_status {
461 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0))
462 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0) || \
463 + LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0))
465 #define LTTNG_PART_STRUCT_TYPE struct block_device
467 diff --git a/src/probes/Kbuild b/src/probes/Kbuild
468 index 3dee334f..f8e6e8bd 100644
469 --- a/src/probes/Kbuild
470 +++ b/src/probes/Kbuild
471 @@ -15,7 +15,8 @@ kmem_dep = $(srctree)/mm/slab.h
472 kmem_dep_wildcard = $(wildcard $(kmem_dep))
473 kmem_dep_check = $(shell \
474 if [ \( $(VERSION) -ge 7 \
475 - -o \( $(VERSION) -eq 6 -a $(PATCHLEVEL) -ge 0 \) \) -a \
476 + -o \( $(VERSION) -eq 6 -a $(PATCHLEVEL) -ge 0 \) \
477 + -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 14 -a $(RHEL_API_VERSION) -gt 1622301 \) \) -a \
478 -z "$(kmem_dep_wildcard)" ] ; then \
481 @@ -195,7 +196,8 @@ ifneq ($(CONFIG_COMPACTION),)
482 compaction_dep_wildcard = $(wildcard $(compaction_dep))
483 compaction_dep_check = $(shell \
484 if [ \( $(VERSION) -ge 6 \
485 - -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \) -a \
486 + -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \
487 + -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 14 -a $(RHEL_API_VERSION) -gt 1622301 \) \) -a \
488 -z "$(compaction_dep_wildcard)" ] ; then \