[DTrace-devel] [PATCH v2] dtprobed: use /proc/$pid/map_files, not the filename of the mapping

Nick Alcock nick.alcock at oracle.com
Thu Feb 12 18:56:12 UTC 2026


On 12 Feb 2026, Kris Van Hees outgrape:

> On Thu, Feb 12, 2026 at 01:49:54PM -0500, Eugene Loh wrote:
>> On 2/12/26 13:43, Kris Van Hees wrote:
>> 
>> > I believe the following on top of the original patch should resolve this:
>> > 
>> > diff --git a/dtprobed/dtprobed.c b/dtprobed/dtprobed.c
>> > index 9a692805..34349deb 100644
>> > --- a/dtprobed/dtprobed.c
>> > +++ b/dtprobed/dtprobed.c
>> > @@ -487,16 +487,17 @@ handle_usdt_notes(pid_t pid, uintptr_t addr)
>> >   		fuse_log(FUSE_LOG_ERR, "%i: dtprobed: cannot look up mapping (process dead?)\n",
>> >   			 pid);
>> >   		goto out;
>> > -	} else if ((fn = Pmap_mapfile_name(P, mapp)) == NULL) {
>> > +	} else if (prf->prf_mapname == NULL ||
>> > +		   (fn = Pmap_mapfile_name(P, mapp)) == NULL) {
>> >   		fuse_log(FUSE_LOG_ERR, "%i: dtprobed: cannot look up mapname (process dead?)\n",
>> >   			 pid);
>> >   		goto out;
>> >   	}
>> > -	mod = strrchr(fn, '/');
>> > +	mod = strrchr(prf->prf_mapname, '/');
>> >   	if (mod)
>> >   		mod++;
>> >   	else
>> > -		mod = fn;
>> 
>> Is that a '-' on the last line?
>
> Yes, but it is missing the last line (sorry about that):
>
> +		mod = prf->prf_mapname;

Given that...

Reviewed-by: Nick Alcock <nick.alcock at oracle.com>

I have *no idea* how this worked when I tested it. The whole testsuite
passed...



More information about the DTrace-devel mailing list