freebsd-dev/sys/libkern
Lawrence Stewart dbbf3e3f37 random(9): Restore historical [0,2^31-1] output range and related man
documention.

Commit SVN r364219 / Git 8a0edc914f changed random(9) to be a shim around
prng32(9) and inadvertently caused random(9) to begin returning numbers in the
range [0,2^32-1] instead of [0,2^31-1], where the latter has been the documented
range for decades.

The increased output range has been identified as the source of numerous bugs in
code written against the historical output range e.g. ipfw "prob" rules and
stats(3) are known to be affected, and a non-exhaustive audit of the tree
identified other random(9) consumers which are also likely affected.

As random(9) is deprecated and slated for eventual removal in 14.0, consumers
should gradually be audited and migrated to prng(9).

Submitted by:		Loic Prylli <lprylli@netflix.com>
Obtained from:		Netflix
Reviewed by:		cem, delphij, imp
MFC after:		1 day
MFC to:			stable/13, releng/13.0
Differential Revision:	https://reviews.freebsd.org/D29385
2021-03-24 16:14:58 +11:00
..
arm Remove obsolete code gated on _ARM_ARCH_* 2021-01-28 10:41:45 +00:00
arm64
x86 Separate kernel crc32() implementation to its own header (gsb_crc32.h) and 2019-06-17 19:49:08 +00:00
arc4random_uniform.c libkern: Add arc4random_uniform 2020-05-23 17:51:06 +00:00
arc4random.c arc4random(9): Integrate with RANDOM_FENESTRASX push-reseed 2020-10-10 21:48:06 +00:00
ashldi3.c
ashrdi3.c
asprintf.c Implement asprintf in libkern 2015-03-01 00:22:16 +00:00
bcd.c
bcmp.c Use __builtin for various mem* and b* (e.g. bzero) routines. 2018-06-02 18:03:35 +00:00
bcopy.c libkern: clean up empty lines in .c and .h files 2020-09-01 21:25:23 +00:00
bsearch.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
cmpdi2.c
divdi3.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
explicit_bzero.c
ffs.c
ffsl.c
ffsll.c
fls.c
flsl.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
flsll.c
fnmatch.c
gsb_crc32.c tests/sys/kern/crc32: Check for SSE4.2 before using it 2021-02-02 09:53:39 +00:00
iconv_converter_if.m
iconv_ucs.c libkern: clean up empty lines in .c and .h files 2020-09-01 21:25:23 +00:00
iconv_xlat16.c libkern: clean up empty lines in .c and .h files 2020-09-01 21:25:23 +00:00
iconv_xlat.c
iconv.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
inet_aton.c libkern: clean up empty lines in .c and .h files 2020-09-01 21:25:23 +00:00
inet_ntoa.c libkern: clean up empty lines in .c and .h files 2020-09-01 21:25:23 +00:00
inet_ntop.c
inet_pton.c Remove pre-FreeBSD 7.0 compatibility. 2019-07-19 18:38:47 +00:00
jenkins_hash.c s/ is is / is /g 2012-09-14 22:00:03 +00:00
lshrdi3.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
mcount.c libkern: clean up empty lines in .c and .h files 2020-09-01 21:25:23 +00:00
memcchr.c
memchr.c
memcmp.c
memmem.c
memset.c
moddi3.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
murmur3_32.c libkern: clean up empty lines in .c and .h files 2020-09-01 21:25:23 +00:00
qdivrem.c
qsort_r.c
qsort.c
quad.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
random.c random(9): Restore historical [0,2^31-1] output range and related man 2021-03-24 16:14:58 +11:00
scanc.c
strcasecmp.c spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
strcasestr.c libkern/strcasestr.c: Drop xlocale support and connect to build. 2021-01-08 02:18:42 +03:00
strcat.c
strchr.c str(r)chr: Replace union abuse with __DECONST 2018-06-04 18:47:14 +00:00
strchrnul.c libkern: Implement strchrnul(3) 2019-08-19 22:53:05 +00:00
strcmp.c Port the NetBSD KCSAN runtime to FreeBSD. 2019-11-21 11:22:08 +00:00
strcpy.c Port the NetBSD KCSAN runtime to FreeBSD. 2019-11-21 11:22:08 +00:00
strcspn.c
strdup.c
strlcat.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
strlcpy.c
strlen.c Restore the augmented strlen commentary 2021-02-08 19:15:21 +00:00
strncat.c
strncmp.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
strncpy.c
strndup.c Bring in the new automounter, similar to what's provided in most other 2014-08-17 09:44:42 +00:00
strnlen.c
strrchr.c
strsep.c
strspn.c
strstr.c
strtol.c
strtoq.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
strtoul.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
strtouq.c
strvalid.c
timingsafe_bcmp.c
ucmpdi2.c libkern: clean up empty lines in .c and .h files 2020-09-01 21:25:23 +00:00
udivdi3.c
umoddi3.c