From: Mathieu Desnoyers Date: Wed, 24 Nov 2021 20:56:16 +0000 (-0500) Subject: Validate channel context mismatch across UST applications X-Git-Tag: v2.12.7~1 X-Git-Url: https://git.liburcu.org/?a=commitdiff_plain;h=0e7b45661dabc88c533f4f322615217410ce68db;hp=0e7b45661dabc88c533f4f322615217410ce68db;p=lttng-tools.git Validate channel context mismatch across UST applications Observed issue ============== Applications traced with LTTng-UST are expected to all provide the exact same layout for their channel's context fields, else it leads to corrupted traces. This is only enforced within LTTng-UST. There is nothing in the session daemon that prevents this scenario, and it is only observable when reading the corrupted trace. This makes the entire trace unreadable from the point where it is corrupted. Cause ===== Even though LTTng-UST sends the entire description of its context fields along with the channel registration notification, there is no validation of the context fields' content against the context fields present in the ust registry. Solution ======== Validate each registered UST channel context fields against the fields present in the registry. Reject the application if there is a mismatch. Known drawbacks =============== None. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau Change-Id: I8b49032bf4f766e549dfccfafdce8cddcbb2873f ---