<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/lib/libc/stdlib/random.c, branch release/11.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F11.2.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F11.2.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2018-03-29T02:50:57Z</updated>
<entry>
<title>Revert r330897:</title>
<updated>2018-03-29T02:50:57Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-29T02:50:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=4ab2e064d7950be84256d671a7ae93f87cc6aa36'/>
<id>urn:sha1:4ab2e064d7950be84256d671a7ae93f87cc6aa36</id>
<content type='text'>
This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)
</content>
</entry>
<entry>
<title>Partial merge of the SPDX changes</title>
<updated>2018-03-14T03:19:51Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-14T03:19:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=be5d0b9566b13fdf8cabebb63334cbec12bfc409'/>
<id>urn:sha1:be5d0b9566b13fdf8cabebb63334cbec12bfc409</id>
<content type='text'>
These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from:	pfg
</content>
</entry>
<entry>
<title>Micro optimize: C standard guarantees that right shift for unsigned value</title>
<updated>2016-05-29T16:39:28Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2016-05-29T16:39:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=b8ac3f201ddfd20c820ae46f7a96a1b1812b02a4'/>
<id>urn:sha1:b8ac3f201ddfd20c820ae46f7a96a1b1812b02a4</id>
<content type='text'>
fills left bits with zero, and we have exact 32bit unsigned value
(uint32_t), so there is no reason to add "&amp; 0x7fffffff" here.

MFC after:      1 week
</content>
</entry>
<entry>
<title>1) Unifdef USE_WEAK_SEEDING it is too obsolete to support and makes reading</title>
<updated>2016-05-29T11:54:09Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2016-05-29T11:54:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e44ffdb207bdefe1d84dcffeca0bf34cb2f1e024'/>
<id>urn:sha1:e44ffdb207bdefe1d84dcffeca0bf34cb2f1e024</id>
<content type='text'>
harder.

2) ACM paper require seed to be in [1, 2^31-2] range, so use the same range
shifting as already done for rand(3). Also protect srandomdev() + TYPE_0 case
(non default) from negative seeds.

3) Don't check for valid "type" range in setstate(), it is always valid as
calculated. Instead add a check that rear pointer not exceeed end pointer.

MFC after:      1 week
</content>
</entry>
<entry>
<title>1) POSIX prohibits printing errors to stderr here and require</title>
<updated>2016-05-22T06:18:59Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2016-05-22T06:18:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=fbd6b95ef90ca90801c9a1db400ed9288d3eed42'/>
<id>urn:sha1:fbd6b95ef90ca90801c9a1db400ed9288d3eed42</id>
<content type='text'>
returning NULL:

"Upon successful completion, initstate() and setstate() shall return a
pointer to the previous state array; otherwise, a null pointer shall
be returned.

Although some implementations of random() have written messages to
standard error, such implementations do not conform to POSIX.1-2008."

2) Move error detections earlier to prevent state modifying.

MFC after:      1 week
</content>
</entry>
<entry>
<title>Renumber clauses to reduce diffs to other versions</title>
<updated>2013-06-13T00:19:30Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2013-06-13T00:19:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=580b4d185bc1d20da91429229920ce590309cbf6'/>
<id>urn:sha1:580b4d185bc1d20da91429229920ce590309cbf6</id>
<content type='text'>
NetBSD, OpenBSD, and Android's Bionic number the clauses 1 through 3,
so follow suit to make comparison easier.
</content>
</entry>
<entry>
<title>Replace access to /dev/random with the kernel pseudo-random number</title>
<updated>2013-04-02T23:41:20Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2013-04-02T23:41:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=12a6865090ad2f88c671256c53a8fed4d5424424'/>
<id>urn:sha1:12a6865090ad2f88c671256c53a8fed4d5424424</id>
<content type='text'>
source sysctl(KERN_ARND) and remove the fallback code.

Obtained from:	OpenBSD
Reviewed by:	secteam
MFC after:	1 month
</content>
</entry>
<entry>
<title>Remove undefined behavior from sranddev() and</title>
<updated>2012-10-09T14:25:14Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2012-10-09T14:25:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=6a762eb23ea5f31e65cfa12602937f39a14e9b0c'/>
<id>urn:sha1:6a762eb23ea5f31e65cfa12602937f39a14e9b0c</id>
<content type='text'>
srandomdev(). This doesn't actually work
with any modern C compiler:

In particular, both clang and modern gcc
verisons silently elide any xor operation
with 'junk'.

Approved by:	secteam
MFC after:	3 days
</content>
</entry>
<entry>
<title>libc: Use O_CLOEXEC for various internal file descriptors.</title>
<updated>2012-09-29T11:54:34Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2012-09-29T11:54:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=05eb11cbc40a190f73ed1471d97062cabfc37d54'/>
<id>urn:sha1:05eb11cbc40a190f73ed1471d97062cabfc37d54</id>
<content type='text'>
This fixes a race condition where another thread may fork() before CLOEXEC
is set, unintentionally passing the descriptor to the child process.

This commit only adds O_CLOEXEC flags to open() or openat() calls where no
fcntl(fd, F_SETFD, FD_CLOEXEC) follows. The separate fcntl() call still
leaves a race window so it should be fixed later.
</content>
</entry>
<entry>
<title>Slight stylification.</title>
<updated>2012-09-28T13:50:37Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2012-09-28T13:50:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=d7555525584b93f7fd3a0111353d1c8e78fc3e1e'/>
<id>urn:sha1:d7555525584b93f7fd3a0111353d1c8e78fc3e1e</id>
<content type='text'>
</content>
</entry>
</feed>
