]> git.pld-linux.org Git - packages/lttng-modules.git/blob - git.patch
- fix building for 4.19.312
[packages/lttng-modules.git] / git.patch
1 diff --git a/README.md b/README.md
2 index fc083249..a2716c02 100644
3 --- a/README.md
4 +++ b/README.md
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.
9 +
10 +
11 +Supported versions
12 +------------------
13 +
14 +The LTTng project supports the last two released stable versions
15 +(e.g. stable-2.13 and stable-2.12).
16 +
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
20 +compatibility.
21 +
22 +Security fixes are backported from the master branch to both of the last stable
23 +version and the the second-last stable version.
24 +
25 +New kernel version enablement commits are integrated into the master branch and
26 +backported to the last stable version.
27 +
28 +New features are integrated into the master branch and not backported to the
29 +last stable branch.
30 +
31 +Contacts
32 +--------
33 +
34 +You can contact the maintainers on the following mailing list:
35 +`lttng-dev@lists.lttng.org`.
36 +
37 +IRC channel: [#lttng](irc://irc.oftc.net/lttng) on the OFTC network
38 +
39 +Bug tracker: [LTTng-modules bug tracker](https://bugs.lttng.org/projects/lttng-modules)
40 +
41 +Code review: [_lttng-modules_ project](https://review.lttng.org/q/project:lttng-modules) on LTTng Review
42 +
43 +Continuous integration: [LTTng-modules](https://ci.lttng.org/view/LTTng-modules/) on LTTng's CI
44 +
45 +GitHub mirror: [lttng/lttng-modules](https://github.com/lttng/lttng-modules)
46 +
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,
56  )
57  #endif
58  
59 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
60 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
61 +
62 +LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
63 +
64 +       TP_PROTO(const struct btrfs_root *root, const struct btrfs_inode *inode,
65 +               const struct extent_map *map),
66 +
67 +       TP_ARGS(root, inode, map),
68 +
69 +       TP_FIELDS(
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))
80 +       )
81 +)
82 +
83 +#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
84  
85  LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
86  
87 @@ -1609,7 +1632,42 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
88  )
89  #endif
90  
91 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
92 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
93 +
94 +LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
95 +
96 +       TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map,
97 +                u64 offset, u64 size),
98 +
99 +       TP_ARGS(fs_info, map, offset, size),
100 +
101 +       TP_FIELDS(
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)
108 +       )
109 +)
110 +
111 +LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk,  btrfs_chunk_alloc,
112 +
113 +       TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map,
114 +                u64 offset, u64 size),
115 +
116 +       TP_ARGS(fs_info, map, offset, size)
117 +)
118 +
119 +LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk,  btrfs_chunk_free,
120 +
121 +       TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map,
122 +                u64 offset, u64 size),
123 +
124 +       TP_ARGS(fs_info, map, offset, size)
125 +)
126 +
127 +#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
128  
129  LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
130  
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,
136  
137  #endif /* #else #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0) */
138  
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,
143  
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,
150  )
151  #endif
152  
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),
157 +
158 +       TP_ARGS(inode, len),
159 +
160 +       TP_FIELDS(
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)
164 +       )
165 +)
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,
183         )
184  )
185  
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))
189  
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)
198         )
199  )
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))
203 +
204  LTTNG_TRACEPOINT_EVENT_CLASS(kmem_alloc,
205  
206         TP_PROTO(unsigned long call_site,
207 @@ -141,7 +143,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kmem_alloc, kmem_cache_alloc,
208  )
209  #endif
210  
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))
214 +
215  LTTNG_TRACEPOINT_EVENT_CLASS(kmem_alloc_node,
216  
217         TP_PROTO(unsigned long call_site,
218 @@ -376,7 +380,9 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc, kmem_mm_page_alloc,
219         )
220  )
221  
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))
225 +
226  LTTNG_TRACEPOINT_EVENT_CLASS(kmem_mm_page,
227  
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,
234              TP_ARGS(tsk, delay))
235  #endif
236  
237 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
238 +/*
239 + * Tracepoint for accounting runtime (time the task is executing
240 + * on a CPU).
241 + */
242 +LTTNG_TRACEPOINT_EVENT(sched_stat_runtime,
243 +
244 +       TP_PROTO(struct task_struct *tsk, u64 runtime),
245 +
246 +       TP_ARGS(tsk, runtime),
247 +
248 +       TP_FIELDS(
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)
252 +       )
253 +)
254 +#else
255  /*
256   * Tracepoint for accounting runtime (time the task is executing
257   * on a CPU).
258 @@ -663,6 +681,7 @@ LTTNG_TRACEPOINT_EVENT(sched_stat_runtime,
259                 ctf_integer(u64, vruntime, vruntime)
260         )
261  )
262 +#endif
263  
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,
271  )
272  #endif
273  
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,
278  
279         skb_consume,
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,
285         TP_ARGS(timer)
286  )
287  
288 -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0) || \
289 +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
290 +/**
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
295 + */
296 +LTTNG_TRACEPOINT_EVENT(timer_start,
297 +
298 +       TP_PROTO(struct timer_list *timer, unsigned long bucket_expiry),
299 +
300 +       TP_ARGS(timer, bucket_expiry),
301 +
302 +       TP_FIELDS(
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)
309 +       )
310 +)
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))
313  /**
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)
317         )
318  )
319 -#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
320 +#else
321  /**
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)
326         )
327  )
328 -#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
329 +#endif
330  
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 @@
338  
339  /* SUSE Linux enterprise */
340  
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))
343 +/*
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:
346 + *
347 + * `warning: result of β€˜150400 << 16’ requires 35 bits to represent, but β€˜int’ only has 32 bits`
348 + *
349 + */
350 +#define LTTNG_SLE_VERSION(a, b, c) \
351 +   ((((a * 1ULL) << 16) + (b << 8) + c) * 1ULL)
352  
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))
358  #else
359 -#define LTTNG_SLE_VERSION_CODE         0
360 +#define LTTNG_SLE_VERSION_CODE 0
361  #endif
362  
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))
369 +       ( \
370 +               LTTNG_SLE_VERSION_CODE != 0 && \
371 +               ( \
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)) || \
375 +                       \
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)) || \
381 +                       \
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)) || \
386 +                       \
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)) \
391 +               ))
392  
393  /* Fedora */
394  
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) */
401  
402  
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))
406  static inline
407  unsigned long lttng_get_kretprobe_retaddr(struct kretprobe_instance *ri)
408  {
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
414         SLE_RELEASE_PATCH=0
415  fi
416  
417 -# Combine all update numbers into one
418 -SLE_API_VERSION="$((SLE_RELEASE_MAJOR * 100000 + SLE_RELEASE_MINOR * 100 + SLE_RELEASE_PATCH))"
419 -
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))
428  
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))
434  endif
435  
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);
447 +#else
448         strlcpy(chanb->name, name, NAME_MAX);
449 +#endif
450         memcpy(&chanb->config, config, sizeof(chanb->config));
451  
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 {
458  };
459  
460  
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))
464  
465  #define LTTNG_PART_STRUCT_TYPE struct block_device
466  
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 \
479    echo "warn" ; \
480  else \
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 \
489      echo "warn" ; \
490    else \
This page took 0.153809 seconds and 3 git commands to generate.