<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-openbsd/sys/kern, branch jd/queueboosts</title>
<subtitle>WireGuard implementation for the OpenBSD kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-openbsd/atom/sys/kern?h=jd%2Fqueueboosts</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-openbsd/atom/sys/kern?h=jd%2Fqueueboosts'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/'/>
<updated>2020-06-23T01:40:03Z</updated>
<entry>
<title>add intrmap_one, some temp code to help us write pci_intr_establish_cpu.</title>
<updated>2020-06-23T01:40:03Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2020-06-23T01:40:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=f90eedca1997d2d936d5eda120168facc50b725b'/>
<id>urn:sha1:f90eedca1997d2d936d5eda120168facc50b725b</id>
<content type='text'>
it means we can do quick hacks to existing drivers to test interrupts
on multiple cpus. emphasis on quick and hacks.

ok jmatthew@, who will also ok the removal of it at the right time.
</content>
</entry>
<entry>
<title>timecounting: add gettime(9), getuptime(9)</title>
<updated>2020-06-22T21:16:07Z</updated>
<author>
<name>cheloha</name>
<email>cheloha@openbsd.org</email>
</author>
<published>2020-06-22T21:16:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=8dca5d44636110d0ff0cfe71785c8f18da7ca99e'/>
<id>urn:sha1:8dca5d44636110d0ff0cfe71785c8f18da7ca99e</id>
<content type='text'>
time_second and time_uptime are used widely in the tree.  This is a
problem on 32-bit platforms because time_t is 64-bit, so there is a
potential split-read whenever they are used at or below IPL_CLOCK.

Here are two replacement interfaces: gettime(9) and getuptime(9).
The "get" prefix signifies that they do not read the hardware
timecounter, i.e. they are fast and low-res.  The lack of a unit
(e.g. micro, nano) signifies that they yield a plain time_t.

As an optimization on LP64 platforms we can just return time_second or
time_uptime, as a single read is atomic.  On 32-bit platforms we need
to do the lockless read loop and get the values from the timecounter.

In a subsequent diff these will be substituted for time_second and
time_uptime almost everywhere in the kernel.

With input from visa@ and dlg@.

ok kettenis@
</content>
</entry>
<entry>
<title>inittodr(9): introduce dedicated flag to enable writes from resettodr(9)</title>
<updated>2020-06-22T18:25:57Z</updated>
<author>
<name>cheloha</name>
<email>cheloha@openbsd.org</email>
</author>
<published>2020-06-22T18:25:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=bf2d84a07eb2512358d130f21cd3f3c03b4c2d28'/>
<id>urn:sha1:bf2d84a07eb2512358d130f21cd3f3c03b4c2d28</id>
<content type='text'>
We don't want resettodr(9) to write the RTC until inittodr(9) has
actually run.  Until inittodr(9) calls tc_setclock() the system UTC
clock will contain a meaningless value and there's no sense in
overwriting a good value with a value we know is nonsense.

This is not an uncommon problem if you're debugging a problem in early
boot, e.g. a panic that occurs prior to inittodr(9).

Currently we use the following logic in resettodr(9) to inhibit writes:

	if (time_second == 1)
		return;

... this is too magical.

A better way to accomplish the same thing is to introduce a dedicated
flag set from inittodr(9).  Hence, "inittodr_done".

Suggested by visa@.

ok kettenis@
</content>
</entry>
<entry>
<title>Extend kqueue interface with EVFILT_EXCEPT filter.</title>
<updated>2020-06-22T13:14:32Z</updated>
<author>
<name>mpi</name>
<email>mpi@openbsd.org</email>
</author>
<published>2020-06-22T13:14:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=7ab02df9ba969938f0d288bc81680642c429c9c4'/>
<id>urn:sha1:7ab02df9ba969938f0d288bc81680642c429c9c4</id>
<content type='text'>
This filter, already implemented in macOS and Dragonfly BSD, returns
exceptional conditions like the reception of out-of-band data.

The functionnality is similar to poll(2)'s POLLPRI &amp; POLLRDBAND and
it can be used by the kqfilter-based poll &amp; select implementation.

ok millert@ on a previous version, ok visa@
</content>
</entry>
<entry>
<title>there's not going to be any whole kernel wide network livelocks soon.</title>
<updated>2020-06-22T02:45:18Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2020-06-22T02:45:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=0de7037a968aa89f7ec4dba4389f41679183f182'/>
<id>urn:sha1:0de7037a968aa89f7ec4dba4389f41679183f182</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add mq_push. it's like mq_enqueue, but drops from the head, not the tail.</title>
<updated>2020-06-21T05:37:26Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2020-06-21T05:37:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=6281916f49597dc1fbe9d42916a18886ab02a325'/>
<id>urn:sha1:6281916f49597dc1fbe9d42916a18886ab02a325</id>
<content type='text'>
from Matt Dunwoodie and Jason A. Donenfeld
</content>
</entry>
<entry>
<title>backout pipe change, it crashes some arch</title>
<updated>2020-06-19T02:08:48Z</updated>
<author>
<name>deraadt</name>
<email>deraadt@openbsd.org</email>
</author>
<published>2020-06-19T02:08:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=8631d7d972792c6c7fa7099b8e25765d2df2a208'/>
<id>urn:sha1:8631d7d972792c6c7fa7099b8e25765d2df2a208</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Compare `so' and `sosp' types just after `sosp' obtaining. We can't splice</title>
<updated>2020-06-18T14:05:21Z</updated>
<author>
<name>mvs</name>
<email>mvs@openbsd.org</email>
</author>
<published>2020-06-18T14:05:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=6a4f7213e40fa1e06c0f29499c22abd45246ff7c'/>
<id>urn:sha1:6a4f7213e40fa1e06c0f29499c22abd45246ff7c</id>
<content type='text'>
sockets from different domains so there is no reason to have locking and memory
allocation in this error path. Also in this case only `so' will be locked by
solock() so we should avoid `sosp' modification.

ok mpi@
</content>
</entry>
<entry>
<title>Instead of performing three distinct allocations per created pipe,</title>
<updated>2020-06-17T18:29:28Z</updated>
<author>
<name>anton</name>
<email>anton@openbsd.org</email>
</author>
<published>2020-06-17T18:29:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=15ad1813789d0ac9ab1cb6bcd5eabf14996ca0d9'/>
<id>urn:sha1:15ad1813789d0ac9ab1cb6bcd5eabf14996ca0d9</id>
<content type='text'>
reduce it to a single one. Not only should this be more performant, it
also solves a kqueue related issue found by visa@ who also requested
this change: if you attach an EVFILT_WRITE filter to a pipe fd, the
knote gets added to the peer's klist. This is a problem for kqueue
because if you close the peer's fd, the knote is left in the list whose
head is about to be freed. knote_fdclose() is not able to clear the
knote because it is not registered with the peer's fd.
FreeBSD also takes a similar approach to pipe allocations.

ok mpi@ visa@
</content>
</entry>
<entry>
<title>make intrmap_cpu return a struct cpu_info *, not a "cpuid number" thing.</title>
<updated>2020-06-17T03:01:26Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2020-06-17T03:01:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=d9f5f731b36c2b84d162b627806286ade4bbe0dd'/>
<id>urn:sha1:d9f5f731b36c2b84d162b627806286ade4bbe0dd</id>
<content type='text'>
requested by kettenis@
discussed with jmatthew@
</content>
</entry>
</feed>
