OpenBSD cvs log

created 2020-11-19T18:54:10Z
begin 2020-06-21T00:00:00Z
end 2020-06-22T00:00:00Z
path src/sys
commits 26

date 2020-06-21T05:12:06Z
author dlg
files src/sys/netinet/in_pcb.h log diff annotate
message add a inp_upcall function pointer and inp_upcall_arg to struct in_pcb.

this is so protocols (eg, udp) can let things (eg, kernel support
for wireguard or vxlan or geneve) look at and possibly steal packets
before they get added to a socket buffer.

i wrote the original version of this, but it was tweaked by Matt
Dunwoodie and Jason A. Donenfeld for use with wireguard.

date 2020-06-21T05:14:04Z
author dlg
files src/sys/netinet/in_pcb.h log diff annotate
message knf: the inp_upcall line was too long.

date 2020-06-21T05:15:14Z
author jmatthew
files src/sys/dev/pci/if_ixl.c log diff annotate
message The onboard interfaces on T7/S7 machines don't provide a valid MAC address
for themselves, so use the "local-mac-address" Open Firmware property
instead, as done in ix(4).

ok dlg@

date 2020-06-21T05:17:15Z
author dlg
files src/sys/netinet/udp_usrreq.c log diff annotate
message if an inp_upcall is set, let it look at and maybe steal the udp packet.

i wrote the original version of this, but it was tweaked by Matt
Dunwoodie and Jason A. Donenfeld for use with wireguard.

date 2020-06-21T05:19:27Z
author dlg
files src/sys/netinet/udp_usrreq.c log diff annotate
message wrap a long line. no functional change.

date 2020-06-21T05:37:26Z
author dlg
files src/sys/kern/uipc_mbuf.c log diff annotate
src/sys/sys/mbuf.h log diff annotate
message add mq_push. it's like mq_enqueue, but drops from the head, not the tail.

from Matt Dunwoodie and Jason A. Donenfeld

date 2020-06-21T10:34:37Z
author dlg
files src/sys/crypto/blake2s.c log diff annotate
src/sys/crypto/blake2s.h log diff annotate
message add blake2s for wireguard.

via Matt Dunwoodie and Jason A. Donenfeld

ok deraadt@

date 2020-06-21T10:43:37Z
author dlg
files src/sys/crypto/curve25519.c log diff annotate
src/sys/crypto/curve25519.h log diff annotate
message curve25519 for wireguard.

via Matt Dunwoodie and Jason A. Donenfeld

ok deraadt@

date 2020-06-21T10:46:49Z
author dlg
files src/sys/crypto/chacha_private.h log diff annotate
message add hchacha20 for wireguard.

i think we should turn the chacha code into an actual c file at
some point to reduce duplication of object code, but that can happen
later.

from Matt Dunwoodie and Jason A. Donenfeld

ok deraadt@

date 2020-06-21T10:50:01Z
author dlg
files src/sys/crypto/chachapoly.c log diff annotate
src/sys/crypto/chachapoly.h log diff annotate
message add constructions for wireguard.

from Matt Dunwoodie and Jason A. Donenfeld

ok deraadt@

date 2020-06-21T11:25:54Z
author dlg
files src/sys/net/if_types.h log diff annotate
message add IFT_WIREGUARD.

i'm still not a fan of the peer semantics of wireguard interfaces
where each interface can have multiple peers and each peer has a
set of the allowed ips configurred, aka cryptokey routing. traditionally
we would use a tunnel (IFT_TUNNEL) style interface per peer, which
means there's a 1:1 mapping between a peer and an interface. in
turn that means you can apply policy with things like pf to the
interface and it implies policy on the peer.

so allowed ips inside a wg interface feels like a bandaid for a
self inflicted wound to some degree. however, deraadt@ points out
that the boat has sailed, and being compatible with the larger
ecosystem has benefits. admins can choose to setup an interface per
peer if they want too, so we get the best of both worlds.

i will admit an interface per peer sucks in a concentrator situation
though. that's why we still have pppac(4) as well as pppx(4). i
also don't have any better ideas for how to scale or even express
this kind of policy in a concentrator setting either.

apologies for the teary.

from Matt Dunwoodie and Jason A. Donenfeld

ok deraadt@

date 2020-06-21T11:32:34Z
author dlg
files src/sys/netinet6/in6_ifattach.c log diff annotate
message wireguard can do ipv6, but doesnt do link local addresses.

i feel like i should add IFT_L3IPVLAN here so mgre(4) can take
advantage of this too.

from Matt Dunwoodie and Jason A. Donenfeld

ok deraadt@

date 2020-06-21T11:44:12Z
author dlg
files src/sys/sys/mbuf.h log diff annotate
message wireguard is taking over the gif mbuf tag.

gif used its mbuf tag to store it's interface index so it could
detect loops. gre also did this, and i cut most of the drivers
(including gif) over to using the gre tag. so the gif tag is unused.

