Commit Graph

11 Commits

Author SHA1 Message Date
riastradh
0b9df2ad94 Move RND_EXTRACT_{ANY,GOOD} to rndpool.h whose API they are part of. 2015-04-14 13:14:20 +00:00
riastradh
c3178eae02 Make various things now private to kern_rndq.c static. 2015-04-14 13:12:33 +00:00
riastradh
9b39e9c3c6 Sort includes. 2015-04-14 13:03:37 +00:00
riastradh
5c5f06b858 More rnd.h user cleanup. 2015-04-13 22:43:41 +00:00
riastradh
6f03865532 Gather rnd-private declarations into <dev/rnd_private.h>.
Let's try to avoid putting externs in .c files where the compiler
can't check them.
2015-04-13 15:13:50 +00:00
riastradh
2a2eccb11d Move rndpool_(maybe_)extract to rndq, rename to rnd_(try)extract.
Make rnd_extract_data static.
2015-04-13 14:41:06 +00:00
riastradh
9a5673d211 Omit needless define. 2015-04-13 14:30:05 +00:00
riastradh
b1574872b8 Back out the recent rnd stop-gap/stop-gap/stop-gap measures.
This reverts

sys/dev/rnd_private.h -> r1.1
sys/kern/init_main.c -> r1.450
sys/kern/kern_rndq.c -> r1.14
sys/kern/kern_rndsink.c -> r1.2

Parts of these changes will be added back, and the rndsource
callbacks will be fixed to avoid the lock recursion bug that
motivated the stop-gaps in the first place.

ok tls
2013-08-27 19:30:10 +00:00
tls
a92176cb34 Temporary fix for previous: avoid recursion through rnd_wakeup_readers()
when entropy first becomes available.
2013-08-26 23:41:24 +00:00
tls
38648a41ea Attempt to resolve locking issues at kernel startup on platforms with
hardware RNGs using the polling mode of operation:

1) Initialize the rng subsystem soft interrupts as early in kernel startup
   as seems safe (we have no MI guarantee that softints are working at all
   until configure2() returns, AFAICT).

   This should have the rnd subsystem able to process events via softint
   before the network subsystem (a notorious early user of entropy) starts.

2) Remove the shortcut calls to rnd_process_events() from
   rnd_schedule_process(), with the result that until the softint is installed
   rnd_process_events() is a NOP.

3) Directly call rnd_process_events() in rnd_extract_data(),
   rnd_maybe_extract(), and rnd_init_softint().  This should suck up any
   samples actually collected as early as possible.
2013-08-25 21:12:56 +00:00
tls
38f95ba1b7 Remove rnd_extract_data from the public kernel API (it is for use by the
stream generators only).  Clean up some related minor issues.
2011-11-29 03:50:31 +00:00