OpenBSD cvs log

created 2024-03-31T03:40:45Z
begin 2024-03-26T00:00:00Z
end 2024-03-27T00:00:00Z
path src/sys
commits 11

date 2024-03-26T00:53:51Z
author dlg
files src/sys/sys/kstat.h log diff annotate
message amps and watts types

volts felt lonely

date 2024-03-26T01:28:17Z
author jsg
files src/sys/dev/pci/drm/i915/gem/i915_gem_mman.c log diff annotate
src/sys/dev/pci/drm/i915/gem/i915_gem_object_types.h log diff annotate
src/sys/dev/pci/drm/i915/gem/i915_gem_ttm.c log diff annotate
message adapt ttm fault handler to OpenBSD
used by gem objects on dg2

date 2024-03-26T09:46:47Z
author mvs
files src/sys/kern/sys_socket.c log diff annotate
src/sys/kern/uipc_socket.c log diff annotate
src/sys/kern/uipc_socket2.c log diff annotate
src/sys/kern/uipc_usrreq.c log diff annotate
src/sys/miscfs/fifofs/fifo_vnops.c log diff annotate
src/sys/sys/socketvar.h log diff annotate
message Use `sb_mtx' to protect `so_rcv' receive buffer of unix(4) sockets.

This makes re-locking unnecessary in the uipc_*send() paths, because
it's enough to lock one socket to prevent peer from concurrent
disconnection. As the little bonus, one unix(4) socket can perform
simultaneous transmission and reception with one exception for
uipc_rcvd(), which still requires the re-lock for connection oriented
sockets.

The socket lock is not held while filt_soread() and filt_soexcept()
called from uipc_*send() through sorwakeup(). However, the unlocked
access to the `so_options', `so_state' and `so_error' is fine.

The receiving socket can't be or became listening socket. It also can't
be disconnected concurrently. This makes immutable SO_ACCEPTCONN,
SS_ISDISCONNECTED and SS_ISCONNECTED bits which are clean and set
respectively.

`so_error' is set on the peer sockets only by unp_detach(), which also
can't be called concurrently on sending socket.

This is also true for filt_fiforead() and filt_fifoexcept(). For other
callers like kevent(2) or doaccept() the socket lock is still held.

ok bluhm

date 2024-03-26T10:01:57Z
author bluhm
files src/sys/net/rtable.c log diff annotate
message Avoid NULL pointer dereference in routing table an_match().

OK mvs@

date 2024-03-26T11:09:02Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_drv.c log diff annotate
message test bl_idx instead of the connector type to check for backlight
tested by tb@

date 2024-03-26T11:17:36Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_drv.c log diff annotate
message Temporarily change the connector to unregistered when adding the backlight
property to avoid warnings. Matches how inteldrm_native_backlight()
handles this.

problem reported and fix tested by tb@

date 2024-03-26T14:46:48Z
author claudio
files src/sys/arch/sparc64/stand/ofwboot/boot.c log diff annotate
src/sys/arch/sparc64/stand/ofwboot/vers.c log diff annotate
message Implement the chmod a-x bsd.upgrade trick in the sparc64 ofwboot bootloader.
OK deraadt@ florian@ kn@

date 2024-03-26T18:18:30Z
author bluhm
files src/sys/kern/kern_lock.c log diff annotate
src/sys/sys/mutex.h log diff annotate
message Improve spinning in mtx_enter().

Instead of calling mtx_enter_try() in each spinning loop, do it
only if the result of a lockless read indicates that the mutex has
been released. This avoids some expensive atomic compare-and-swap
operations. Up to 5% reduction of spinning time during kernel build
can been seen on a 8 core amd64 machine. On other machines there
was no visible effect.

Test on powerpc64 has revealed a bug in mtx_owner declaration. Not
the variable was volatile, but the object it points to. Move the
volatile declaration in struct mutex to avoid a hang when going to
multiuser.

from Mateusz Guzik; input kettenis@ jca@; OK mpi@

date 2024-03-26T22:26:04Z
author kettenis
files src/sys/arch/riscv64/stand/efiboot/Makefile log diff annotate
src/sys/arch/riscv64/stand/efiboot/conf.c log diff annotate
src/sys/arch/riscv64/stand/efiboot/efiboot.c log diff annotate
src/sys/arch/riscv64/stand/efiboot/efiboot.h log diff annotate
src/sys/arch/riscv64/stand/efiboot/efiriscv.c log diff annotate
message Implement support for the RISC-V UEFI Boot Protocol. This provides us
the boot hart ID for firmware that doesn't provide it through the device
tree such as the EDK2-based firmware for the Sophgo SG2042 SoC.

ok patrick@, miod@

date 2024-03-26T22:46:48Z
author kettenis
files src/sys/arch/riscv64/riscv64/machdep.c log diff annotate
message The devicetree standard allows for multiple /memory nodes, each with
multiple memory ranges. We support the latter, but not the former.
Fix this, such that we detect all the memory on the Milk-V Pioneer
board.

ok miod@

date 2024-03-26T23:48:49Z
author bluhm
files src/sys/netinet6/frag6.c log diff annotate
message Additional length check for IPv6 reassembled fragments.

FreeBSD-SA-23:06.ipv6 security advisory has added an additional
overflow check in frag6_input(). OpenBSD is not affected by that
as the bug was introduced by another change in 2019. The existing
code is complicated and NetBSD has taken the FreeBSD fix, although
they were also not affected.

The additional check makes the complicated code more robust. Length
calculation taken from NetBSD. Discussed with FreeBSD.

OK sashan@ mvs@