From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: Re: [PATCH] malloc: Fix clobbered errno when getrandom failed [BZ #29624]
Date: Thu, 29 Sep 2022 10:25:39 -0300 [thread overview]
Message-ID: <135a1020-b8b4-3502-10fa-8373d3ed67f6@linaro.org> (raw)
In-Reply-To: <AS4PR08MB79018834DCA496D0B5F2369083579@AS4PR08MB7901.eurprd08.prod.outlook.com>
On 29/09/22 09:42, Wilco Dijkstra via Libc-alpha wrote:
> Hi,
>
> Also note the getrandom syscall is redundant since random_bits uses
> clock_gettime. There is no need for a cryptographic random number here,
> so the syscall can be removed.
It will be a syscall on some architecture anyway (although very unlikely
to fail). But I agree it make sense to use random_bits here.
>
> And in places where we do want to use getrandom, it makes sense to
> wrap the syscall so that we avoid introducing this bug in more places.
Yeah, I will send a patch to fix both issues.
next prev parent reply other threads:[~2022-09-29 13:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-29 12:42 Wilco Dijkstra
2022-09-29 13:25 ` Adhemerval Zanella Netto [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-09-29 8:33 Yu Chien Peter Lin
2022-09-29 10:00 ` 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=135a1020-b8b4-3502-10fa-8373d3ed67f6@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.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).