mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 10:10:41 +00:00
a19d6ce89c
On Unix, instead of getting random data from `/dev/urandom`, it will get it from the `rand` platform agnostic crate instead. OsRng.fill_bytes on unix will make a syscall to getrandom(2) if available, otherwise it will read from `dev/urandom` after a succesful poll to `dev/random`. Regardless of which way a random data is retrieved, if the entropy pool is not intialized, `fill_bytes` will block until it is intialized. This shouldn't be a problem because it is a one time cost. This CL will also upstream the Windows implementation of the rng device. BUG=b:213149162 TEST=built and presubmits Change-Id: Ic017f11795f8006e0bf2a04eb0478b3a3d336507 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3657812 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Richard Zhang <rizhang@google.com> |
||
---|---|---|
.. | ||
aarch64 | ||
arm | ||
x86_64 |