Bump LTTNG_UST_ABI version from 8.1 to 9.0
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 2 Apr 2020 20:57:48 +0000 (16:57 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 15 Apr 2020 16:57:28 +0000 (12:57 -0400)
Ensure an older liblttng-ust communicating with a newer liblttng-ust
will refuse the handshake, so older session daemon do not get to
interact with more recent lttng-ust which implements nested arrays and
sequences.

Introduce LTTNG_UST_ABI_MAJOR_VERSION_OLDEST_COMPATIBLE to allow
liblttng-ust to be backward compatible with a range of major versions.
In this case, liblttng-ust ABI 9.0 is fully backward compatible with
8.x, given that none of the existing ABI in 8.x has changed in 9.0.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/ust-abi.h
liblttng-ust-ctl/ustctl.c

index 461e77c2a92d4bdd13577255b11a979211b94088..a823de542feac84147228e232b76533bcfa06394 100644 (file)
@@ -46,8 +46,9 @@
 #define LTTNG_UST_COMM_MAGIC                   0xC57C57C5
 
 /* Version for ABI between liblttng-ust, sessiond, consumerd */
-#define LTTNG_UST_ABI_MAJOR_VERSION            8
-#define LTTNG_UST_ABI_MINOR_VERSION            1
+#define LTTNG_UST_ABI_MAJOR_VERSION                    9
+#define LTTNG_UST_ABI_MAJOR_VERSION_OLDEST_COMPATIBLE  8
+#define LTTNG_UST_ABI_MINOR_VERSION            0
 
 enum lttng_ust_instrumentation {
        LTTNG_UST_TRACEPOINT            = 0,
index 914ce94ea024c5ace40dccf405cbb5b80ed192be..ea5ab9dc4ed3ce29cd3dad50b1cc16c4bc32167a 100644 (file)
@@ -1854,7 +1854,8 @@ int ustctl_recv_reg_msg(int sock,
        *uint64_t_alignment = reg_msg.uint64_t_alignment;
        *long_alignment = reg_msg.long_alignment;
        memcpy(name, reg_msg.name, LTTNG_UST_ABI_PROCNAME_LEN);
-       if (reg_msg.major != LTTNG_UST_ABI_MAJOR_VERSION) {
+       if (reg_msg.major < LTTNG_UST_ABI_MAJOR_VERSION_OLDEST_COMPATIBLE ||
+                       reg_msg.major > LTTNG_UST_ABI_MAJOR_VERSION) {
                return -LTTNG_UST_ERR_UNSUP_MAJOR;
        }
 
This page took 0.028345 seconds and 4 git commands to generate.