Messages in this thread | | | From | Bob Beck <> | Date | Thu, 17 Jul 2014 13:56:03 -0600 | Subject | Re: [PATCH, RFC] random: introduce getrandom(2) system call |
| |
Hey Ted, one more nit. Yes, I have a bicycle too..
I see here we add a flag to make it block - whereas it seems most other system calls that can block the flag is added to make it not block (I.E. O_NONBLOCK, etc. etc.) Would it make more sense to invert this so it was more like the typical convention in other system calls?
On Thu, Jul 17, 2014 at 11:34 AM, Theodore Ts'o <tytso@mit.edu> wrote: > On Thu, Jul 17, 2014 at 11:05:01AM -0600, Bob Beck wrote: >> Hi Ted, yeah I understand the reasoning, it would be good if there was >> a way to influence the various libc people to >> ensure they manage to provide a getentropy(). > > I don't anticipate that to be a problem. And before they do, and/or > if you are dealing with a system where the kernel has been upgraded, > but not libc, you have your choice of either sticking with the > binary_sysctl approach, or calling getrandom directly using the > syscall method; and in that case, whether we use getrandom() or > provide an exact getentropy() replacement system call isn't that much > difference, since you'd have to have Linux-specific workaround code > anyway.... > > - Ted
| |