OpenBSD cvs log

created 2019-04-30T03:24:14Z
begin 2019-02-28T00:00:00Z
end 2019-03-07T00:00:00Z
path src/sys
commits 33

date 2019-02-28T03:27:57Z
author dlg
files src/sys/net/if_mpip.c log diff annotate
message Add mpip(4), an IP tunnel interface for "IP Layer 2" over MPLS pseudowires

This is basically mpw(4), but it carries IP directly instead of
Ethernet. On the wire it can look the same as what IP over MPLS
looks like, but because it is a pseudowire you can configure a
control word or the FAT label to improve load balancing. It can
be used to quickly set up an IP tunnel over an MPLS fabric
without the need to configure bgpd and mpe(4) interfaces.

Because It implements the same pwe3 ioctls that mpw(4) uses ifconfig
already supports configuration of mpip(4) interfaces. ldpd will
grow support for this in the near future.

This is not hooked up to the build yet

discussed with claduio@ at ak219
ok claudio@

date 2019-02-28T03:36:49Z
author dlg
files src/sys/conf/files log diff annotate
message add mpip(4)

ok claudio@

date 2019-02-28T06:06:28Z
author dlg
files src/sys/conf/files log diff annotate
message list mpls as a depend for mpe and mpw, dont require bridge to build mpw

mpe doesnt need ether as a depend while im here.

date 2019-02-28T20:20:47Z
author bluhm
files src/sys/net/pf_norm.c log diff annotate
message IPv6 fragments with malformed extension headers could be erroneously
passed by pf or cause a panic in pf.
fix from sashan@; OK bluhm@ claudio@
bug found by Corentin Bayet, Nicolas Collignon, Luca Moro at Synacktiv

date 2019-03-01T01:46:18Z
author cheloha
files src/sys/sys/mman.h log diff annotate
src/sys/uvm/uvm.h log diff annotate
src/sys/uvm/uvm_extern.h log diff annotate
src/sys/uvm/uvm_map.c log diff annotate
src/sys/uvm/uvm_mmap.c log diff annotate
src/sys/uvm/uvm_unix.c log diff annotate
message New mmap(2) flag: MAP_CONCEAL.

MAP_CONCEAL'd memory is not written to disk in the event of a core dump.
It may grow other qualities in the future.

Wanted by libressl, probably useful elsewhere, too.

Prompted by deraadt@, concept from deraadt@/kettenis@. With input from
deraadt@, cjeker@, kettenis@, otto@, bcook@, matthew@, guenther@, djm@,
and tedu@.

ok otto@ deraadt@

date 2019-03-01T01:58:17Z
author jmatthew
files src/sys/dev/pci/mfii.c log diff annotate
message Background init progress and consistency check progress are reported in
different fields. Use the background init progress when that's the active
task.

lack of progress data noticed by deraadt@
tested on SAS2208 and SAS3508
ok dlg@

date 2019-03-01T04:47:32Z
author dlg
files src/sys/net/if.c log diff annotate
message rework how ifiq_input decides the stack is busy and whether it should drop

previously ifiq_input uses the traditional backpressure or defense
mechanism and counts packets to decide when to shed load by dropping.
currently it ends up waiting for 10240 packets to get queued on the
stack before it would decide to drop packets. this may be ok for
some machines, but for a lot this was too much.

this diff reworks how ifiqs measure how busy the stack is by
introducing an ifiq_pressure counter that is incremented when
ifiq_input is called, and cleared when ifiq_process calls the network
stack to process the queue. if ifiq_input is called multiple times
before ifiq_process in a net taskq runs, ifiq_pressure goes up, and
ifiq_input uses a high value to decide the stack is busy and it
should drop.

i was hoping there would be no performance impact from this change,
but hrvoje popovski notes a slight bump in forwarding performance.
my own testing shows that the ifiq input list length grows to a
fraction of the 10240 it used to get to, which means the maximum
burst of packets through the stack is smoothed out a bit. instead
of big lists of packets followed by big periods of drops, we get
relatively small bursts of packets with smaller gaps where we drop.

the follow-on from this is to make drivers implementing rx ring
moderation to use the return value of ifiq_input to scale the ring
allocation down, allowing the hardware to drop packets so software
doesnt have to.

date 2019-03-01T04:47:33Z
author dlg
files src/sys/net/ifq.c log diff annotate
src/sys/net/ifq.h log diff annotate
message rework how ifiq_input decides the stack is busy and whether it should drop

previously ifiq_input uses the traditional backpressure or defense
mechanism and counts packets to decide when to shed load by dropping.
currently it ends up waiting for 10240 packets to get queued on the
stack before it would decide to drop packets. this may be ok for
some machines, but for a lot this was too much.

