tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: getrandom and getentropy

On Fri, May 01, 2020 at 07:19:09PM +0000, Taylor R Campbell wrote:
> I propose that we additionally adopt getrandom and getentropy, two C
> APIs the world is converging on.  For getentropy, this can be a simple
> userland wrapper in libc; for getrandom, this requires a new path into
> the kernel, and I propose that we adopt getrandom as both a system
> call and a public libc stub, like Linux/glibc and FreeBSD both did.

I don't buy the arguments for getrandom(2) at all. If we have to do
anything at all, IMO it should be getentropy and done. getrandom(2)
seems strongly to be a fix for design issues in the Linux system
initialisation and nothing else. If something specifially has a strong
desire to deal with that, we should support poll support on
/dev/(u)random to allow wake-up after seeing, but this really doesn't
justify a system call to me.


Home | Main Index | Thread Index | Old Index