wireguard uses the tag to store peer information between different
contexts the packet is processed in. it also needs a bit more space
to do that.

from Matt Dunwoodie and Jason A. Donenfeld

ok deraadt@

date 2020-06-21T12:11:26Z
author dlg
files src/sys/net/if.c log diff annotate
src/sys/net/if_wg.c log diff annotate
src/sys/net/if_wg.h log diff annotate
src/sys/net/wg_cookie.c log diff annotate
src/sys/net/wg_cookie.h log diff annotate
src/sys/net/wg_noise.c log diff annotate
src/sys/net/wg_noise.h log diff annotate
message add wg(4), an in kernel driver for WireGuard vpn communication.

thanks to Matt Dunwoodie and Jason A. Donenfeld for their effort.
it's at least as functional as the go implementation, and maybe
more so since this one works on more architectures.

i'm sure there's further development that can be done, but you can
say that about anything and everything that's in the tree.

ok deraadt@

date 2020-06-21T12:14:48Z
author dlg
files src/sys/conf/files log diff annotate
message tell config how to build wg(4)

date 2020-06-21T12:30:07Z
author dlg
files src/sys/conf/GENERIC log diff annotate
message add a commented out entry for wg(4).

i think ive tempted fate enough for one day.

date 2020-06-21T13:23:59Z
author kettenis
files src/sys/arch/powerpc64/include/cpu.h log diff annotate
src/sys/arch/powerpc64/include/pcb.h log diff annotate
src/sys/arch/powerpc64/include/pmap.h log diff annotate
src/sys/arch/powerpc64/include/trap.h log diff annotate
src/sys/arch/powerpc64/powerpc64/genassym.cf log diff annotate
src/sys/arch/powerpc64/powerpc64/locore.S log diff annotate
src/sys/arch/powerpc64/powerpc64/machdep.c log diff annotate
src/sys/arch/powerpc64/powerpc64/pmap.c log diff annotate
src/sys/arch/powerpc64/powerpc64/trap.c log diff annotate
src/sys/arch/powerpc64/powerpc64/trap_subr.S log diff annotate
message Implement copyin(9), copyout(9), copyinstr(9) and copyoutstr(9).

date 2020-06-21T14:31:32Z
author kettenis
files src/sys/arch/powerpc64/powerpc64/pmap.c log diff annotate
message Add code to synchronize I-cache if necessary when mapping an executable
page.

date 2020-06-21T16:18:54Z
author kettenis
files src/sys/arch/powerpc64/include/vmparam.h log diff annotate
src/sys/arch/powerpc64/powerpc64/machdep.c log diff annotate
message Set up exec_map and phys_map.

date 2020-06-21T16:41:56Z
author jsg
files src/sys/dev/pci/drm/include/linux/mutex.h log diff annotate
message correct mutex_lock_interruptible()

Linux kernel code often passes errors around as negative numbers cast to
pointers. As rw_enter() returns a errno on failure
mutex_lock_interruptible() negated the return value. But this did not
account for ERESTART being -1 which would return 1 to the caller.

sthen@ periodically hit a uvm_fault() in i915_request_create() which
was caused by attempting to use 1 as a pointer.

ok kettenis@

date 2020-06-21T16:46:34Z
author krw
files src/sys/dev/pv/vioblk.c log diff annotate
message Nuke pointless vioblk_dev_probe() and vioblk_dev_free() functions and
tweak adapter_target and adapter_buswidth values to provide desired
semantic of providing only target 0/lun 0 device per vioblk(4) device.

Tested by sf@

date 2020-06-21T17:05:12Z
author kettenis
files src/sys/arch/powerpc64/powerpc64/pmap.c log diff annotate
message Set reference count of freshly created pmap to one.

date 2020-06-21T18:23:43Z
author kettenis
files src/sys/arch/powerpc64/powerpc64/pmap.c log diff annotate
message Set PTE valid bit in PTE descriptors such that we actually match them in
pmap_ptedinhash().

date 2020-06-21T18:39:38Z
author kettenis
files src/sys/arch/powerpc64/powerpc64/machdep.c log diff annotate
message Enable machine check interrupt.

date 2020-06-21T19:03:29Z
author fcambus
files src/sys/dev/wsfont/spleen12x24.h log diff annotate
src/sys/dev/wsfont/spleen16x32.h log diff annotate
src/sys/dev/wsfont/spleen32x64.h log diff annotate
src/sys/dev/wsfont/spleen5x8.h log diff annotate
src/sys/dev/wsfont/spleen8x16.h log diff annotate
message Update Spleen kernel fonts to version 1.7.1, bringing the following
improvements:

- Remove strain pixel on the '5' digit (5x8 version)
- Improve the Esszet character (8x16, 12x24, 16x32, and 32x64 versions)

date 2020-06-21T21:57:35Z
author kettenis
files src/sys/arch/powerpc64/powerpc64/db_trace.c log diff annotate
message Making tracing through traps work.

ok gkoehler@