[PATCH] Add getrandom implementation [BZ #17252]
Paul Eggert
eggert@cs.ucla.edu
Fri Jun 10 22:00:00 GMT 2016
On 06/10/2016 02:30 PM, Joseph Myers wrote:
> Are we sure we want to keep file descriptors open that the application
> can't use? Is it not valid for applications to close all open file
> descriptors
Yes, it's valid.
How about if we use a simpler implementation instead, one that opens,
reads, and closes /dev/whatever each time getrandom is called? That
would be a bit slower slower but would avoid this problem and probably
other problems.
Performance should not the overriding goal here, as anybody who wants
lots of random numbers efficiently shouldn't be using getrandom,
regardless of whether it is a syscall.
More information about the Libc-alpha
mailing list