This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add getrandom implementation [BZ #17252]


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]