OpenBSD cvs log

created 2020-04-04T17:46:18Z
begin 2020-04-03T00:00:00Z
end 2020-04-04T00:00:00Z
path src/sys
commits 14

date 2020-04-03T03:20:12Z
author visa
files src/sys/kern/kern_ktrace.c log diff annotate
message Take an explicit write reference when associating a thread with a ktrace
vnode. This lets other parts of the kernel see the vnode as active for
writing. In particular, now quotaon_vnode() properly sets up quotas for
ktrace vnodes. This fixes a crash that could happen if quotas were
turned on while a process was ktraced.

ktrace vnodes are opened for writing and an initial write reference
is provided for them by vn_open(9). However, this reference is removed,
too early, when sys_ktrace() calls vn_close(9).

Crash reported and fix tested by Bryan Stenson

OK mpi@

date 2020-04-03T03:36:56Z
author visa
files src/sys/kern/kern_smr.c log diff annotate
message Adjust SMR_ASSERT_CRITICAL() and SMR_ASSERT_NONCRITICAL() so that the
panic message shows the actual code location of the assert. Do this by
moving the assert logic inside the macros.

Prompted by and OK claudio@
OK mpi@

date 2020-04-03T03:36:57Z
author visa
files src/sys/sys/smr.h log diff annotate
message Adjust SMR_ASSERT_CRITICAL() and SMR_ASSERT_NONCRITICAL() so that the
panic message shows the actual code location of the assert. Do this by
moving the assert logic inside the macros.

Prompted by and OK claudio@
OK mpi@

date 2020-04-03T08:08:51Z
author mpi
files src/sys/miscfs/fuse/fuse_device.c log diff annotate
message Return POLLERR instead of EINVAL in fusepoll().

ok kettenis@

date 2020-04-03T08:24:52Z
author mpi
files src/sys/arch/arm64/arm64/acpiapm.c log diff annotate
src/sys/arch/i386/i386/acpiapm.c log diff annotate
src/sys/dev/cons.c log diff annotate
src/sys/dev/acpi/acpi.c log diff annotate
message Fix incoherencies of errors returned by various *kqfilter routines.

EOPNOTSUPP is returned when there's no "filterops" for a given fd.
EINVAL when the requested filter isn't supported by the "filterops".
ENXIO means the underlying device is no longer valid/present.

ok visa@

date 2020-04-03T08:24:53Z
author mpi
files src/sys/dev/usb/ugen.c log diff annotate
src/sys/dev/usb/uhid.c log diff annotate
message Fix incoherencies of errors returned by various *kqfilter routines.

EOPNOTSUPP is returned when there's no "filterops" for a given fd.
EINVAL when the requested filter isn't supported by the "filterops".
ENXIO means the underlying device is no longer valid/present.

ok visa@

date 2020-04-03T08:32:21Z
author stsp
files src/sys/dev/pci/if_iwm.c log diff annotate
src/sys/dev/pci/if_iwmvar.h log diff annotate
src/sys/dev/pci/if_iwx.c log diff annotate
src/sys/dev/pci/if_iwxvar.h log diff annotate
message Fix an automatic Tx rate control issue in iwm(4) and iwx(4).

During a transmit burst, e.g. while tcpbench is running, iwm and iwx will
queue up to 224 frames on the Tx ring.

Rate control will make decisions a lot more often than just every 224 frames.
Which means that results were reported and evaluated even if they did not
correspond to the most recently chosen rate, spoiling the data available
to the rate control algorithm.

Prevent this problem by only reporting frames which match the currently
chosen Tx rate.

ok mpi@

date 2020-04-03T09:57:07Z
author jsg
files src/sys/dev/pci/drm/drm_dp_mst_topology.c log diff annotate
message Revert "drm/dp_mst: Skip validating ports during destruction, just ref"

From Lyude Paul
013b14652972949c5e8446b1e8ca9868780f5c7a in linux 4.19.y/4.19.114
9765635b30756eb74e05e260ac812659c296cd28 in mainline linux

