| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rand(3)'s standard C API is extremely limiting, but we can do better
than the historical 32-bit state Park-Miller LCG we've shipped since
2001: r73156.
The justification provided at the time for not using random(3) was that
rand_r(3) could not be made to use the same algorithm. That is still
true. However, the irrelevance of rand_r(3) is increasingly obvious.
Since that time, POSIX has marked the interface obsolescent. rand_r(3)
never became part of the standard C library. If not for API
compatibility reasons, I would just remove rand_r(3) entirely.
So, I do not believe it is a problem for rand_r(3) and rand(3) to
diverge.
The 12 ABI is maintained with compatibility definitions, but this
revision does subtly change the API of rand(3). The sequences of
pseudorandom numbers produced in programs built against new versions of
libc will differ from programs built against prior versions of libc.
Reviewed by: kevans, markm
MFC after: no
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D23290
Notes:
svn path=/head/; revision=357382
|
| |
|
|
| |
Notes:
svn path=/head/; revision=356935
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Relative performance to rand(3) is sort of irrelevant; they do different things
and a user with sensitivity to RNG performance won't use libc random(3) anyway.
The historical note about bad seeding is long obsolete, referring to a 1996 or
earlier version of FreeBSD.
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=346566
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
random.3 is only "better" in contrast to rand.3. Both are non-cryptographic
pseudo-random number generators. The opening blurbs of each's DESCRIPTION
section does emphasize this, and correctly directs unfamiliar developers to
arc4random(3). However, the summary (".Nd" or Name description) of random.3
conflicted in tone and message with that warning.
Resolve the conflict by clarifying in the Nd section that random(3) is
non-cryptographic and pseudo-random. Elide the "better" qualifier which
implied a comparison but did not provide a specific object to contrast.
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=346251
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
POSIX requires that these functions have an unsigned int for their first
argument; not an unsigned long.
My reasoning is that we can safely change these functions without
breaking the ABI. As far as I know, our supported architectures either
use registers for passing function arguments that are at least as big as
long (e.g., amd64), or int and long are of the same size (e.g., i386).
Reviewed by: ache
Differential Revision: https://reviews.freebsd.org/D6644
Notes:
svn path=/head/; revision=303342
|
| |
|
|
|
|
|
| |
currently do.
Notes:
svn path=/head/; revision=301448
|
| |
|
|
|
|
|
|
|
|
|
| |
any applications which need unpredictable random numbers, not merely those
which are cryptographic in nature.
If you work for a lottery and you're using random(3) to select the winning
numbers, please let me know.
Notes:
svn path=/head/; revision=279269
|
| |
|
|
|
|
|
|
| |
NetBSD, OpenBSD, and Android's Bionic number the clauses 1 through 3,
so follow suit to make comparison easier.
Notes:
svn path=/head/; revision=251672
|
| |
|
|
|
|
|
|
|
|
|
| |
source sysctl(KERN_ARND) and remove the fallback code.
Obtained from: OpenBSD
Reviewed by: secteam
MFC after: 1 month
Notes:
svn path=/head/; revision=249035
|
| |
|
|
|
|
|
| |
MFC after: 3 days
Notes:
svn path=/head/; revision=240361
|
| |
|
|
|
|
|
| |
Reminded by: bz@
Notes:
svn path=/head/; revision=240111
|
| |
|
|
|
|
|
| |
cryptographic purposes, and recommend using arc4random(3) instead.
Notes:
svn path=/head/; revision=240107
|
| |
|
|
|
|
|
|
|
|
| |
and random(3).
Submitted by: Valentin Nechayev <netch netch kiev ua>
MFC after: 1 week
Notes:
svn path=/head/; revision=213476
|
| |
|
|
|
|
|
|
|
| |
clause.
# If I've done so improperly on a file, please let me know.
Notes:
svn path=/head/; revision=165903
|
| |
|
|
| |
Notes:
svn path=/head/; revision=140505
|
| |
|
|
| |
Notes:
svn path=/head/; revision=131504
|
| |
|
|
| |
Notes:
svn path=/head/; revision=118248
|
| |
|
|
|
|
|
| |
MFC after: 3 days
Notes:
svn path=/head/; revision=115571
|
| |
|
|
|
|
|
| |
Inspired by comment from: dd
Notes:
svn path=/head/; revision=83206
|
| |
|
|
| |
Notes:
svn path=/head/; revision=79754
|
| |
|
|
| |
Notes:
svn path=/head/; revision=79531
|
| |
|
|
| |
Notes:
svn path=/head/; revision=79454
|
| |
|
|
|
|
|
|
|
| |
PR: 27858
Submitted by: Yoshihiro Koya <Yoshihiro.Koya@math.yokohama-cu.ac.jp>
Approved by: markm
Notes:
svn path=/head/; revision=77850
|
| |
|
|
|
|
|
| |
More libraries manpages updates following.
Notes:
svn path=/head/; revision=59460
|
| |
|
|
| |
Notes:
svn path=/head/; revision=50476
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
track.
The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;
.\" $Id$
.\"
If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.
Approved by: bde
Notes:
svn path=/head/; revision=48794
|
| |
|
|
| |
Notes:
svn path=/head/; revision=34669
|
| |
|
|
|
|
|
|
|
| |
implement (better) falback code inside srandomdev() itself.
Change return type from int to void (binary compatibility surprisely
achieved). Userland code will be changed soon.
Notes:
svn path=/head/; revision=26624
|
| |
|
|
| |
Notes:
svn path=/head/; revision=24390
|
| |
|
|
| |
Notes:
svn path=/head/; revision=24153
|
| |
|
|
| |
Notes:
svn path=/head/; revision=24094
|
| |
|
|
| |
Notes:
svn path=/head/; revision=23969
|
| |
|
|
|
|
|
| |
with the seed. Old variant will be available via libcompat soon.
Notes:
svn path=/head/; revision=18832
|
| |
|
|
|
|
|
|
| |
converted them into .Fn macros where appropriate. Also fixed
up some minor formatting problems.
Notes:
svn path=/head/; revision=14855
|
|
|
Notes:
svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573
|