bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] posix: Improve randomness on try_tempname_len


From: Paul Eggert
Subject: Re: [PATCH 2/2] posix: Improve randomness on try_tempname_len
Date: Mon, 11 Jan 2021 17:06:42 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

On 1/11/21 4:29 AM, Adhemerval Zanella wrote:

The idea is to always issue getrandom for __GT_DIR or __GT_FILE on first try,
as you suggested initially [1]. I followed your idea [2]:... > [1]
https://sourceware.org/pipermail/libc-alpha/2020-September/117535.html
[2] https://sourceware.org/pipermail/libc-alpha/2020-September/117539.html

Ah, thanks, I'd forgotten about that conversation.

I looked at the patch <https://sourceware.org/pipermail/libc-alpha/2021-January/121302.html> again. A couple of small things. First, it uses bool so needs to include stdbool.h. Second, the generated code's a bit smaller if we call random_bits only once. I added those two changes and installed the attached patch to Gnulib master on savannah, with the idea being that Gnulib's tempname.c can be identical to glibc's.

Attachment: 0001-tempname-consume-less-entropy.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]