[PATCH v2] Add getrandom implementation [BZ #17252]
Florian Weimer
fweimer@redhat.com
Mon Jun 27 15:07:00 GMT 2016
The attached patch does not attempt to make it less likely that the
getrandom emulation will fail. The file descriptor is kept open only
for the duration of the call. I move the declaration to <sys/random.h>
(a new file) and added some documentation.
I kept the protection against symbol interposition. I dropped the
getrandom alias because it would lead to compile failures because
certain forms of autoconf checks would succeed, but compilation would
likely fail because neither <stdlib.h> nor <unistd.h> declare getrandom.
It looks like I have to split all GRND_RANDOM tests into an xtest
because on idle build servers, even the few bytes that are currently
consumed with GRND_RANDOM cause very long blocking, beyond any
reasonable test timeout.
Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getrandom.patch
Type: text/x-patch
Size: 41635 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160627/f50cede7/attachment.bin>
More information about the Libc-alpha
mailing list