Re: Implementing getrandom/getentropy, anybody?

2019-10-31 Thread Andrew Eggenberger
Thanks for the feedback Samuel and Gillem. I've incorporated it into the new patch. I'm not sure if the call to __read_nocancel needs to be tested because read returns -1 on error anyway. Samuel, I plan to send the copyright assignment form tomorrow. Thanks. Andrew >From

Re: Implementing getrandom/getentropy, anybody?

2019-10-31 Thread Samuel Thibault
Hello, Thanks Guillem for the additional review :) Guillem Jover, le jeu. 31 oct. 2019 13:31:58 +0100, a ecrit: > On Tue, 2019-10-29 at 23:28:26 -0500, Andrew Eggenberger wrote: > > + if (flags & GRND_RANDOM){ > > +random_source = "/dev/random"; > > + } > > + > > + fp =

Re: Implementing getrandom/getentropy, anybody?

2019-10-31 Thread Guillem Jover
Hi! On Tue, 2019-10-29 at 23:28:26 -0500, Andrew Eggenberger wrote: > --- /dev/null > +++ b/sysdeps/mach/hurd/getrandom.c > +/* Write up to LENGTH bytes of randomness starting at BUFFER. > + Return the number of bytes written, or -1 on error. */ > +ssize_t > +getrandom (void *buffer, size_t