Rewrite getentropy.
The error handling was a mess, resulting in an infinite loop (and a test timeout) if you actually took the /dev/urandom fallback. I'm also unconvinced that the getrandom(2) path was correct because of the various reasons why we might get a short count back (http://man7.org/linux/man-pages/man2/getrandom.2.html). In this version, the two paths look very similar except for the getrandom(2) failure case, where it's now much clearer that we just give up so that we can boot (http://b/33059407). Bug: http://b/33059407 Bug: http://b/67015565 Test: ran tests on hikey and a ICS Galaxy Nexus Change-Id: Ie715d59b46f7a70bae66943c316168838787b40d
Loading
Please sign in to comment