[DTrace-devel] [PATCH v2 20/23] dtprobed: describe purpose

Nick Alcock nick.alcock at oracle.com
Mon Nov 27 16:47:26 UTC 2023


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 62b1814daf2d..456d1145a2e4 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.42.0.271.g85384428f1




More information about the DTrace-devel mailing list