3 ms·
I was 1/2 way through reading your comment and was thinking, "Yeah, but they can use the getrandom() that was ported from OpenBSD", but you obviously beat me to
by SEJeff 8y ago
I was 1/2 way through reading your comment and was thinking, "Yeah, but they can use the getrandom() that was ported from OpenBSD", but you obviously beat me to it. Take your upvote!
- loeg 8y agoOpenBSD's interface is getentropy(), but yeah, basically the same idea! I believe Linux was the second actor and intentionally made getrandom() a superset of the getentropy interface (i.e., no EINTR below 256 bytes). As a result, writing a getentropy() shim around getrandom is feasible; FreeBSD and Linux (glibc) have done so.
- SEJeff 8y agoYes, it was ported from OpenBSD. Ted literally calls it out in the commit: https://lkml.org/lkml/2014/7/17/145 https://lkml.org/lkml/2014/7/17/145