diff options
author | Elliott Hughes <enh@google.com> | 2018-02-02 15:10:32 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2018-02-05 12:57:22 -0800 |
commit | 211c4d35f2a6bea0a3ff1bb1215ec5df9a6115b5 (patch) | |
tree | 711bb56de3483b6dff3aef90109038f40435e612 /libc/malloc_debug/malloc_debug.cpp | |
parent | 12d96ed7f59d1e463df581ad6ec7ccfc87d9ef5d (diff) |
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
Diffstat (limited to 'libc/malloc_debug/malloc_debug.cpp')
0 files changed, 0 insertions, 0 deletions