Page MenuHomeFreeBSD

D34150.1776903604.diff
No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None

D34150.1776903604.diff

Index: sys/dev/random/fenestrasX/fx_pool.c
===================================================================
--- sys/dev/random/fenestrasX/fx_pool.c
+++ sys/dev/random/fenestrasX/fx_pool.c
@@ -158,6 +158,9 @@
[RANDOM_SWI] = {
.entc_cls = &fxrng_lo_push,
},
+ [RANDOM_CALLOUT] = {
+ .entc_cls = &fxrng_lo_push,
+ },
[RANDOM_FS_ATIME] = {
.entc_cls = &fxrng_lo_push,
},
Index: sys/dev/random/random_harvestq.c
===================================================================
--- sys/dev/random/random_harvestq.c
+++ sys/dev/random/random_harvestq.c
@@ -348,6 +348,7 @@
[RANDOM_NET_NG] = "NET_NG",
[RANDOM_INTERRUPT] = "INTERRUPT",
[RANDOM_SWI] = "SWI",
+ [RANDOM_CALLOUT] = "CALLOUT",
[RANDOM_FS_ATIME] = "FS_ATIME",
[RANDOM_UMA] = "UMA", /* ENVIRONMENTAL_END */
[RANDOM_PURE_OCTEON] = "PURE_OCTEON", /* PURE_START */
Index: sys/kern/kern_timeout.c
===================================================================
--- sys/kern/kern_timeout.c
+++ sys/kern/kern_timeout.c
@@ -57,6 +57,7 @@
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/proc.h>
+#include <sys/random.h>
#include <sys/sched.h>
#include <sys/sdt.h>
#include <sys/sleepqueue.h>
@@ -430,6 +431,11 @@
void
callout_process(sbintime_t now)
{
+ struct callout_entropy {
+ struct callout_cpu *cc;
+ struct thread *td;
+ sbintime_t now;
+ } entropy;
struct callout *tmp, *tmpn;
struct callout_cpu *cc;
struct callout_list *sc;
@@ -546,6 +552,12 @@
#endif
if (!TAILQ_EMPTY(&cc->cc_expireq)) {
td = cc->cc_thread;
+
+ entropy.cc = cc;
+ entropy.td = td;
+ entropy.now = now;
+ random_harvest_queue(&entropy, sizeof(entropy), RANDOM_CALLOUT);
+
if (TD_AWAITING_INTR(td)) {
thread_lock_block_wait(td);
THREAD_LOCK_ASSERT(td, MA_OWNED);
Index: sys/sys/random.h
===================================================================
--- sys/sys/random.h
+++ sys/sys/random.h
@@ -84,6 +84,7 @@
RANDOM_NET_NG,
RANDOM_INTERRUPT,
RANDOM_SWI,
+ RANDOM_CALLOUT,
RANDOM_FS_ATIME,
RANDOM_UMA, /* Special!! UMA/SLAB Allocator */
RANDOM_ENVIRONMENTAL_END = RANDOM_UMA,

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 23, 12:20 AM (18 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28412510
Default Alt Text
D34150.1776903604.diff (2 KB)

Event Timeline