From af59031181f353ba1b46d2a085fcb9b74c69c170 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 5 Feb 2021 15:21:55 -0500 Subject: [PATCH] fix: UTS_UBUNTU_RELEASE_ABI is close to overflow We allocated only 8bits for UTS_UBUNTU_RELEASE_ABI in LTTNG_UBUNTU_KERNEL_VERSION, the current Xenial kernel has an ABI of 207 which is getting close to 256. Bump it to 16bits to avoid breakage in the future. Change-Id: Iee99757bb28cdd958b044b31df3232b9f8816873 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- include/lttng/kernel-version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/lttng/kernel-version.h b/include/lttng/kernel-version.h index 38b47cc3..5f388dce 100644 --- a/include/lttng/kernel-version.h +++ b/include/lttng/kernel-version.h @@ -70,11 +70,11 @@ /* Ubuntu */ #define LTTNG_UBUNTU_KERNEL_VERSION(a, b, c, d) \ - (((LTTNG_KERNEL_VERSION(a, b, c)) << 8) + (d)) + (((LTTNG_KERNEL_VERSION(a, b, c)) << 16) + (d)) #ifdef UTS_UBUNTU_RELEASE_ABI #define LTTNG_UBUNTU_VERSION_CODE \ - ((LTTNG_LINUX_VERSION_CODE << 8) + UTS_UBUNTU_RELEASE_ABI) + ((LTTNG_LINUX_VERSION_CODE << 16) + UTS_UBUNTU_RELEASE_ABI) #else #define LTTNG_UBUNTU_VERSION_CODE 0 #endif -- 2.34.1