<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-openbsd/lib/libc/stdlib, branch master</title>
<subtitle>WireGuard implementation for the OpenBSD kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-openbsd/atom/lib/libc/stdlib?h=master</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-openbsd/atom/lib/libc/stdlib?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/'/>
<updated>2021-03-18T11:16:58Z</updated>
<entry>
<title>Type-cast getpagesize() from int to size_t for the comparison with d.</title>
<updated>2021-03-18T11:16:58Z</updated>
<author>
<name>claudio</name>
<email>claudio@openbsd.org</email>
</author>
<published>2021-03-18T11:16:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=2cb7cdfc213f61a57def00eb11d6dce9bd9d43ed'/>
<id>urn:sha1:2cb7cdfc213f61a57def00eb11d6dce9bd9d43ed</id>
<content type='text'>
getpagesize() will only return positive numbers (there is no negative
page size system) and it can not fail.
Should fix some compiler warnings seen in -portable projects.
OK otto@
</content>
</entry>
<entry>
<title>Change the implementation of the malloc cache to keep lists of</title>
<updated>2021-03-09T07:39:28Z</updated>
<author>
<name>otto</name>
<email>otto@openbsd.org</email>
</author>
<published>2021-03-09T07:39:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=c9c2a8bced2637f49891a0cc87ce149229a8c70e'/>
<id>urn:sha1:c9c2a8bced2637f49891a0cc87ce149229a8c70e</id>
<content type='text'>
regions of a given size.  In snaps for a while, committing since
no issues were reported and a wider audience is good.  ok deraadt@
</content>
</entry>
<entry>
<title>- Make use of the fact that we know how the chunks are aligned, and</title>
<updated>2021-02-25T15:20:18Z</updated>
<author>
<name>otto</name>
<email>otto@openbsd.org</email>
</author>
<published>2021-02-25T15:20:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=19aed9fc1bc211bc77ba2c7c4b875067ff9ef027'/>
<id>urn:sha1:19aed9fc1bc211bc77ba2c7c4b875067ff9ef027</id>
<content type='text'>
write 8 bytes at the time by using a uint64_t pointer. For an
allocation a max of 4 such uint64_t's are written spread over the
allocation. For pages sized and larger, the first page is junked in
such a way.
- Delayed free of a small chunk checks the corresponiding way.
- Pages ending up in the cache are validated upon unmapping or re-use.
In snaps for a while
</content>
</entry>
<entry>
<title>Some people still argue that rand(3) and random(3) have suitable deterministic</title>
<updated>2021-02-12T17:03:51Z</updated>
<author>
<name>deraadt</name>
<email>deraadt@openbsd.org</email>
</author>
<published>2021-02-12T17:03:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=70d9094f4044ec4d667009ef66d835cce8e9a22a'/>
<id>urn:sha1:70d9094f4044ec4d667009ef66d835cce8e9a22a</id>
<content type='text'>
use cases, so explain the situation a bit more.  Since the 80's, I estimate
around 5 algorithm changes, so any chosen seed is unrepeatable UB.

+The deterministic sequence algorithm changed a number of times since
+original development, is underspecified, and should not be relied upon to
+remain consistent between platforms and over time.

