Fix: Add signature check in tracepoint activation
[lttng-ust.git] / liblttng-ust / ltt-events.c
index e42b6de64314c914a1c67908f128e628bd2b1ad1..ce4c2bb01719baab3b8bbf0f52fded018881bfef 100644 (file)
@@ -10,6 +10,7 @@
 
 #define _GNU_SOURCE
 #include <stdio.h>
+#include <endian.h>
 #include <urcu/list.h>
 #include <urcu/hlist.h>
 #include <pthread.h>
@@ -22,7 +23,6 @@
 #include <inttypes.h>
 #include <time.h>
 #include <sys/prctl.h>
-#include <lttng/ust-endian.h>
 #include "clock.h"
 
 #include <urcu-bp.h>
@@ -279,7 +279,7 @@ int pending_probe_fix_events(const struct lttng_event_desc *desc)
                remove_pending_probe(e);
                ret |= __tracepoint_probe_register(name,
                                event->desc->probe_callback,
-                               event);
+                               event, event->desc->signature);
                if (ret)
                        continue;
                event->id = chan->free_event_id++;
@@ -550,7 +550,7 @@ int ltt_event_create(struct ltt_channel *chan,
                if (event->desc) {
                        ret = __tracepoint_probe_register(event_param->name,
                                        event->desc->probe_callback,
-                                       event);
+                                       event, event->desc->signature);
                        if (ret)
                                goto register_error;
                        event->id = chan->free_event_id++;
@@ -1455,3 +1455,16 @@ int ltt_wildcard_disable(struct session_wildcard *wildcard)
        wildcard->enabled = 0;
        return 0;
 }
+
+/*
+ * Take the TLS "fault" in libuuid if dlopen'd, which can take the
+ * dynamic linker mutex, outside of the UST lock, since the UST lock is
+ * taken in constructors, which are called with dynamic linker mutex
+ * held.
+ */
+void lttng_fixup_event_tls(void)
+{
+       unsigned char uuid[37];
+
+       (void) uuid_generate(uuid);
+}
This page took 0.024663 seconds and 4 git commands to generate.