Page MenuHomeFreeBSD

D52233.1775489331.diff
No OneTemporary

Size
829 B
Referenced Files
None
Subscribers
None

D52233.1775489331.diff

diff --git a/sys/dev/random/random_harvestq.c b/sys/dev/random/random_harvestq.c
--- a/sys/dev/random/random_harvestq.c
+++ b/sys/dev/random/random_harvestq.c
@@ -343,7 +343,17 @@
{
memset(dst, 0, sizeof(uint32_t) * (HARVESTSIZE + 1));
memcpy(dst, event->he_entropy, event->he_size);
- dst[HARVESTSIZE] = event->he_somecounter;
+ if (event->he_source <= RANDOM_ENVIRONMENTAL_END) {
+ /*
+ * For pure entropy sources the timestamp counter is generally
+ * quite determinstic since samples are taken at regular
+ * intervals, so does not contribute much to the entropy. To
+ * make health tests more effective, exclude it from the sample,
+ * since it might otherwise defeat the health tests in a
+ * scenario where the source is stuck.
+ */
+ dst[HARVESTSIZE] = event->he_somecounter;
+ }
}
static void

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 6, 3:28 PM (2 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28273055
Default Alt Text
D52233.1775489331.diff (829 B)

Event Timeline