this diff reworks how ifiqs measure how busy the stack is by
introducing an ifiq_pressure counter that is incremented when
ifiq_input is called, and cleared when ifiq_process calls the network
stack to process the queue. if ifiq_input is called multiple times
before ifiq_process in a net taskq runs, ifiq_pressure goes up, and
ifiq_input uses a high value to decide the stack is busy and it
should drop.

i was hoping there would be no performance impact from this change,
but hrvoje popovski notes a slight bump in forwarding performance.
my own testing shows that the ifiq input list length grows to a
fraction of the 10240 it used to get to, which means the maximum
burst of packets through the stack is smoothed out a bit. instead
of big lists of packets followed by big periods of drops, we get
relatively small bursts of packets with smaller gaps where we drop.

the follow-on from this is to make drivers implementing rx ring
moderation to use the return value of ifiq_input to scale the ring
allocation down, allowing the hardware to drop packets so software
doesnt have to.

date 2019-03-01T06:15:59Z
author dlg
files src/sys/dev/pci/if_ix.c log diff annotate
message bus_dmamap_sync when we fill the rx ring, not for ever slot on the ring.

date 2019-03-01T07:39:56Z
author stsp
files src/sys/dev/ic/athn.c log diff annotate
message Make athn(4) configure timing of control frames explicitly.
We now update the chip with values for SIFS interval and ACK/RTS/CTS
timeout when configuration changes occur, like Linux ath9k does.
Tested by myself, juanfra@, jmc@ on AR9280 and AR9271.

date 2019-03-01T08:09:00Z
author stsp
files src/sys/net80211/ieee80211_input.c log diff annotate
message Pick up the AP's 11g ERP protection setting properly in 11n client mode.
ok phessler@

date 2019-03-01T08:13:11Z
author stsp
files src/sys/net80211/ieee80211_node.c log diff annotate
src/sys/net80211/ieee80211_node.h log diff annotate
src/sys/net80211/ieee80211_var.h log diff annotate
message Improve handling of HT protection for 'mode 11n' hostap.

Consider the mere presence of HTCAP IEs as indicator of 11n support,
rather than checking advertised Rx MCS. Fixes some devices being
misclassified as 11a/g, causing HT protection to be enabled even
though it is not needed.

Use CTS-to-self frames for HT protection instead of RTS/CTS.

These changes make my athn(4) AR9280 hostap perform much better.

ok phessler@

date 2019-03-01T09:45:40Z
author dlg
files src/sys/dev/pci/if_ixl.c log diff annotate
message use ifiq_input instead of if_input

call if_rxr_livelocked if ifiq_input says to slow down

date 2019-03-01T10:02:44Z
author dlg
files src/sys/dev/pci/if_em.c log diff annotate
src/sys/dev/pci/if_em.h log diff annotate
message use a timeout to refill the rx ring when it's empty.

em had rxr, but didn't use a timeout cos it claimed to generate an
RX overflow interrupt when packets fell off slots in the ring. turns
out that's a lie on at least one chip, so add the timeout like other
drivers.

this was hit by mlarkin@, who had nfs and bufs steal all the packets
and memory for packets from em, which didn't recover after the
memory had been released back to the system.

date 2019-03-01T19:15:59Z
author patrick
files src/sys/dev/usb/xhci.c log diff annotate
message Since ring->index points to the next free slot, once we reach index zero
we know that the last non-link TRB has been written and we can look at
the flags to set the chain bit in the link TRB. Since we will now toggle
the cycle bit on the first TRB of a ring, set it on the ring reset.

Tested by jcs@, jsg@ and visa@
"commit it" jcs@

date 2019-03-02T07:42:03Z
author anton
files src/sys/dev/wscons/wsmux.c log diff annotate
message Limited the number of allowed stacked wsmux devices. A sufficiently long chain
of such devices can exhaust the kernel stack due to wsmux_do_open() being
recursive. While here, serialize the operation of stacking a wsmux device.

Joint effort with and ok visa@

date 2019-03-02T08:53:07Z
author ajacoutot
files src/sys/arch/amd64/include/vmmvar.h log diff annotate
message Bump VMM_MAX_NAME_LEN to 64 to allow for longer vm names.

ok mlarkin@

date 2019-03-03T16:31:12Z
author deraadt
files src/sys/net/route.c log diff annotate
message Found some historical code. Don't cast the pointer for bzero to a different type,
and definately don't do this to the length: (unsigned)(cplim2 - cp2)
ok claudio

date 2019-03-04T01:06:48Z
author dhill
files src/sys/sys/buf.h log diff annotate
message Make sure we clear all valid bytes in clrbuf.

ok deraadt@

