uprobe: transmit binary file descritptor through lttng_payload
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 19 Jun 2020 22:44:56 +0000 (18:44 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 27 Jul 2020 20:31:40 +0000 (16:31 -0400)
commite368fb4396b9bdb22de16f0c93512c9f6d7ab0b4
tree885baa86c52f4a1eede1c3b334886ab39ffeb1b9
parentddab38d1659326ae7933319adefc3dff243da352
uprobe: transmit binary file descritptor through lttng_payload

Adapt the userspace probe objects to use the lttng_payload interface.
This streamlines the acquisition of the file descriptors when those
objects are serialized.

File descriptors are transmitted in both directions between liblttng-ctl
and the session daemon making it possible (and safe) to compare
userspace probe instances.

Currently the event listing API does not allow us to express userspace
probe locations that contain a file descriptor. This is an unfortunate
consequence of returning a "flat" array to list events.

Indeed, we can't store a file descriptor in the userspace probe
locations returned to the user in this API since the destructors of the
probe locations are never called. The user simply free()'s the returned
array, which would leak the file descriptors.

The consequence of this is that we can't allow the creation of event
rules using a probe location returned by an lttng_list_events() call.
This is not unsolvable, but I'm not sure if there really is a use-case
for this.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I0f710cbe9deabfd163206fd03618eba183f3d1d2
16 files changed:
include/lttng/userspace-probe-internal.h
src/bin/lttng-relayd/Makefile.am
src/bin/lttng-sessiond/client.c
src/bin/lttng-sessiond/cmd.c
src/bin/lttng-sessiond/cmd.h
src/bin/lttng-sessiond/trace-kernel.c
src/common/payload-view.c
src/common/payload-view.h
src/common/payload.c
src/common/payload.h
src/common/sessiond-comm/sessiond-comm.h
src/common/unix.c
src/common/unix.h
src/common/userspace-probe.c
src/lib/lttng-ctl/lttng-ctl-helper.h
src/lib/lttng-ctl/lttng-ctl.c
This page took 0.037075 seconds and 4 git commands to generate.