OpenBSD cvs log

created 2021-03-28T04:21:43Z
begin 2021-03-26T00:00:00Z
end 2021-03-27T00:00:00Z
path src/sys
commits 14

date 2021-03-26T07:58:44Z
author jan
files src/sys/dev/pci/pcidevs log diff annotate
message Add missing PCI ID for Intel X710 SFP+ NIC

ok patrick@

date 2021-03-26T08:00:02Z
author jan
files src/sys/dev/pci/pcidevs.h log diff annotate
message regen

date 2021-03-26T08:02:34Z
author jan
files src/sys/dev/pci/if_ixl.c log diff annotate
message Add PCI ID for Intel X710 10G SFP+ NIC

ok patrick@

date 2021-03-26T08:17:23Z
author jan
files src/sys/dev/pci/pcidevs_data.h log diff annotate
message regen

date 2021-03-26T10:18:55Z
author stsp
files src/sys/net80211/ieee80211_input.c log diff annotate
message Fix wrong sequence number wrap in ieee80211_recv_auth().
IEEE 802.11 sequence numbers wrap around at 0xfff, not 0xffff.
ok phessler@ kevlo@

date 2021-03-26T13:40:05Z
author mpi
files src/sys/uvm/uvm_amap.c log diff annotate
src/sys/uvm/uvm_anon.c log diff annotate
src/sys/uvm/uvm_aobj.c log diff annotate
src/sys/uvm/uvm_fault.c log diff annotate
src/sys/uvm/uvm_glue.c log diff annotate
src/sys/uvm/uvm_km.c 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_page.c log diff annotate
src/sys/uvm/uvm_page.h log diff annotate
src/sys/uvm/uvm_pager.c log diff annotate
src/sys/uvm/uvm_swap.c log diff annotate
src/sys/uvm/uvm_vnode.c log diff annotate
message Remove parenthesis around return value to reduce the diff with NetBSD.

No functional change.

ok mlarkin@

date 2021-03-26T19:00:21Z
author kn
files src/sys/net/if_mpe.c log diff annotate
src/sys/net/if_mpip.c log diff annotate
src/sys/net/if_mpw.c log diff annotate
message Only install route with label, fix route leak on destroy

ifconfig mp* mplslabel N" validates the label both in ifconfig(8) and each
driver's ioctl handler, but there is one case where all drivers install
a route without looking at the label at all.

SIOCSLIFPHYRTABLE in all three drivers just validates the rdomain and sets
the label to itself (0) such that the route is (re)installed accordingly.

None of the driver's helper functions dealing with labels and routes
validate labels themselves but instead expect the callees, e.g. the ioctl
handler to do so.

That means we can install routes for the explicit NULL label in non-default
routing tables but are never able to clean them up without reboot.

Fix this by adding the inverse of mp*_clone_destroy()'s label check to the
routines installing the MPLS route to avoid bogus ones in the first place.

OK claudio

date 2021-03-26T21:17:10Z
author bluhm
files src/sys/dev/dt/dt_dev.c log diff annotate
message Initialize error variable in dtread().
OK mpi@

date 2021-03-26T22:40:08Z
author mvs
files src/sys/net/rtsock.c log diff annotate
message Push kernel lock down to rt_setsource() to make `ifa' dereference safe.
Netlock doesn't make sense here because ifa_ifwithaddr() holds kernel
lock while performs lists walkthrough.

This was made to decrease the future diff for PF_ROUTE sockets
unlocking. This time kernel lock is still held while we perform
rt_setsource().

ok mpi@

date 2021-03-26T22:41:06Z
author mvs
files src/sys/net/if.c log diff annotate
src/sys/net/rtable.c log diff annotate
message Push kernel lock within rtable_add(9) and rework it to return 0 in the
case when requested table is already exists.

Except initialization time, route_output() and if_createrdomain() are the
only paths where we call rtable_add(9). We check requested table existence
by rtable_exists(9) and it's not the error condition if the table exists.
Otherwise we are trying to create requested table by rtable_add(9). Those
paths are kernel locked so concurrent thread can't create requested table
just after rtable_exists(9) check. Also rtable_add(9) has internal
rtable_exists(9) check and in this case the table existence assumed as
EEXIST error. This error path is never reached.

We are going to unlock PF_ROUTE sockets. This means route_output() will
not be serialized with if_createrdomain() and concurrent thread could
create requested table. Table existence check and creation should be
serialized and it makes sense to do this within rtable_add(9). This time
kernel lock is used for this so it pushed down to rtable_add(9). The
internal rtable_exists(9) check was modified and table existence is not
error now.

Since the external rtable_exists(9) check is useless it was removed from
if_createrdomain(). It still exists in route_output() path because the
logic is more complicated here.

ok mpi@

date 2021-03-26T22:54:41Z
author kn
files src/sys/dev/fdt/cwfg.c log diff annotate
message Flag sensors as invalid on bogus reads

Follow-up to the previous commit:

This driver continues to report stale hw.sensors values when reading
them fails, which can easily be observed on a Pinebook Pro after
plugging in the AC cable, causing the hw.sensors.cwfg0.raw0 (battery
remaining minutes) value to jump considerably one or two times before
stalling and becoming incoherent with the rest.

Flag sensors invalid upfront in apm's fashion and mark them OK iff they
yield valid values; this is what other drivers such as rktemp(4) do,
but the consequence/intention of SENSOR_FINVALID is sysctl(8) and systat(8)
skipping such sensors (until AC gets plugged off again).

OK patrick

date 2021-03-26T22:55:48Z
author kn
files src/sys/arch/arm64/dev/apm.c log diff annotate
message Fix errno, merge ioctl cases

The EBADF error is always overwritten for the standby, suspend and
hibernate ioctls, only the mode ioctl has it right.

Merge the now identical casese while here.

OK patrick

date 2021-03-26T23:29:21Z
author kn
files src/sys/arch/arm64/stand/efiboot/efiboot.c log diff annotate
message Fix "mach dtb" return code to avoid bogus boot

Bootloader command functions must return zero in case of failure,
returning 1 tells the bootloader to boot the currently set kernel iamge.

"machine dtb" is is the wrong way around so using it triggers a boot.

Fix this and print a brief usage (like other commands such as "hexdump" do)
while here.

Feedback OK patrick

date 2021-03-26T23:34:50Z
author kn
files src/sys/arch/macppc/dev/apm.c log diff annotate
message Return EOPNOTSUPP for unsupported ioctls

Match what apm(4/macppc) says and make apmd(8) log an approiate warning when
unsupported power actions are requested.

Merge identical cases while here.

This syncs with the apm ioctl handlers on loongson and arm64.