Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support for Linux-specific getrandom call to obtain random data. #75
getrandom is the base implementation for getentropy on Linux. It is also
On systems other than Linux (e.g. Solaris) getentropy is documented as a
Is the performance difference between getentropy and getrandom so much that it warrants another code path?
In the test Jamfile you may want to add explicit cases that force both of the linux implementations to execute in positive and negative test cases to ensure test coverage. Without that, most (maybe all) CI builds will test getrandom and nothing will be testing getentropy any more.
I don't expect performance to be significantly different. The main reasons for this backend are (a) supporting more platforms (glibc < 2.25) and (b) using the more appropriate API for random data generation. As I noted,
I'm not sure it is worth doing. On Linux,
@@ Coverage Diff @@ ## develop #75 +/- ## ======================================== Coverage 78.34% 78.34% ======================================== Files 13 13 Lines 605 605 Branches 156 156 ======================================== Hits 474 474 Misses 17 17 Partials 114 114
Jun 18, 2018
::syscall(SYS_getrandom, buf, size, flags) failed on ubuntu 16.04.1
throws an exception blow:
system kernel info: