[DTrace-devel] [PATCH v3 18/21] dtprobed: describe purpose

Nick Alcock nick.alcock at oracle.com
Tue Jan 16 21:13:14 UTC 2024


This might help people who look at the source to figure out what dtprobed is
for.  (Its name is somewhat misleading now that it no longer has anything to
do with creating probes: maybe we should rename it to dtdofd or something?)

Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
---
 dtprobed/dtprobed.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/dtprobed/dtprobed.c b/dtprobed/dtprobed.c
index 0e7df7a784d8..72487941a440 100644
--- a/dtprobed/dtprobed.c
+++ b/dtprobed/dtprobed.c
@@ -5,6 +5,19 @@
  * http://oss.oracle.com/licenses/upl.
  */
 
+/*
+ * dtprobed's purpose is simple: listen for ioctls on /dev/dtrace/helper and
+ * keep track of USDT probes live in running processes.  dtrace(1) cannot do
+ * this because it isn't going to be running all the time, and is almost
+ * certainly not going to be running in early boot when most daemons start up.
+ * It records this DOF in the DOF stash under /run/dtrace (see dof_stash.c in
+ * this directory), and also tracks the identity of the probes contained in it.
+ *
+ * The DOF is recorded in a pre-parsed form, and parsed on receipt by a forked
+ * helper jailed by strict-mode seccomp to prevent DOF contributed by hostile
+ * binaries from compromising the system.
+ */
+
 #include <sys/param.h>
 #include <sys/uio.h>
 #include <sys/wait.h>
-- 
2.43.0.272.gce700b77fd




More information about the DTrace-devel mailing list