ok jmc kettenis
</content>
</entry>
<entry>
<title>mapalign() only handles allocations &gt;= a page; problem found by and ok semarie@</title>
<updated>2020-11-23T15:42:11Z</updated>
<author>
<name>otto</name>
<email>otto@openbsd.org</email>
</author>
<published>2020-11-23T15:42:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=3e142b5f5cb35c8cab23ac0d23ae9bf7223127a6'/>
<id>urn:sha1:3e142b5f5cb35c8cab23ac0d23ae9bf7223127a6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>make fixed-sized fixed-value mib[] arrays be const</title>
<updated>2020-10-12T22:08:32Z</updated>
<author>
<name>deraadt</name>
<email>deraadt@openbsd.org</email>
</author>
<published>2020-10-12T22:08:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=87afc19ed9256ae3cb7c5266911abf02218c2a35'/>
<id>urn:sha1:87afc19ed9256ae3cb7c5266911abf02218c2a35</id>
<content type='text'>
ok guenther tb millert
</content>
</entry>
<entry>
<title>As noted by tb@ previous commit only removed an unused fucntion.</title>
<updated>2020-10-09T16:01:48Z</updated>
<author>
<name>otto</name>
<email>otto@openbsd.org</email>
</author>
<published>2020-10-09T16:01:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=8d0b0dbd89d917f475263e4c5c2c9581814d6b2d'/>
<id>urn:sha1:8d0b0dbd89d917f475263e4c5c2c9581814d6b2d</id>
<content type='text'>
So redo previous commit properly:
Use random value for canary bytes; ok tb@.
</content>
</entry>
<entry>
<title>Use random value for canary bytes; ok tb@</title>
<updated>2020-10-06T06:31:14Z</updated>
<author>
<name>otto</name>
<email>otto@openbsd.org</email>
</author>
<published>2020-10-06T06:31:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=321ee9bbf9f687cededae2103aae9f340ecd1895'/>
<id>urn:sha1:321ee9bbf9f687cededae2103aae9f340ecd1895</id>
<content type='text'>
</content>
</entry>
<entry>
<title>For page-sized and larger allocations do not put the pages we're</title>
<updated>2020-09-06T06:41:03Z</updated>
<author>
<name>otto</name>
<email>otto@openbsd.org</email>
</author>
<published>2020-09-06T06:41:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=ee0eab5e912b130fbf155b303019f57dccd62a6b'/>
<id>urn:sha1:ee0eab5e912b130fbf155b303019f57dccd62a6b</id>
<content type='text'>
shaving off into the cache but unamp them. Pages in the cache get
re-used and then a future grow of the first allocation will be
hampered. Also make realloc a no-op for small shrinkage.
ok deraadt@
</content>
</entry>
<entry>
<title>This patch fixes one bug and one instance of undesirable behaviour.</title>
<updated>2020-05-27T22:25:09Z</updated>
<author>
<name>schwarze</name>
<email>schwarze@openbsd.org</email>
</author>
<published>2020-05-27T22:25:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=0025f5bb9c9be650004db9e38ab09eea44e2b392'/>
<id>urn:sha1:0025f5bb9c9be650004db9e38ab09eea44e2b392</id>
<content type='text'>
The bug, present since 4.4BSD, was that a trailing dash in an option
group, when the dash is not permitted as an option letter, resulted
in the whole option group being returned as an argument, even though
the previous option in the group was already parsed as an option:
OPTS=abc ./getopt-test -a- -c arg  ===&gt;&gt;  OPT(a)ARG(-a-)ARG(-c)ARG(arg).
Instead, treat the dash as an invalid option and continue parsing
options:  ===&gt;&gt;  OPT(a)ERR(?-)OPT(c)ARG(arg).

The undesirable behaviour was that allowing the dash as an option
letter only allowed isolated dashes ("-") and trailing dashes in
groups ("-a-"), but neither middle dashes in groups ("-a-b"), even
though that already partially worked in 4.4BSD, nor leading dashes
in groups ("--a"), even though that works on all other BSDs and on
glibc.  Also, while POSIX does not require that the dash can be
used as an option letter at all, arguably, it encourages that letters
either be fully supported or not supported at all.  It is dubious
whether supporting an option letter in some positions but not in
others can be considered conforming.

This patch makes OpenBSD behaviour identical to FreeBSD and NetBSD,
improves compatibility with glibc (except that glibc does not support
isolated "-"), improves compatibility with DragonFly (except that
DragonFly is buggy when the dash option letter can take an optional
argument but that argument is not present), improves compatibility
with Illumos and Solaris 11 (except those do not support "-" and
mishandle "--a"), and restores 4.4BSD behaviour for "-a-b".  In no
respect i'm aware of is compatibility with any other systems reduced.

For the full rationale, see my mail to tech@
on 30 Mar 2020 14:26:41 +0200.

Part of the problem was originally reported by an anonymous coward
on tech@ on 12 Mar 2020 03:40:24 +0200, additional analysis was
contributed by martijn@, and then the OP sent the final version of
the patch i'm now committing on 17 Mar 2020 19:17:56 +0200.

No licensing problem here because after the commit, the file does
not contain a single word written by the OP.  Also, the OP told me
in private mail that he intends to publish the patch under the ISC
license already contained in the file and that he wishes to be known
by the pseudonym "0xef967c36".

OK martijn@, and no objection when shown on tech@,
but commit delayed to stay clear of the release.
</content>
</entry>
</feed>
