Page MenuHomeFreeBSD

D20318.id57569.diff
No OneTemporary

D20318.id57569.diff

Index: sys/dev/random/fortuna.c
===================================================================
--- sys/dev/random/fortuna.c
+++ sys/dev/random/fortuna.c
@@ -258,7 +258,6 @@
fortuna_state.fs_pool[pl].fsp_length = MIN(RANDOM_FORTUNA_MAXPOOLSIZE,
fortuna_state.fs_pool[pl].fsp_length +
sizeof(event->he_somecounter) + event->he_size);
- explicit_bzero(event, sizeof(*event));
RANDOM_RESEED_UNLOCK();
}
Index: sys/dev/random/random_harvestq.c
===================================================================
--- sys/dev/random/random_harvestq.c
+++ sys/dev/random/random_harvestq.c
@@ -163,6 +163,7 @@
#if defined(RANDOM_LOADABLE)
RANDOM_CONFIG_S_UNLOCK();
#endif
+ explicit_bzero(event, sizeof(*event));
}
static void
@@ -437,7 +438,6 @@
harvest_context.hc_destination[RANDOM_CACHED]++;
memcpy(event.he_entropy, data + i, sizeof(event.he_entropy));
random_harvestq_fast_process_event(&event);
- explicit_bzero(&event, sizeof(event));
}
explicit_bzero(data, size);
if (bootverbose)
@@ -540,7 +540,6 @@
event.he_destination = harvest_context.hc_destination[origin]++;
memcpy(event.he_entropy, entropy, size);
random_harvestq_fast_process_event(&event);
- explicit_bzero(&event, sizeof(event));
}
void
Index: sys/dev/random/randomdev.c
===================================================================
--- sys/dev/random/randomdev.c
+++ sys/dev/random/randomdev.c
@@ -345,7 +345,6 @@
timestamp = (uint32_t)get_cyclecount();
randomdev_hash_iterate(&hash, &timestamp, sizeof(timestamp));
randomdev_hash_finish(&hash, entropy_data);
- explicit_bzero(&hash, sizeof(hash));
for (i = 0; i < RANDOM_KEYSIZE_WORDS; i += sizeof(event.he_entropy)/sizeof(event.he_entropy[0])) {
event.he_somecounter = (uint32_t)get_cyclecount();
event.he_size = sizeof(event.he_entropy);
@@ -354,6 +353,7 @@
memcpy(event.he_entropy, entropy_data + i, sizeof(event.he_entropy));
p_random_alg_context->ra_event_processor(&event);
}
+ explicit_bzero(&event, sizeof(event));
explicit_bzero(entropy_data, sizeof(entropy_data));
}

File Metadata

Mime Type
text/plain
Expires
Tue, Aug 4, 6:24 AM (14 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35944792
Default Alt Text
D20318.id57569.diff (2 KB)

Event Timeline