diff -Nru lttng-modules-2.10.8/debian/changelog lttng-modules-2.10.8/debian/changelog --- lttng-modules-2.10.8/debian/changelog 2020-09-24 14:06:01.000000000 +0000 +++ lttng-modules-2.10.8/debian/changelog 2021-12-07 16:00:39.000000000 +0000 @@ -1,3 +1,11 @@ +lttng-modules (2.10.8-1ubuntu2~18.04.4) bionic; urgency=medium + + * Fix high kernel ABI numbers overflowing version check macros + (LP: #1953522) + - d/p/0016-fix-ubuntu-kernel-version.patch + + -- Stefan Bader Tue, 07 Dec 2021 17:00:39 +0100 + lttng-modules (2.10.8-1ubuntu2~18.04.3) bionic; urgency=medium * Fix writeback_queue_io() modification (LP: #1896781): diff -Nru lttng-modules-2.10.8/debian/patches/0016-fix-ubuntu-kernel-version.patch lttng-modules-2.10.8/debian/patches/0016-fix-ubuntu-kernel-version.patch --- lttng-modules-2.10.8/debian/patches/0016-fix-ubuntu-kernel-version.patch 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.10.8/debian/patches/0016-fix-ubuntu-kernel-version.patch 2021-12-07 16:00:33.000000000 +0000 @@ -0,0 +1,31 @@ +Description: Fix Ubuntu version macros with high sublevel numbers + A stable patch tries to fix an overflow caused by sublevel numbers + greater than 255. This triggered an existing bug in the way lttng + makes Ubuntu versions by shifting the Linux versions by another 8 + bits and then add the ABI number. But for derivatives we use numbers + greater than 1000 which already overflows into sublevel. With sub- + level being the max we even overflow into the minor number which is + fatal. +Author: Stefan Bader +UbuntuBug: https://bugs.launchpad.net/bugs/1953522 +Upstream: no +Last-Updated: 2021-12-07 + +Index: lttng-modules-2.10.8/lttng-kernel-version.h +=================================================================== +--- lttng-modules-2.10.8.orig/lttng-kernel-version.h ++++ lttng-modules-2.10.8/lttng-kernel-version.h +@@ -42,11 +42,11 @@ + /* Ubuntu */ + + #define LTTNG_UBUNTU_KERNEL_VERSION(a, b, c, d) \ +- (((a) << 24) + ((b) << 16) + ((c) << 8) + (d)) ++ (((a) << 32) + ((b) << 24) + ((c) << 16) + (d)) + + #ifdef UTS_UBUNTU_RELEASE_ABI + #define LTTNG_UBUNTU_VERSION_CODE \ +- ((LINUX_VERSION_CODE << 8) + UTS_UBUNTU_RELEASE_ABI) ++ ((LINUX_VERSION_CODE << 16) + UTS_UBUNTU_RELEASE_ABI) + #else + #define LTTNG_UBUNTU_VERSION_CODE 0 + #endif diff -Nru lttng-modules-2.10.8/debian/patches/series lttng-modules-2.10.8/debian/patches/series --- lttng-modules-2.10.8/debian/patches/series 2020-09-24 14:06:01.000000000 +0000 +++ lttng-modules-2.10.8/debian/patches/series 2021-12-07 15:28:09.000000000 +0000 @@ -20,3 +20,4 @@ compat-5.6/0004-Update-Use-vmalloc_sync_mappings-for-stable-kernels.patch compat-5.6/0005-Update-Use-vmalloc_sync_mappings-for-ubuntu.patch compat-5.9/0001-fix-writeback-queue-io.patch +0016-fix-ubuntu-kernel-version.patch