From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: Re: [PATCH] arc4random: fix getrandom fallback to /dev/urandom
Date: Wed, 3 Apr 2024 14:50:48 -0300 [thread overview]
Message-ID: <9ae90894-3a34-4fcb-8592-2dc500c4479a@linaro.org> (raw)
In-Reply-To: <57bf1728-de5d-4ee5-9d79-ea49ad66a40c@linaro.org>
On 03/04/24 14:48, Adhemerval Zanella Netto wrote:
>
>
> On 03/04/24 14:35, Florian Weimer wrote:
>> * Anthony Iliopoulos:
>>
>>> diff --git a/stdlib/arc4random.c b/stdlib/arc4random.c
>>> index 3ae8fc130234..9b6a6ee85150 100644
>>> --- a/stdlib/arc4random.c
>>> +++ b/stdlib/arc4random.c
>>> @@ -42,7 +42,7 @@ __arc4random_buf (void *p, size_t n)
>>>
>>> for (;;)
>>> {
>>> - l = TEMP_FAILURE_RETRY (__getrandom_nocancel (p, n, 0));
>>> + l = TEMP_FAILURE_RETRY (__getrandom_nocancel_nostatus (p, n, 0));
>>> if (l > 0)
>>> {
>>> if ((size_t) l == n)
>>
>> TEMP_FAILURE_RETRY is incompatible with __getrandom_nocancel_nostatus.
>> You need to check for -EINTR and try again.
>
> It does work, it will return -ENOSYS in this case.
Right, it is need to handle the signal.
prev parent reply other threads:[~2024-04-03 17:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 16:55 Anthony Iliopoulos
2024-04-03 17:26 ` Adhemerval Zanella Netto
2024-04-03 17:35 ` Florian Weimer
2024-04-03 17:48 ` Adhemerval Zanella Netto
2024-04-03 17:50 ` Adhemerval Zanella Netto [this message]
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=9ae90894-3a34-4fcb-8592-2dc500c4479a@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).