From: Kris Van Hees <kris.van.hees@oracle.com>
To: eugene.loh@oracle.com
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [DTrace-devel] [PATCH 03/14] Let USDT module names contain dots
Date: Tue, 4 Jun 2024 16:42:38 -0400 [thread overview]
Message-ID: <Zl98PpyXNh2aSbCL@oracle.com> (raw)
In-Reply-To: <20240604181113.11505-4-eugene.loh@oracle.com>
I do not know what to do with this patch. Either it is correct and then the
code should not be #if 0 .. #endif, or it is not, and then the patch should
not exist.
Consider that the tst.dlclose1.sh test has output like this:
test/unittest/usdt/tst.dlclose1.sh: Running timeout --signal=TERM 41 test/unittest/usdt/tst.dlclose1.sh /home/kvanhees/dtrace-bpf-user/build/dtrace
PASS.
started pid 68990
ID PROVIDER MODULE FUNCTION NAME
97026 test_prov68990 livelib.so go go
So that shows that the module component certain can contain a period (.),
so the module component can certainly contain a period (.) whereas we know
that the function component cannot. Likewise, provider name cannot contain
period as far as I know, nor can the probe name. So, only the module name
seems to be an issue.
On Tue, Jun 04, 2024 at 02:11:02PM -0400, eugene.loh--- via DTrace-devel wrote:
> From: Eugene Loh <eugene.loh@oracle.com>
>
> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
> ---
> dtprobed/dof_stash.c | 5 +++++
> libdtrace/dt_pid.c | 2 ++
> 2 files changed, 7 insertions(+)
>
> diff --git a/dtprobed/dof_stash.c b/dtprobed/dof_stash.c
> index 62418b66..44c67462 100644
> --- a/dtprobed/dof_stash.c
> +++ b/dtprobed/dof_stash.c
> @@ -589,6 +589,10 @@ dof_stash_write_parsed(pid_t pid, dev_t dev, ino_t ino, dt_list_t *accum)
> mod, fun, prb)) == NULL)
> goto err_provider;
>
> +#if 0
> +This does not make any sense. We are checking parsedfn against "." and "..",
> +but parsedfn comes from make_probespec_name(), whose output is of the form
> +"%s:%s:%s:%s" and therefore can never be "." or "..".
> /*
> * Ban "." and ".." as name components. Obviously names
> * containing dots are commonplace (shared libraries,
> @@ -604,6 +608,7 @@ dof_stash_write_parsed(pid_t pid, dev_t dev, ino_t ino, dt_list_t *accum)
> if (strcmp(parsedfn, ".") == 0 ||
> strcmp(parsedfn, "..") == 0)
> goto err_provider;
> +#endif
>
> op = "probe module";
>
> diff --git a/libdtrace/dt_pid.c b/libdtrace/dt_pid.c
> index 7c7d7e30..93a7ce76 100644
> --- a/libdtrace/dt_pid.c
> +++ b/libdtrace/dt_pid.c
> @@ -833,6 +833,7 @@ dt_pid_create_usdt_probes(dtrace_hdl_t *dtp, dt_proc_t *dpr, dtrace_probedesc_t
>
> assert(pvp->impl != NULL && pvp->impl->provide_probe != NULL);
>
> +#if 0
> if (strchr(pdp->prv, '.') != NULL ||
> strchr(pdp->mod, '.') != NULL ||
> strchr(pdp->fun, '.') != NULL ||
> @@ -840,6 +841,7 @@ dt_pid_create_usdt_probes(dtrace_hdl_t *dtp, dt_proc_t *dpr, dtrace_probedesc_t
> dt_dprintf("Probe component contains dots: cannot be a USDT probe.\n");
> return 0;
> }
> +#endif
>
> if (asprintf(&probepath, "%s/probes/%i/%s/%s/%s/%s", dtp->dt_dofstash_path,
> dpr->dpr_pid, pdp->prv[0] == '\0' ? "*" : pdp->prv,
> --
> 2.18.4
>
>
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel@oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel
next prev parent reply other threads:[~2024-06-04 20:42 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-04 18:10 "proof of concept" for systemwide USDT eugene.loh
2024-06-04 18:11 ` [PATCH 01/14] Move comment closer to the code it describes eugene.loh
2024-06-04 18:21 ` [DTrace-devel] " Kris Van Hees
2024-06-04 18:11 ` [PATCH 02/14] Clean up prp/uprp variable names eugene.loh
2024-06-04 18:44 ` [DTrace-devel] " Kris Van Hees
2024-06-05 18:18 ` Eugene Loh
2024-06-04 18:11 ` [PATCH 03/14] Let USDT module names contain dots eugene.loh
2024-06-04 20:42 ` Kris Van Hees [this message]
2024-06-04 22:30 ` [DTrace-devel] " Eugene Loh
2024-06-07 18:48 ` Nick Alcock
2024-06-07 22:22 ` Eugene Loh
2024-06-04 18:11 ` [PATCH 04/14] Track uprobe provider descriptions eugene.loh
2024-06-04 21:10 ` [DTrace-devel] " Kris Van Hees
2024-06-07 21:40 ` Eugene Loh
2024-06-07 22:16 ` Kris Van Hees
2024-06-10 21:23 ` Eugene Loh
2024-06-10 21:31 ` Kris Van Hees
2024-06-04 18:11 ` [PATCH 05/14] Add a hook for a provider-specific "update" function eugene.loh
2024-06-04 21:38 ` [DTrace-devel] " Kris Van Hees
2024-06-10 22:14 ` Eugene Loh
2024-06-04 18:11 ` [PATCH 06/14] Add clauses to per-uprobe list eugene.loh
2024-06-04 18:11 ` [PATCH 07/14] Create the BPF uprobes map eugene.loh
2024-06-05 4:33 ` [DTrace-devel] " Kris Van Hees
2024-06-10 20:55 ` Eugene Loh
2024-06-04 18:11 ` [PATCH 08/14] Use uprobes map to call clauses conditionally eugene.loh
2024-06-04 18:11 ` [PATCH 09/14] Systemwide USDT WIP eugene.loh
2024-06-04 18:11 ` [PATCH 10/14] Fix the consumer's picture of the EPID eugene.loh
2024-06-04 18:11 ` [PATCH 11/14] Back out the previous patch eugene.loh
2024-06-04 18:11 ` [PATCH 12/14] Fix comments that hardwire DBUF_ offsets eugene.loh
2024-06-04 18:11 ` [PATCH 13/14] Clean up some comments eugene.loh
2024-06-04 18:11 ` [PATCH 14/14] Have the consumer get the PRID from the output buffer eugene.loh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zl98PpyXNh2aSbCL@oracle.com \
--to=kris.van.hees@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
--cc=eugene.loh@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox