[PATCH] stdlib: Consolidate getentropy and adapt to POSIX 2024 semantics

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Mon Mar 24 12:16:23 GMT 2025



On 24/03/25 07:19, Florian Weimer wrote:
> * Cristian Rodríguez:
> 
>> Are we sure all this error handling is actually necessary or correct?
>>  I know the manual pages are outdated and do not reflect the state of
>> things post Jason massive RNG rework..
>> But at least the previous implementation promised on reads <= 256 not
>> to short read, always return at least that amount of bytes, so in
>> theory returning 0 or EINTR is/was not possible with 0 flags.
> 
> Most Linux systems do not use the upstream random driver, but modified
> versions of it.

Also we still support older kernels that might not have the /dev/random
fixes done on Linux 4.18 to always provides 256 bytes or entropy 
(/proc/sys/kernel/random/entropy_avail).


More information about the Libc-alpha mailing list