OpenBSD cvs log

created 2019-04-30T03:20:11Z
begin 2019-02-14T00:00:00Z
end 2019-02-21T00:00:00Z
path src/sys
commits 52

date 2019-02-14T00:49:04Z
author dlg
files src/sys/net/if_mpe.c log diff annotate
message allow configuration of the rdomain the mpls encap operates in

this borrows the SIOCSLIFPHYRTABLE and SIOCGLIFPHYRTABLE that tunnel
interfaces implement to set the rdomain mpls operates in.
ifconfig tunneldomain X lets you set it, and you can see the effect
with netstat -nr -f mpls -TX, but ifconfig currently doesnt show
the tunneldomain. yet.

date 2019-02-14T01:21:29Z
author dlg
files src/sys/net/if_mpw.c log diff annotate
message consistently use the same flags for rt_ifa_add and _del.

experience with mpe shows you need RTF_LOCAL everywhere for del to work.

date 2019-02-14T03:27:42Z
author dlg
files src/sys/net/if_mpe.c log diff annotate
message use the configured route domain for the mpls tunnel when sending packets.

date 2019-02-14T03:29:46Z
author dlg
files src/sys/net/if_mpw.c log diff annotate
message the rdomain for the mpls stuff should still be hardcoded to 0 in mpw.

it was using ifp->if_rdomain for the rtalloc of the mpls encapsulated
tunnel in mpw_start.

date 2019-02-14T15:41:47Z
author florian
files src/sys/kern/kern_pledge.c log diff annotate
message Allow *at variant of mkfifo and mknod, too.
OK deraadt

date 2019-02-14T17:51:25Z
author mpi
files src/sys/net/if_bridge.c log diff annotate
message Remove mpw(4) hacks now that all the world is Ethernet.

date 2019-02-14T17:53:15Z
author mpi
files src/sys/net/if_vlan.c log diff annotate
message mpw.h is no longer needed.

date 2019-02-14T18:19:13Z
author mpi
files src/sys/net/bridgectl.c log diff annotate
src/sys/net/if_bridge.c log diff annotate
message Use timeout_barrier() when bringing the bridge(4) down and only execute
the timeout handler if the interface is running.

ok claudio@

date 2019-02-14T18:41:00Z
author mglocker
files src/sys/dev/usb/xhcireg.h log diff annotate
message HCCPARAMS1 register CFC and SEC values are 1 bit.

ok mpi@

date 2019-02-15T01:06:38Z
author dlg
files src/sys/net/if_mpw.c log diff annotate
message allow configuration of the rdomain that mpls operates in

this is based on the changes to mpe i made yesterday. unfortunately
mpw has a monstor ioctl that configures all the things, which makes
the kernel side complicated. hopefully i can split them up.

date 2019-02-15T02:01:44Z
author dlg
files src/sys/net/if_mpw.c log diff annotate
message coordinate configuration of local mpls labels with destroying an interface

this adds an rwlock like mpe has which means only one thing can be
adding or removing a local mpls label, and those things check if
the interface is dying before doing their thing.

date 2019-02-15T05:55:21Z
author dlg
files src/sys/kern/uipc_socket2.c log diff annotate
src/sys/sys/socketvar.h log diff annotate
message let sbcreatecontrol take a const void * instead of a caddr_t.

this makes it easier to call since you don't have to cast to caddr_t
if it's a void *. this also changes a size argument from int to
size_t.

ok claudio@