date 2020-04-03T13:31:11Z
author mpi
files src/sys/sys/conf.h log diff annotate
message Kill unused cdev_mousewr_init().

ok jca@, jsg@

date 2020-04-03T16:26:14Z
author kettenis
files src/sys/dev/fdt/sdhc_fdt.c log diff annotate
message The dtb I'm using for my rockpro64 has an "assigned-clocks" property so
add a call to set handle those.

date 2020-04-03T16:29:17Z
author kettenis
files src/sys/arch/arm64/conf/GENERIC log diff annotate
src/sys/arch/arm64/conf/RAMDISK log diff annotate
src/sys/dev/fdt/files.fdt log diff annotate
src/sys/dev/fdt/rkrng.c log diff annotate
message Add rkrng(4), a driver for the random number generator found on various
Rockchip SoCs.

ok kurt@

date 2020-04-03T20:11:47Z
author patrick
files src/sys/dev/usb/ehci.c log diff annotate
src/sys/dev/usb/ohci.c log diff annotate
src/sys/dev/usb/uhci.c log diff annotate
src/sys/dev/usb/usbdi.c log diff annotate
src/sys/dev/usb/xhci.c log diff annotate
src/sys/dev/usb/dwc2/dwc2.c log diff annotate
message Move the responsibility of syncing the data buffers from the USB
stack into the USB controller driver, since not all of the xfers
actually use DMA and some invalidations might even be harmful.

The important part is to sync before handing the buffer to the
controller, and to sync on a successful transfer before handing
it back to the USB stack. For isoc transfers it's easier to sync
the complete length of the transfer, since the buffer to flush is
not filled in a contiguous fashion.

For dwc2 there's a common point which takes care of the start
of transfers from or to devices, where we can make sure that our
buffers are synced. On completion, there's a common point before
handing it off to the USB stack.

For ehci there are three places which take care of the start
of transfers from or to devices, where one already does the sync,
while the two other places still need the sync. There are two
completion handler (isoc and non-isoc), where one already has a
comment asking for the need of a sync. The done handler for intr
xfers does a sync that is not needed anymore after adding the sync
in the completion handler.

For ohci there are three places which take care of the start
of transfers from or to devices, where all of them were still in
need of the sync. For completion, there is one place for isoc
xfers and two places for handling successful generic xfers.

For uhci there are two places which take care of the start
of transfers from or to device, where all of them were still in
need of the sync. For completion, there is one handler for both
isoc and non-isoc xfers where syncs need to occur.

For xhci there are three places which take care of the start
of transfers from or to device, where all of them were still in
need of the sync. For completion, there is one handler for isoc
and one for non-isoc xfers where syncs need to occur.

With this we can revert the workaround that implicitly allocated
buffers are COHERENT, since now control transfers fulfilled by the
driver code (instead of the controller doing DMA) are not flushed
into oblivion anymore.

Tested by Janne Johansson with dwc2 (octeon)
Tested by kettenis@ with xhci(4) (octeon)
Tested by patrick@ with ehci(4) on a Cubox-i (armv7)
Tested by patrick@ with xhci(4) on an i.MX8MQ (arm64)
Tested by tobhe@ with dwc2 on a rPi 3b (arm64)
ok kettenis@

date 2020-04-03T22:03:45Z
author kettenis
files src/sys/dev/fdt/rkemmcphy.c log diff annotate
message Put back the code to enable and set the output tap delay. Tis fixes
the eMMC module on my rockpro64 and doesn't break the eMMC on the rk3399-q7
board I have. Sadly the eMMC on my firefly-rk3399 died, which may
or may not have something to do with the fact that there were issues
with enabling the output tap delay on that board.

ok patrick@

date 2020-04-03T23:18:36Z
author jsg
files src/sys/arch/armv7/conf/RAMDISK log diff annotate
message increase rdroot size

ok kettenis@ deraadt@