[PATCH] dtrace: Use deterministic temp file creation for all temp files

Gioele Barabucci gioele@svario.it
Mon Feb 27 17:15:02 GMT 2023


On 27/02/23 17:47, Florian Weimer wrote:
>>> It might be more robust to use a dedicated temporary directory and a
>>> predictable file name under that directory.
>>
>> Doesn't this suffer from the same issue? If dtrace finds that
>> predictable dir/file path it will exit (impeding a second run). Or am
>> I missing something?
> 
> The idea is to use a predictable file name in a temporary directory with
> an unpredictable name (created using mkdtemp or one of the higher-level
> facilities).

You're right, that could work: only the basename is embedded in the ELF 
data, not the full path.

Untested patch attached

-- 
Gioele Barabucci
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-dtrace-Use-directory-random-directory-instead-of-bus.patch
Type: text/x-patch
Size: 2353 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/systemtap/attachments/20230227/9f5b981b/attachment.bin>


More information about the Systemtap mailing list