date 2019-03-04T07:09:54Z
author deraadt
files src/sys/kern/uipc_syscalls.c log diff annotate
message Yet another (unsigned) cast who's only purpose is to incorrectly truncate
a size_t. Multiply-overflow is checked beforehands. If this could (it can't)
validly be more than 4GB, the (unsigned) is a truncation and causes copyin of
insufficient data, without indicating error...
ok claudio

date 2019-03-04T08:42:12Z
author stsp
files src/sys/net/pfkeyv2.h log diff annotate
src/sys/net/pfkeyv2_convert.c log diff annotate
message Add padding to struct sadb_x_counter to make it comply with
alignment constraints documented in RFC 2367 section 2.2.
Fixes 'ipsecctl -ss' segfault observed on i386.
with and ok deraadt@ visa@ mikeb@

date 2019-03-04T18:41:40Z
author denis
files src/sys/net/if_pppx.c log diff annotate
message allow IPv6 to flow through pppx(4)

OK phessler@ deraadt@

date 2019-03-04T19:23:02Z
author anton
files src/sys/kern/tty_pty.c log diff annotate
message When closing the slave end of a pty, generate an EOF event to any kqueue
consumer of the master end. This behavior is equivalent to how pipes
already behave with kqueue. Also, FreeBSD and NetBSD behaves the same
way.

ok deraadt@ millert@

date 2019-03-04T21:34:08Z
author dlg
files src/sys/net/ifq.c log diff annotate
message don't need to initialise qdrops twice when setting up ifqs and ifiqs.

date 2019-03-04T21:57:16Z
author dlg
files src/sys/net/ifq.c log diff annotate
message move back to ifiq_input counting packets instead of queue operations.

the backpressure seems to have kicked in too early, introducing a
lot of packet loss where there wasn't any before. secondly, counting
operations interacted extremely badly with pseudo-interfaces. for
example, if you have a physical interface that rxes 100 vlan
encapsulated packets, it will call ifiq_input once for all 100
packets. when the network stack is running vlan_input against thes
packets, vlan_input will take the packet and call ifiq_input against
each of them. because the stack is running packets on the parent
interface, it can't run the packets on the vlan interface, so you
end up with ifiq_input being called 100 times, and we dropped packets
after 16 calls to ifiq_input without a matching run of the stack.

chris cappuccio hit some weird stuff too.

discussed with claudio@

date 2019-03-05T01:40:20Z
author jmatthew
files src/sys/dev/ic/mfi.c log diff annotate
message apply background init progress fix from r1.59 of mfii.c
(reverting most of r1.60 of mfi.c, oddly enough)

ok dlg@
tested on a SAS2008 (perc h310)

date 2019-03-05T01:43:07Z
author jmatthew
files src/sys/dev/pci/mfii.c log diff annotate
message swap MFI_LD_PROG_BGI and MFI_LD_PROG_CC cases to match value order

ok dlg@

date 2019-03-05T19:07:56Z
author anton
files src/sys/net/rtable.c log diff annotate
message Make sure pointer is within bounds before dereferencing it.

ok claudio@ deraadt@

Reported-by: syzbot+8e29400e09a351f17884@syzkaller.appspotmail.com

date 2019-03-06T00:34:08Z
author tedu
files src/sys/ufs/ufs/ufs_dirhash.c log diff annotate
message increase dirhash mem a bit since very tiny machines are less common.
perhaps not enough for everyone, but we'll see what happens.

date 2019-03-06T09:36:27Z
author tb
files src/sys/kern/tty_pty.c log diff annotate
message Revert revision 1.91. It results in significant log spam when
running vmd, as observed by mlarkin and myself.

discussed with anton and mlarkin

date 2019-03-06T11:00:49Z
author jmatthew
files src/sys/dev/pci/if_ixl.c log diff annotate
message Ignore rx interrupts if the interface isn't supposed to be running.
In some situations the pxe rom seems to leave rx interrupts
pending, so we get them as soon as we turn interrupts on.
Trying to process rx interrupts before we've allocated an rx ring
leads to crashes.

ok dlg@

date 2019-03-06T15:32:38Z
author jcs
files src/sys/dev/acpi/acpithinkpad.c log diff annotate
message thinkpad_[gs]et_backlight -> thinkpad_[gs]et_kbd_backlight

make it clear these are dealing with keyboard backlight and not
screen backlight

date 2019-03-06T15:36:30Z
author jcs
files src/sys/dev/acpi/acpithinkpad.c log diff annotate
message explicitly unmask keyboard brightness and screen brightness events

on newer machines these may be masked by default so unmask them to
keep wscons keyboard.backlight in sync and give us a chance to react
to screen brightness keys.

on those newer machines, make thinkpad_brightness_{up,down} use the
ACPI method for adjusting screen brightness instead of the old CMOS
method.

tested by many
fixes x270, x280, t470s, t470p, x1c6
no regression on x201, x230, x240, x250