date 2019-02-15T13:00:51Z
author mpi
files src/sys/net/if_vlan.c log diff annotate
src/sys/net/if_vlan_var.h log diff annotate
message Use `ifidx' when storing an interface index.

ok dlg@

date 2019-02-15T16:46:59Z
author deraadt
files src/sys/uvm/uvm_map.c log diff annotate
message With an opportunistic check performed at every trap, we insist userland
sp must be on a MAP_STACK page. Relax the check a bit -- the sp may be
on a PROT_NONE page. Can't see how an attacker can leverage that situation.

(New perl build process contains a "how many call frames can my stack
hold" checker, and this triggers via the MAP_STACK fault rather than
the normal access check. The MAP_STACK check still has a kernel printf
as we hunt for applications which map stacks poorly. Interestingly the
perl code has a knob to disable similar printing alerts on Windows, which
apparently has a feature somewhat like MAP_STACK!)

ok tedu guenther kettenis

date 2019-02-15T18:33:44Z
author anton
files src/sys/ddb/db_variables.c log diff annotate
message The underlying storage for builtin ddb variables are of type int but
referenced to using a pointer to long. When writing to such a variable,
cast it to the correct type. Writing would otherwise on 64-bit
architectures cause the next variable adjacent in memory to also be
modified.

ok deraadt@ visa@

date 2019-02-15T18:34:59Z
author anton
files src/sys/ddb/db_variables.c log diff annotate
message zap trailing empty line

date 2019-02-15T21:16:01Z
author claudio
files src/sys/net/route.c log diff annotate
message Remove KASSERT() for now. It triggers when destroying lo(4) of a rdomain
because the rtable_l2 is modified before calling rt_ifa_del.
Triggered by regress test and reported by Moritz Buhl mbuhl at mbuhl dot me

date 2019-02-16T01:55:48Z
author mlarkin
files src/sys/arch/amd64/amd64/vmm.c log diff annotate
message vmm(4): report PA bits in CPUID[0x80000008]

We were previously hiding this information from the guest but there
really isn't a reason to do that. Hiding this value limits the PA size
to 36 bits (64GB), which I discovered the hard way when creating some
big VMs recently.

date 2019-02-16T20:14:14Z
author patrick
files src/sys/arch/arm64/include/pmap.h log diff annotate
message Sprinkle a few ifdefs for _LOCORE and _KERNEL and reorder a few lines
so that pmap.h can be included as part of the mmap_hint regression test.

From Moritz Buhl
ok bluhm@

date 2019-02-17T15:02:22Z
author mpi
files src/sys/dev/usb/usb_subr.c log diff annotate
message Publish new attached device once it is fully initialized.

Should prevent a race seen by florian@ where userland emits an
USB_DEVICEINFO ioctl(2) for a device whose product/vendor names
haven't yet been filled.

ok florian@

date 2019-02-17T15:21:31Z
author mpi
files src/sys/net/bridgectl.c log diff annotate
src/sys/net/if_bridge.h log diff annotate
message Make bridge_rtupdate() return an error value instead of a pointer.

date 2019-02-17T15:44:26Z
author deraadt
files src/sys/arch/sh/include/endian.h log diff annotate
message sprinle some casts to quiet compiler; ok millert

date 2019-02-17T22:17:28Z
author tedu
files src/sys/kern/vfs_bio.c log diff annotate
src/sys/kern/vfs_subr.c log diff annotate
src/sys/kern/vfs_vops.c log diff annotate
src/sys/sys/vnode.h log diff annotate
message if a write fails, we mark the buffer invalid and throw it away. this can
lead to lost errors, where a later fsync will return success. to fix this,
set a flag on the vnode indicating a past error has occurred, and return
an error for future fsync calls.
ok bluhm deraadt visa

date 2019-02-18T03:41:21Z
author dlg
files src/sys/net/if_ethersubr.c log diff annotate
message get rid of some trailing whitespace.

no functional change

date 2019-02-18T08:26:19Z
author yasuoka
files src/sys/arch/amd64/amd64/locore.S log diff annotate
src/sys/arch/amd64/include/pmap.h log diff annotate
message Remove PTPpaddr and use proc0.p_addr->u_pcb.pcb_cr3 instead. This also
fixes kernel core dump to be readable by savecore. From fukaumi at
soum.co.jp

ok mlarkin

date 2019-02-18T08:26:20Z
author yasuoka
files src/sys/arch/amd64/amd64/locore0.S log diff annotate
src/sys/arch/amd64/amd64/machdep.c log diff annotate
message Remove PTPpaddr and use proc0.p_addr->u_pcb.pcb_cr3 instead. This also
fixes kernel core dump to be readable by savecore. From fukaumi at
soum.co.jp

ok mlarkin

date 2019-02-18T08:59:43Z
author kevlo
files src/sys/dev/pci/pcidevs log diff annotate
message Add another PCI ID for Intel Dual Band Wireless AC 9560, found in
thinkpad x1 extreme.

ok stsp@

date 2019-02-18T09:02:12Z
author kevlo
files src/sys/dev/pci/pcidevs.h log diff annotate
src/sys/dev/pci/pcidevs_data.h log diff annotate
message regen

date 2019-02-18T13:11:44Z
author bluhm
files src/sys/net/pf_ioctl.c log diff annotate
src/sys/net/pfvar.h log diff annotate
message Change ps_len of struct pfioc_states and psn_len of struct
pfioc_src_nodes to size_t. This avoids integer truncation by casts
to unsigned. As the types of DIOCGETSTATES and DIOCGETSRCNODES
ioctl(2) arguments change, pfctl(8) and systat(1) should be updated
together with the kernel. Calculate number of pf(4) states as
size_t in userland.
OK sashan@ deraadt@

date 2019-02-18T17:39:14Z
author anton
files src/sys/dev/wscons/wsmux.c log diff annotate
src/sys/dev/wscons/wsmuxvar.h log diff annotate
message Serialize access to the list of attached child devices belonging to a
wsmux. When invoking wsevsrc_* functions on a attached child device,
underlying driver can sleep; this introduces a race where another thread
is able to modify the list leading to all kinds of corruptions.

ok visa@

Reported-by: syzbot+03f7377a9848d7d008c9@syzkaller.appspotmail.com

date 2019-02-18T20:34:37Z
author patrick
files src/sys/dev/ofw/ofw_regulator.c log diff annotate
message In the voltage regulator getter we need to actually check the GPIO
pin before setting the "pin is high" bit in the index for the states.
Otherwise the index always has all possible bits sets.

ok kettenis@

date 2019-02-19T07:01:02Z
author anton
files src/sys/dev/wscons/wskbd.c log diff annotate
src/sys/dev/wscons/wsmouse.c log diff annotate
src/sys/dev/wscons/wsmux.c log diff annotate
message favor C99 initializers for improved grepability; ok mpi@

date 2019-02-19T07:03:29Z
author anton
files src/sys/dev/wscons/wsmux.c log diff annotate
message whitespace nits

date 2019-02-19T08:12:30Z
author stsp
files src/sys/dev/ic/bwfm.c log diff annotate
src/sys/net80211/ieee80211.c log diff annotate
src/sys/net80211/ieee80211.h log diff annotate
src/sys/net80211/ieee80211_ioctl.c log diff annotate
src/sys/net80211/ieee80211_ioctl.h log diff annotate
src/sys/net80211/ieee80211_node.h log diff annotate
src/sys/net80211/ieee80211_radiotap.h log diff annotate
src/sys/net80211/ieee80211_var.h log diff annotate
message Make ifconfig(8) display whether bwfm(4) firmware is using 802.11ac.
ok patrick@ mpi@

date 2019-02-19T10:17:09Z
author stsp
files src/sys/dev/ic/ar5008.c log diff annotate
src/sys/dev/ic/ar9003.c log diff annotate
message Fix a cosmetic issue in athn(4)'s bpf(4) tap.
tcpdump -i athn0 -y IEEE802_11_RADIO was showing a SHORTPRE flag on most
frames because a PHY type check was missing from the bpf tap code path.
Short preamble only applies to 2, 5.5, and 11 MBit/s CCK frames.

date 2019-02-19T22:42:41Z
author tedu
files src/sys/kern/kern_sig.c log diff annotate
message open the coredump file non-blocking. cheloha found it blocks with a fifo.
ok cheloha deraadt

date 2019-02-20T00:03:15Z
author dlg
files src/sys/net/if_ethersubr.c log diff annotate
message make ether_output with AF_MPLS use a routes gateway address if available

sending an MPLS frame is weird compared to other address families.
other families figure out and pass the address on the local link
for ether_output to use for resolution, but AF_MPLS basically passes
a dummy sockaddr so ether_output can get the ethernet protocol field
right. ether_output then has to pull the route apart to figure out
which address and family to use for address resolution on the local
net. eg, MPLS tagged routes via ip addresess need to pull the route
apart and get at the AF_INET sockaddr to pass to arpresolve. that
code currently uses the destination address of the route, but if
that destination is not on the local network, we'd end up using it
for arp requests that don't work.

this change uses the rt_gateway sockaddr if RTF_GATEWAY is set.
this solves the problem in my testing and doesn't seem to break
other uses cases ive tried.

reported by adrian close via bugs@
ok deraadt@ claudio@

date 2019-02-20T00:15:41Z
author dlg
files src/sys/net/if_mpw.c log diff annotate
message add support for SIOCGETLABEL

this is a first step in breaking up the monolithic and redundant
SIOCSETMPWCFG ioctls

discussed with claudio@

date 2019-02-20T00:16:31Z
author dlg
files src/sys/net/if_mpw.c log diff annotate
message oops, whitespace tweak

no functional change

date 2019-02-20T00:17:35Z
author dlg
files src/sys/net/if_mpw.c log diff annotate
message sigh, more whitespace fixes

no functional change

date 2019-02-20T00:20:19Z
author dlg
files src/sys/net/if_mpe.c log diff annotate
message add the locking for coordinating between ioctls and a clone destroy.

i wrote this in mpe before porting and committing it in mpw, but
forgot to commit the mpe version.

date 2019-02-20T00:31:17Z
author dlg
files src/sys/net/if_mpw.c log diff annotate
message replace sc_flgas with sc_cword

the only flag used with sc_flags was the one to turn the control
word on and off.

this is in preparation for split ioctls for controlling pseudowire
behaviour. sc_cword can be set atomically and indepentently as a
separate variable.

date 2019-02-20T00:38:14Z
author dlg
files src/sys/net/if_mpw.c log diff annotate
message don't store the BOS flag as part of the remote label, add it at tx time.

this is to prepare for flow aware transport for FAT from RFC 6391

date 2019-02-20T01:04:53Z
author dlg
files src/sys/net/if_mpw.c log diff annotate
message add support for rfc 6391: flow-aware transport of pseudowires.

this basically adds a dummy mpls tag to the stack for pseudowires
and uses a flow as the label on that dummy tag. this allows
intermediate systems that hash packets onto multiple links to use
the extra tag as input to the hash, providing more entropy and
therefore better load balancing.

it's a pity there's no way to turn it on yet...

date 2019-02-20T03:11:38Z
author dlg
files src/sys/dev/pci/pcidevs log diff annotate
message the broadcom BCM57811_VF device id should be 0x163f, not 0x16ef

technically 0x16ef is for "BCM57416 NetXtreme-E RDMA Partition".

from msaitoh
ok jmatthew@

date 2019-02-20T03:11:56Z
author dlg
files src/sys/dev/pci/pcidevs.h log diff annotate
src/sys/dev/pci/pcidevs_data.h log diff annotate
message regen

date 2019-02-20T03:55:49Z
author dlg
files src/sys/dev/pci/pcidevs log diff annotate
message fix the name of some BCM57417 and BCM57416 parts

from msaitoh

date 2019-02-20T06:59:16Z
author mlarkin
files src/sys/arch/amd64/amd64/vmm.c log diff annotate
src/sys/arch/amd64/amd64/vmm_support.S log diff annotate
src/sys/arch/amd64/include/vmmvar.h log diff annotate
message vmm(4): allow preservation and restoration of guest debug registers

Allow save/restore of %drX registers during VM exit and entry

discussed with deraadt@

date 2019-02-20T07:00:31Z
author anton
files src/sys/dev/isa/pcppi.c log diff annotate
src/sys/dev/isa/spkr.c log diff annotate
message Reject negative input from userland in spkrioctl(). One of the arguments
are later passed to timeout_add() which panics if the given ticks are
negative. While here, clamp arguments in pcppi_bell() in order to
prevent overflow.

ok visa@

Reported-by: syzbot+23089c40a85aa70bed6f@syzkaller.appspotmail.com

date 2019-02-20T07:36:37Z
author patrick
files src/sys/dev/ofw/ofw_regulator.c log diff annotate
src/sys/dev/ofw/ofw_regulator.h log diff annotate
message Add support for current limit regulators in addition to the voltage
regulators we already support. The GPIO-based regulators are rather
independent of the type, we only need to know the type to check the
upper and lower limits.

With feedback from kettenis@

date 2019-02-20T17:11:51Z
author mpi
files src/sys/net/bridgectl.c log diff annotate
src/sys/net/if_bridge.c log diff annotate
src/sys/net/if_bridge.h log diff annotate
message Protect the hash table with a mutex.

inputs & ok visa@

date 2019-02-20T17:54:34Z
author anton
files src/sys/dev/wscons/wsmux.c log diff annotate
message When adding a wsmux device to an existing wsmux device using
ioctl(WSMUXIO_ADD_DEVICE), two distinct locks of the same type are
acquired. Thus, witness will emit warning. Since acquiring two different
locks of the same type is harmless in this context, relax the witness
check by flagging the locks as RWL_DUPOK.

ok visa@

Reported-by: syzbot+249e483406a1f7843915@syzkaller.appspotmail.com