diff options
author | Conrad Meyer <cem@FreeBSD.org> | 2019-12-26 19:41:09 +0000 |
---|---|---|
committer | Conrad Meyer <cem@FreeBSD.org> | 2019-12-26 19:41:09 +0000 |
commit | f3bae413e9d0ee6dd48cab41fc353039d49bbde7 (patch) | |
tree | fb1b04049a78c707e9231e34cffd8a608dee56b9 /sys/dev/oce | |
parent | 3ee1d5bb9dc2db929b19ca59421d197153dbdc08 (diff) | |
download | src-f3bae413e9d0ee6dd48cab41fc353039d49bbde7.tar.gz src-f3bae413e9d0ee6dd48cab41fc353039d49bbde7.zip |
random(9): Deprecate random(9), remove meaningless srandom(9)
srandom(9) is meaningless on SMP systems or any system with, say,
interrupts. One could never rely on random(9) to produce a reproducible
sequence of outputs on the basis of a specific srandom() seed because the
global state was shared by all kernel contexts. As such, removing it is
literally indistinguishable to random(9) consumers (as compared with
retaining it).
Mark random(9) as deprecated and slated for quick removal. This is not to
say we intend to remove all fast, non-cryptographic PRNG(s) in the kernel.
It/they just won't be random(9), as it exists today, in either name or
implementation.
Before random(9) is removed, a replacement will be provided and in-tree
consumers will be converted.
Note that despite the name, the random(9) interface does not bear any
resemblance to random(3). Instead, it is the same crummy 1988 Park-Miller
LCG used in libc rand(3).
Notes
Notes:
svn path=/head/; revision=356097
Diffstat (limited to 'sys/dev/oce')
-rw-r--r-- | sys/dev/oce/oce_mbox.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/dev/oce/oce_mbox.c b/sys/dev/oce/oce_mbox.c index a1926526edbf..05dac5847cb8 100644 --- a/sys/dev/oce/oce_mbox.c +++ b/sys/dev/oce/oce_mbox.c @@ -859,7 +859,6 @@ oce_config_nic_rss(POCE_SOFTC sc, uint32_t if_id, uint16_t enable_rss) fwcmd->params.req.if_id = LE_32(if_id); - srandom(arc4random()); /* random entropy seed */ read_random(fwcmd->params.req.hash, sizeof(fwcmd->params.req.hash)); rc = oce_rss_itbl_init(sc, fwcmd); |