From: Florian Weimer <fweimer@redhat.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: libc-alpha@gnu.org
Subject: Re: [PATCH 3/3] Merge tempname ASLR etc. patch from Gnulib
Date: Tue, 23 Aug 2022 09:19:26 +0200 [thread overview]
Message-ID: <875yij5sw1.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20220822205834.563590-3-eggert@cs.ucla.edu> (Paul Eggert's message of "Mon, 22 Aug 2022 15:58:34 -0500")
* Paul Eggert:
> @@ -299,18 +325,16 @@ try_tempname_len (char *tmpl, int suffixlen, void *args,
> {
> if (vdigits == 0)
> {
> - do
> - {
> - v = random_bits (v, use_getrandom);
> - use_getrandom = true;
> - }
> - while (unfair_min <= v);
> + /* Worry about bias only if the bits are high quality. */
> + while (random_bits (&v, v) && biased_min <= v)
> + continue;
Should glibc simply use arc4random_uniform here?
Thanks,
Florian
next prev parent reply other threads:[~2022-08-23 7:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-22 20:58 [PATCH 1/3] Merge _GL_UNUSED C23 " Paul Eggert
2022-08-22 20:58 ` [PATCH 2/3] Merge getopt " Paul Eggert
2022-08-23 7:19 ` Florian Weimer
2022-08-22 20:58 ` [PATCH 3/3] Merge tempname ASLR etc. " Paul Eggert
2022-08-23 7:19 ` Florian Weimer [this message]
2022-08-24 4:15 ` Paul Eggert
2022-08-23 7:16 ` [PATCH 1/3] Merge _GL_UNUSED C23 " Florian Weimer
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=875yij5sw1.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=eggert@cs.ucla.edu \
--cc=libc-alpha@gnu.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).