Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142721432
D52233.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
829 B
Referenced Files
None
Subscribers
None
D52233.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 23, 4:31 PM (5 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27887571
Default Alt Text
D52233.diff (829 B)
Attached To
Mode
D52233: random: Exclude the timestamp from healthtest for pure sources
Attached
Detach File
Event Timeline
Log In to Comment