commit 54b0d17df95d779d45511d7ec30623215b9ec11f Author: Jan Rękorajski <bagg...@pld-linux.org> Date: Sun Mar 17 23:31:29 2024 +0100
- pull all fixes from upstream repository git.patch | 490 +++++++++++++++++++++++++++++++++++++++++++++++++++++ lttng-modules.spec | 2 +- 2 files changed, 491 insertions(+), 1 deletion(-) --- diff --git a/lttng-modules.spec b/lttng-modules.spec index ec67a4c..23b6dfe 100644 --- a/lttng-modules.spec +++ b/lttng-modules.spec @@ -18,7 +18,7 @@ Group: Base/Kernel Source0: https://lttng.org/files/lttng-modules/%{pname}-%{version}.tar.bz2 # Source0-md5: 306dc7994fd020e7a21e0c64d42ee95c Patch0: build.patch -Patch1: kernel-strcpy.patch +Patch1: git.patch URL: https://lttng.org/ %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:3.0} %{?with_kernelsrc:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-source >= 3:3.0}} diff --git a/git.patch b/git.patch new file mode 100644 index 0000000..998d7a6 --- /dev/null +++ b/git.patch @@ -0,0 +1,490 @@ +diff --git a/README.md b/README.md +index fc083249..a2716c02 100644 +--- a/README.md ++++ b/README.md +@@ -148,3 +148,45 @@ Each PMU counter has its zero value set when it is attached to a context with + add-context. Therefore, it is normal that the same counters attached to both the + stream context and event context show different values for a given event; what + matters is that they increment at the same rate. ++ ++ ++Supported versions ++------------------ ++ ++The LTTng project supports the last two released stable versions ++(e.g. stable-2.13 and stable-2.12). ++ ++Fixes are backported from the master branch to the last stable version ++unless those fixes would break the ABI or API. Those fixes may be backported ++to the second-last stable version, depending on complexity and ABI/API ++compatibility. ++ ++Security fixes are backported from the master branch to both of the last stable ++version and the the second-last stable version. ++ ++New kernel version enablement commits are integrated into the master branch and ++backported to the last stable version. ++ ++New features are integrated into the master branch and not backported to the ++last stable branch. ++ ++Contacts ++-------- ++ ++You can contact the maintainers on the following mailing list: ++`lttng-...@lists.lttng.org`. ++ ++IRC channel: [#lttng](irc://irc.oftc.net/lttng) on the OFTC network ++ ++Bug tracker: [LTTng-modules bug tracker](https://bugs.lttng.org/projects/lttng-modules) ++ ++Code review: [_lttng-modules_ project](https://review.lttng.org/q/project:lttng-modules) on LTTng Review ++ ++Continuous integration: [LTTng-modules](https://ci.lttng.org/view/LTTng-modules/) on LTTng's CI ++ ++GitHub mirror: [lttng/lttng-modules](https://github.com/lttng/lttng-modules) ++ ++Patches are principally submitted and reviewed on [LTTng Review](https://review.lttng.org), ++but may also be submitted to the [mailing list](mailto:lttng-...@lists.lttng.org) ++with the subject prefix `PATCH lttng-modules` or by pull request on the ++[GitHub mirror](https://github.com/lttng/lttng-modules). +diff --git a/include/instrumentation/events/btrfs.h b/include/instrumentation/events/btrfs.h +index 7c7b9b0c..ffb1b646 100644 +--- a/include/instrumentation/events/btrfs.h ++++ b/include/instrumentation/events/btrfs.h +@@ -177,7 +177,30 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict, + ) + #endif + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0)) ++ ++LTTNG_TRACEPOINT_EVENT(btrfs_get_extent, ++ ++ TP_PROTO(const struct btrfs_root *root, const struct btrfs_inode *inode, ++ const struct extent_map *map), ++ ++ TP_ARGS(root, inode, map), ++ ++ TP_FIELDS( ++ ctf_integer(u64, root_objectid, root->root_key.objectid) ++ ctf_integer(u64, ino, btrfs_ino(inode)) ++ ctf_integer(u64, start, map->start) ++ ctf_integer(u64, len, map->len) ++ ctf_integer(u64, orig_start, map->orig_start) ++ ctf_integer(u64, block_start, map->block_start) ++ ctf_integer(u64, block_len, map->block_len) ++ ctf_integer(unsigned int, flags, map->flags) ++ ctf_integer(int, refs, refcount_read(&map->refs)) ++ ctf_integer(unsigned int, compress_type, extent_map_compression(map)) ++ ) ++) ++ ++#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) + + LTTNG_TRACEPOINT_EVENT(btrfs_get_extent, + +@@ -1609,7 +1632,42 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head, + ) + #endif + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0)) ++ ++LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, ++ ++ TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map, ++ u64 offset, u64 size), ++ ++ TP_ARGS(fs_info, map, offset, size), ++ ++ TP_FIELDS( ++ ctf_integer(int, num_stripes, map->num_stripes) ++ ctf_integer(u64, type, map->type) ++ ctf_integer(int, sub_stripes, map->sub_stripes) ++ ctf_integer(u64, offset, offset) ++ ctf_integer(u64, size, size) ++ ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid) ++ ) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc, ++ ++ TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map, ++ u64 offset, u64 size), ++ ++ TP_ARGS(fs_info, map, offset, size) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free, ++ ++ TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map, ++ u64 offset, u64 size), ++ ++ TP_ARGS(fs_info, map, offset, size) ++) ++ ++#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) + + LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, + +diff --git a/include/instrumentation/events/compaction.h b/include/instrumentation/events/compaction.h +index ecae39a8..67722141 100644 +--- a/include/instrumentation/events/compaction.h ++++ b/include/instrumentation/events/compaction.h +@@ -97,7 +97,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(compaction_isolate_template, + + #endif /* #else #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0) */ + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0)) ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0) || \ ++ LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0)) + LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages, + + compaction_migratepages, +diff --git a/include/instrumentation/events/ext4.h b/include/instrumentation/events/ext4.h +index 222416ec..05a64539 100644 +--- a/include/instrumentation/events/ext4.h ++++ b/include/instrumentation/events/ext4.h +@@ -490,7 +490,19 @@ LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa, + ) + #endif + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0) || \ ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0)) ++LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations, ++ TP_PROTO(struct inode *inode, unsigned int len), ++ ++ TP_ARGS(inode, len), ++ ++ TP_FIELDS( ++ ctf_integer(dev_t, dev, inode->i_sb->s_dev) ++ ctf_integer(ino_t, ino, inode->i_ino) ++ ctf_integer(unsigned int, len, len) ++ ) ++) ++#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0) || \ + LTTNG_KERNEL_RANGE(5,8,6, 5,9,0)) + LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations, + TP_PROTO(struct inode *inode, unsigned int len, unsigned int needed), +diff --git a/include/instrumentation/events/jbd2.h b/include/instrumentation/events/jbd2.h +index 70f9426d..32e6fafe 100644 +--- a/include/instrumentation/events/jbd2.h ++++ b/include/instrumentation/events/jbd2.h +@@ -147,6 +147,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode_data, + || 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) \ ++ || LTTNG_SLE_KERNEL_RANGE(5,14,21,150400,24,46, 5,15,0,0,0,0) \ + || LTTNG_UBUNTU_KERNEL_RANGE(5,19,17,42, 5,19,18,0) \ + || LTTNG_UBUNTU_KERNEL_RANGE(5,19,7,1024, 5,19,8,0)) + LTTNG_TRACEPOINT_EVENT(jbd2_run_stats, +@@ -242,7 +243,8 @@ LTTNG_TRACEPOINT_EVENT(jbd2_cleanup_journal_tail, + ) + ) + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0)) ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0) || \ ++ LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0)) + + #ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM + LTTNG_TRACEPOINT_ENUM(req_op, +diff --git a/include/instrumentation/events/kmem.h b/include/instrumentation/events/kmem.h +index aa9c98d1..f6ce8ac3 100644 +--- a/include/instrumentation/events/kmem.h ++++ b/include/instrumentation/events/kmem.h +@@ -61,7 +61,9 @@ LTTNG_TRACEPOINT_EVENT(kmem_cache_alloc, + (s->flags & SLAB_ACCOUNT)) : false) + ) + ) +-#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0)) ++#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0) || \ ++ LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0)) ++ + LTTNG_TRACEPOINT_EVENT_CLASS(kmem_alloc, + + TP_PROTO(unsigned long call_site, +@@ -141,7 +143,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kmem_alloc, kmem_cache_alloc, + ) + #endif + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0)) ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0) || \ ++ LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0)) ++ + LTTNG_TRACEPOINT_EVENT_CLASS(kmem_alloc_node, + + TP_PROTO(unsigned long call_site, +@@ -376,7 +380,9 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc, kmem_mm_page_alloc, + ) + ) + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,19,0)) ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,19,0) || \ ++ LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0)) ++ + LTTNG_TRACEPOINT_EVENT_CLASS(kmem_mm_page, + + TP_PROTO(struct page *page, unsigned int order, int migratetype, +diff --git a/include/instrumentation/events/sched.h b/include/instrumentation/events/sched.h +index 066a0f8e..24cf37c8 100644 +--- a/include/instrumentation/events/sched.h ++++ b/include/instrumentation/events/sched.h +@@ -646,6 +646,24 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template, sched_stat_blocked, + TP_ARGS(tsk, delay)) + #endif + ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0)) ++/* ++ * Tracepoint for accounting runtime (time the task is executing ++ * on a CPU). ++ */ ++LTTNG_TRACEPOINT_EVENT(sched_stat_runtime, ++ ++ TP_PROTO(struct task_struct *tsk, u64 runtime), ++ ++ TP_ARGS(tsk, runtime), ++ ++ TP_FIELDS( ++ ctf_array_text(char, comm, tsk->comm, TASK_COMM_LEN) ++ ctf_integer(pid_t, tid, tsk->pid) ++ ctf_integer(u64, runtime, runtime) ++ ) ++) ++#else + /* + * Tracepoint for accounting runtime (time the task is executing + * on a CPU). +@@ -663,6 +681,7 @@ LTTNG_TRACEPOINT_EVENT(sched_stat_runtime, + ctf_integer(u64, vruntime, vruntime) + ) + ) ++#endif + + #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0) || \ + LTTNG_RT_KERNEL_RANGE(4,9,27,18, 4,10,0,0) || \ +diff --git a/include/instrumentation/events/skb.h b/include/instrumentation/events/skb.h +index 08704b98..9f1047c6 100644 +--- a/include/instrumentation/events/skb.h ++++ b/include/instrumentation/events/skb.h +@@ -77,7 +77,8 @@ LTTNG_TRACEPOINT_EVENT_MAP(kfree_skb, + ) + #endif + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0)) ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0) || \ ++ LTTNG_RHEL_KERNEL_RANGE(5,14,0,362,0,0, 5,15,0,0,0,0)) + LTTNG_TRACEPOINT_EVENT_MAP(consume_skb, + + skb_consume, +diff --git a/include/instrumentation/events/timer.h b/include/instrumentation/events/timer.h +index 91a2cd93..bd21c037 100644 +--- a/include/instrumentation/events/timer.h ++++ b/include/instrumentation/events/timer.h +@@ -45,7 +45,29 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(timer_class, timer_init, + TP_ARGS(timer) + ) + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0) || \ ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0)) ++/** ++ * timer_start - called when the timer is started ++ * @timer: pointer to struct timer_list ++ * @expires: the timers expiry time ++ * @flags: the timers expiry time ++ */ ++LTTNG_TRACEPOINT_EVENT(timer_start, ++ ++ TP_PROTO(struct timer_list *timer, unsigned long bucket_expiry), ++ ++ TP_ARGS(timer, bucket_expiry), ++ ++ TP_FIELDS( ++ ctf_integer_hex(void *, timer, timer) ++ ctf_integer_hex(void *, function, timer->function) ++ ctf_integer(unsigned long, expires, timer->expires) ++ ctf_integer(unsigned long, bucket_expiry, bucket_expiry) ++ ctf_integer(unsigned long, now, jiffies) ++ ctf_integer(unsigned int, flags, timer->flags) ++ ) ++) ++#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0) || \ + LTTNG_RHEL_KERNEL_RANGE(3,10,0,957,0,0, 3,11,0,0,0,0)) + /** + * timer_start - called when the timer is started +@@ -68,7 +90,7 @@ LTTNG_TRACEPOINT_EVENT(timer_start, + ctf_integer(unsigned int, flags, flags) + ) + ) +-#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */ ++#else + /** + * timer_start - called when the timer is started + * @timer: pointer to struct timer_list +@@ -87,7 +109,7 @@ LTTNG_TRACEPOINT_EVENT(timer_start, + ctf_integer(unsigned long, now, jiffies) + ) + ) +-#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */ ++#endif + + #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0) || \ + LTTNG_RHEL_KERNEL_RANGE(4,18,0,193,0,0, 4,19,0,0,0,0)) +diff --git a/include/lttng/kernel-version.h b/include/lttng/kernel-version.h +index d292c087..cfd21381 100644 +--- a/include/lttng/kernel-version.h ++++ b/include/lttng/kernel-version.h +@@ -127,22 +127,48 @@ + + /* SUSE Linux enterprise */ + +-#define LTTNG_SLE_KERNEL_VERSION(a, b, c, d, e, f) \ +- (((LTTNG_KERNEL_VERSION(a, b, c)) * 100000000ULL) + ((d) * 100000) + ((e) * 100) + (f)) ++/* ++ * SLE major version codes may be large, eg. 150400, and require more than ++ * 32 bits to store. Multiplying `a` by `1ULL` avoids compiler warnings, eg: ++ * ++ * `warning: result of ‘150400 << 16’ requires 35 bits to represent, but ‘int’ only has 32 bits` ++ * ++ */ ++#define LTTNG_SLE_VERSION(a, b, c) \ ++ ((((a * 1ULL) << 16) + (b << 8) + c) * 1ULL) + +-#ifdef SLE_API_VERSION ++#if defined(SLE_API_VERSION_MAJOR) && defined(SLE_API_VERSION_MINOR) && defined(SLE_API_VERSION_PATCH) + #define LTTNG_SLE_VERSION_CODE \ +- ((LTTNG_LINUX_VERSION_CODE * 100000000ULL) + SLE_API_VERSION) ++ (LTTNG_SLE_VERSION(SLE_API_VERSION_MAJOR, SLE_API_VERSION_MINOR, SLE_API_VERSION_PATCH)) + #else +-#define LTTNG_SLE_VERSION_CODE 0 ++#define LTTNG_SLE_VERSION_CODE 0 + #endif + + #define LTTNG_SLE_KERNEL_RANGE(a_low, b_low, c_low, d_low, e_low, f_low, \ + a_high, b_high, c_high, d_high, e_high, f_high) \ +- (LTTNG_SLE_VERSION_CODE >= \ +- LTTNG_SLE_KERNEL_VERSION(a_low, b_low, c_low, d_low, e_low, f_low) && \ +- LTTNG_SLE_VERSION_CODE < \ +- LTTNG_SLE_KERNEL_VERSION(a_high, b_high, c_high, d_high, e_high, f_high)) ++ ( \ ++ LTTNG_SLE_VERSION_CODE != 0 && \ ++ ( \ ++ /* Linux kernel version code exclusive inside range */ \ ++ (LTTNG_LINUX_VERSION_CODE > LTTNG_KERNEL_VERSION(a_low, b_low, c_low) && \ ++ LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(a_high, b_high, c_high)) || \ ++ \ ++ /* Linux kernel version code is at lower and upper limit */ \ ++ (LTTNG_LINUX_VERSION_CODE == LTTNG_KERNEL_VERSION(a_low, b_low, c_low) && \ ++ LTTNG_LINUX_VERSION_CODE == LTTNG_KERNEL_VERSION(a_high, b_high, c_high) && \ ++ LTTNG_SLE_VERSION_CODE >= LTTNG_SLE_VERSION(d_low, e_low, f_low) && \ ++ LTTNG_SLE_VERSION_CODE < LTTNG_SLE_VERSION(d_high, e_high, f_high)) || \ ++ \ ++ /* Linux kernel version code is at lower limit */ \ ++ (LTTNG_LINUX_VERSION_CODE == LTTNG_KERNEL_VERSION(a_low, b_low, c_low) && \ ++ LTTNG_KERNEL_VERSION(a_low, b_low, c_low) != LTTNG_KERNEL_VERSION(a_high, b_high, c_high) && \ ++ LTTNG_SLE_VERSION_CODE >= LTTNG_SLE_VERSION(d_low, e_low, f_low)) || \ ++ \ ++ /* Linux kernel version code is at upper limit */ \ ++ (LTTNG_LINUX_VERSION_CODE == LTTNG_KERNEL_VERSION(a_high, b_high, c_high) && \ ++ LTTNG_KERNEL_VERSION(a_low, b_low, c_low) != LTTNG_KERNEL_VERSION(a_high, b_high, c_high) && \ ++ LTTNG_SLE_VERSION_CODE < LTTNG_SLE_VERSION(d_high, e_high, f_high)) \ ++ )) + + /* Fedora */ + +diff --git a/include/wrapper/kprobes.h b/include/wrapper/kprobes.h +index 51d32b7c..d906bcba 100644 +--- a/include/wrapper/kprobes.h ++++ b/include/wrapper/kprobes.h +@@ -30,7 +30,8 @@ struct kretprobe *lttng_get_kretprobe(struct kretprobe_instance *ri) + #endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) */ + + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0)) ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0) || \ ++ LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0)) + static inline + unsigned long lttng_get_kretprobe_retaddr(struct kretprobe_instance *ri) + { +diff --git a/scripts/abi-sle-version.sh b/scripts/abi-sle-version.sh +index e079e065..9b7da92d 100755 +--- a/scripts/abi-sle-version.sh ++++ b/scripts/abi-sle-version.sh +@@ -37,7 +37,4 @@ if [ "x$SLE_RELEASE_PATCH" = "x" ]; then + SLE_RELEASE_PATCH=0 + fi + +-# Combine all update numbers into one +-SLE_API_VERSION="$((SLE_RELEASE_MAJOR * 100000 + SLE_RELEASE_MINOR * 100 + SLE_RELEASE_PATCH))" +- +-echo ${SLE_API_VERSION} ++echo "${SLE_RELEASE_MAJOR} ${SLE_RELEASE_MINOR} ${SLE_RELEASE_PATCH}" +diff --git a/src/Kbuild.common b/src/Kbuild.common +index f64cb09d..78afa21e 100644 +--- a/src/Kbuild.common ++++ b/src/Kbuild.common +@@ -25,7 +25,9 @@ endif + SLE_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/abi-sle-version.sh $(CURDIR)) + + ifneq ($(SLE_API_VERSION), 0) +- ccflags-y += -DSLE_API_VERSION=$(SLE_API_VERSION) ++ ccflags-y += -DSLE_API_VERSION_MAJOR=$(word 1, $(SLE_API_VERSION)) ++ ccflags-y += -DSLE_API_VERSION_MINOR=$(word 2, $(SLE_API_VERSION)) ++ ccflags-y += -DSLE_API_VERSION_PATCH=$(word 3, $(SLE_API_VERSION)) + endif + + FEDORA_REVISION_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/abi-fedora-version.sh $(CURDIR)) +diff --git a/src/lib/ringbuffer/ring_buffer_backend.c b/src/lib/ringbuffer/ring_buffer_backend.c +index 9a339be0..2181145c 100644 +--- a/src/lib/ringbuffer/ring_buffer_backend.c ++++ b/src/lib/ringbuffer/ring_buffer_backend.c +@@ -405,7 +405,11 @@ int channel_backend_init(struct channel_backend *chanb, + chanb->extra_reader_sb = + (config->mode == RING_BUFFER_OVERWRITE) ? 1 : 0; + chanb->num_subbuf = num_subbuf; ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0)) ++ strscpy(chanb->name, name, NAME_MAX); ++#else + strlcpy(chanb->name, name, NAME_MAX); ++#endif + memcpy(&chanb->config, config, sizeof(chanb->config)); + + if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) { +diff --git a/src/lttng-statedump-impl.c b/src/lttng-statedump-impl.c +index 06088ad2..78dc6d0f 100644 +--- a/src/lttng-statedump-impl.c ++++ b/src/lttng-statedump-impl.c +@@ -197,7 +197,8 @@ enum lttng_process_status { + }; + + +-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0)) ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0) || \ ++ LTTNG_RHEL_KERNEL_RANGE(5,14,0,163,0,0, 5,15,0,0,0,0)) + + #define LTTNG_PART_STRUCT_TYPE struct block_device + +diff --git a/src/probes/Kbuild b/src/probes/Kbuild +index 3dee334f..f8e6e8bd 100644 +--- a/src/probes/Kbuild ++++ b/src/probes/Kbuild +@@ -15,7 +15,8 @@ kmem_dep = $(srctree)/mm/slab.h + kmem_dep_wildcard = $(wildcard $(kmem_dep)) + kmem_dep_check = $(shell \ + if [ \( $(VERSION) -ge 7 \ +- -o \( $(VERSION) -eq 6 -a $(PATCHLEVEL) -ge 0 \) \) -a \ ++ -o \( $(VERSION) -eq 6 -a $(PATCHLEVEL) -ge 0 \) \ ++ -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 14 -a $(RHEL_API_VERSION) -gt 1622301 \) \) -a \ + -z "$(kmem_dep_wildcard)" ] ; then \ + echo "warn" ; \ + else \ +@@ -195,7 +196,8 @@ ifneq ($(CONFIG_COMPACTION),) + compaction_dep_wildcard = $(wildcard $(compaction_dep)) + compaction_dep_check = $(shell \ + if [ \( $(VERSION) -ge 6 \ +- -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \) -a \ ++ -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \ ++ -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 14 -a $(RHEL_API_VERSION) -gt 1622301 \) \) -a \ + -z "$(compaction_dep_wildcard)" ] ; then \ + echo "warn" ; \ + else \ ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/lttng-modules.git/commitdiff/54b0d17df95d779d45511d7ec30623215b9ec11f _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit