Don't print message when waiting for urandom entropy.

This doesn't actually measure what we need(*) and, because of that, it's
way more noisy than expected.

(*) We want to know whether the pool has been initialised, not whether
it currently thinks it has a lot of bits, but we can't get what we want
without getrandom() support in the kernel.

Change-Id: I20accb99a592739c786a25c1656aeea050ae81a3
Reviewed-on: https://boringssl-review.googlesource.com/15624
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
Adam Langley
2017-04-27 21:38:21 +00:00
committed by CQ bot account: commit-bot@chromium.org
parent def85b403d
commit c88f24596c
2 changed files with 1 additions and 13 deletions
-9
View File
@@ -166,7 +166,6 @@ static void init_once(void) {
* continuing. This is automatically handled by getrandom, which requires
* that the entropy pool has been initialised, but for urandom we have to
* poll. */
int first_iteration = 1;
for (;;) {
int entropy_bits;
if (ioctl(fd, RNDGETENTCNT, &entropy_bits)) {
@@ -181,14 +180,6 @@ static void init_once(void) {
break;
}
if (first_iteration) {
message(
"The kernel entropy pool contains too few bits. This process is "
"built in FIPS mode and will block until sufficient entropy is "
"available.\n");
}
first_iteration = 0;
usleep(250000);
}
#endif
+1 -4
View File
@@ -1106,10 +1106,7 @@ func runTest(test *testCase, shimPath string, mallocNumToFail int64) error {
}
if len(extraStderr) > 0 || (!failed && len(stderr) > 0) {
lines := strings.Split(stderr, "\n")
if len(lines) != 2 || lines[1] != "" || !strings.Contains(lines[0], "The kernel entropy pool contains too few bits") {
return fmt.Errorf("unexpected error output:\n%s\n%s", stderr, extraStderr)
}
return fmt.Errorf("unexpected error output:\n%s\n%s", stderr, extraStderr)
}
if *useValgrind && isValgrindError {