fix: UTS_UBUNTU_RELEASE_ABI is close to overflow
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 5 Feb 2021 20:21:55 +0000 (15:21 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 8 Feb 2021 19:11:00 +0000 (14:11 -0500)
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 <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/kernel-version.h

index 38b47cc34e424fc92fb47d82a624b42832461b00..5f388dce11a0257aa4f0aa7062a55e8418e0f6d9 100644 (file)
 /* 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
This page took 0.026205 seconds and 4 git commands to generate.