[PATCH v2] stdlib: Consolidate getentropy and adapt to POSIX 2024 semantics
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Thu Mar 27 15:16:53 GMT 2025
On 27/03/25 11:29, Andreas Schwab wrote:
> On Mär 27 2025, Adhemerval Zanella wrote:
>
>> 2. There is no defined error if no entropy could be obtained.
>> It means that the function should not fail.
>
> The standard says:
>
> The getentropy() function may fail if:
>
> [ENOSYS]
> The system does not provide the necessary source of entropy.
>
The code still returns ENOSYS if getrandom() is not supported. The question
is how to handle unexpected getrandom() issues (which should be possible
in theory). Should I change to just return ENOSYS in this case?
More information about the Libc-alpha
mailing list