OpenBSD cvs log

created 2023-04-30T19:31:04Z
begin 2023-04-25T00:00:00Z
end 2023-04-26T00:00:00Z
path src/sys
commits 24

date 2023-04-25T00:58:47Z
author cheloha
files src/sys/kern/kern_clock.c log diff annotate
src/sys/kern/subr_prof.c log diff annotate
src/sys/sys/resourcevar.h log diff annotate
message addupc_intr: support adding multiple profiling ticks at once

Add a third parameter to addupc_intr(), "u_long nticks". This will
allow us to credit more than one profiling tick to the thread at once.
Should be useful in the unusual case where the clock interrupt is
masked for an extended period.

date 2023-04-25T01:32:36Z
author cheloha
files src/sys/kern/subr_prof.c log diff annotate
message prof_state_toggle: keep a count of CPUs with profiling enabled

On MULTIPROCESSOR systems, the following sequence of kgmon(8)
invocations leaves the statclock() frequency at stathz when there is
still a CPU on the system where the gmon state is GMON_PROF_ON:

# kgmon -c 0 -b
# kgmon -c 1 -b
# kgmon -c 0 -h

The problem is that we aren't counting CPUs with profiling enabled.
Add "gmon_cpu_count" to keep a count. Call startprofclock() for the
first CPU to enable profiling and stopprofclock() for the last CPU to
disable profiling.

date 2023-04-25T08:27:59Z
author jsg
files src/sys/dev/pci/pcidevs log diff annotate
message add Kingston KC3000 from Paul de Weerd
and Samsung PM9B1 as found in sthen's t14 gen 3 intel

date 2023-04-25T08:28:27Z
author jsg
files src/sys/dev/pci/pcidevs.h log diff annotate
src/sys/dev/pci/pcidevs_data.h log diff annotate
message regen

date 2023-04-25T10:06:12Z
author kn
files src/sys/arch/amd64/stand/boot/conf.c log diff annotate
src/sys/arch/amd64/stand/cdboot/conf.c log diff annotate
src/sys/arch/amd64/stand/libsa/biosdev.c log diff annotate
src/sys/arch/amd64/stand/pxeboot/conf.c log diff annotate
message Do not attempt to write to read-only softraid

Bootloaders have no write support for softraid volumes, which manifests in,
e.g. /bsd.upgrade not being stripped of its 'x' permission bit to prevent
sysupgrade loops in case of upgrade failure.

Set a no-write flag handled by libsa to bail out early in write calls.
There should be no real behaviour change, writes just fail earlier now.

amd64 BIOS bits first, rest to come. Crank minor.

"seems sensible" jsing

date 2023-04-25T10:11:20Z
author kn
files src/sys/arch/amd64/stand/efiboot/conf.c log diff annotate
src/sys/arch/amd64/stand/efiboot/efidev.c log diff annotate
message Do not attempt to write to read-only softraid

Bootloaders have no write support for softraid volumes, which manifests in,
e.g. /bsd.upgrade not being stripped of its 'x' permission bit to prevent
sysupgrade loops in case of upgrade failure.

Set a no-write flag handled by libsa to bail out early in write calls.
There should be no real behaviour change, writes just fail earlier now.

amd64 EFI bits, other architectues to come. Crank minor.

"seems sensible" jsing

date 2023-04-25T10:35:48Z
author patrick
files src/sys/arch/arm64/dev/agintc.c log diff annotate
message Invalidate ITS caches during suspend/resume cycle to commit the changes
to the LPIs. So far we have only flipped the enable bit in the shared
memory, but it turns out that the state is actually cached in the ITS.
We have to send an invalidation to flush it, both after disabling and
enabling the LPI. We probably also should do it after establishing an
interrupt, and especially when disestablishing, e.g. for PCIe hotplug.

Since we do not currently store the device/event IDs we cannot do a
targeted invalidation and have to fall back to sending one that clears
the whole cache to each ITS. In the future we should keep some more
state per established LPI.

Furthermore we currently keep a list of LPIs in each ITS instance, which
means in case we have multiple ITS we will re-use LPI numbers. But since
there's no relevant HW so far that has those, there's no rish to fix that.

This fixes suspend/resume on x13s with NVMe+MSI.

ok kettenis@

date 2023-04-25T11:12:38Z
author tobhe
files src/sys/dev/fdt/pwmleds.c log diff annotate
message Disable keyboard backlight on Apple Silicon laptops on suspend,
restore on wakeup.

ok patrick@ kettenis@

date 2023-04-25T11:21:01Z
author patrick
files src/sys/dev/fdt/pwmbl.c log diff annotate
message Add suspend/resume support to pwmbl(4), so that when suspending the x13s
the display turns off and it actually looks like it's properly suspended.

ok kettenis@ tobhe@

date 2023-04-25T11:36:55Z
author patrick
files src/sys/dev/fdt/dwpcie.c log diff annotate
message Enable power management for PCI devices.

ok kettenis@

date 2023-04-25T12:13:15Z
author krw
files src/sys/arch/octeon/stand/boot/Makefile log diff annotate
src/sys/arch/powerpc64/stand/boot/Makefile log diff annotate
message Create & use variables MRDISKTYPE and MRMAKEFSARGS like all the other build
makefiles.

Fixes & ok kn@

No intentional functional change.

date 2023-04-25T12:36:30Z
author mpi
files src/sys/uvm/uvm_map.c log diff annotate
src/sys/uvm/uvm_map.h log diff annotate
message Do not grab the `vmmaplk' recursively, prevent a self-deadlock.

Change the semantic of vm_map_busy() to be able to completely unlock the
`vmmaplk' instead of downgrading it to a read lock in mlock(2). This is
necessary because uvm_fault_wire() tries to re-grab the same lock.

We now keep track of the thread currently holding the vmmap busy to ensure
it can relock & unbusy the vmmap. The new pattern becomes:

....vm_map_lock(map);
....vm_map_busy(map); /* prevent other threads to grab an exclusive lock */
....vm_map_unlock(map);
....
..../*
.... * Do some stuff generally requiring a tsleep(9).
.... */
....
....vm_map_lock(map);
....vm_map_unbusy(map); /* allow other threads to make progress after unlock */
....vm_map_unlock(map);

Fix adapted from NetBSD's r1.249 of uvm/uvm_map.c. Issue reported by
Jacqueline Jolicoeur exposed by a "wallet refresh" of the Monero App.
Panic hand-copied below:

sleep_finish()
rw_enter()
uvmfault_lookup()
uvm_fault_check()
uvm_fault()
uvm_fault_wire()
uvm_map_pageable_wire()
sys_mlock()

ok kettenis@

date 2023-04-25T12:46:13Z
author dv
files src/sys/arch/amd64/include/vmmvar.h log diff annotate
message vmm(4)/vmd(8): pull struct members out of vmm ioctl create struct.

The object sent to vmm(4) contained file paths and details the
kernel does not need for cpu virtualization as device emulation is
in userland. Effectively, "pull up" the struct members from the
vm_create_params struct to the parent vmop_create_params struct.

This allows us to clean up some of vmd(8) and simplify things for
switching to having vmctl(8) open the "kernel" file (SeaBIOS, bsd.rd,
etc.) to allow users to boot recovery ramdisk kernels.

ok mlarkin@

date 2023-04-25T14:00:35Z
author kn
files src/sys/arch/sparc64/stand/ofwboot/ofdev.c log diff annotate
src/sys/arch/sparc64/stand/ofwboot/vers.c log diff annotate
message Do not attempt to write to read-only softraid

Bootloaders have no write support for softraid volumes, which manifests in,
e.g. /bsd.upgrade not being stripped of its 'x' permission bit to prevent
sysupgrade loops in case of upgrade failure.

Set a no-write flag handled by libsa to bail out early in write calls.
There should be no real behaviour change, writes just fail earlier now.

sparc64 ofwboot. Crank minor.
Tested on T4-2 guest domain with root on softraid.

date 2023-04-25T14:04:47Z
author kn
files src/sys/arch/riscv64/conf/RAMDISK log diff annotate
message Enable softraid(4) in the ramdisk kernel aka. make disk crypto install work

GENERIC, efiboot and installboot(8) all have softraid enabled, the manual
already documents boot support for riscv64, "just" bsd.rd lacks it.
(thought I had committed this months ago...)

SiFive HiFive Unmatched A00.

OK patrick

date 2023-04-25T14:48:16Z
author kn
files src/sys/arch/i386/stand/boot/conf.c log diff annotate
message Do not attempt to write to read-only softraid

Bootloaders have no write support for softraid volumes, which manifests in,
e.g. /bsd.upgrade not being stripped of its 'x' permission bit to prevent
sysupgrade loops in case of upgrade failure.

Set a no-write flag handled by libsa to bail out early in write calls.
There should be no real behaviour change, writes just fail earlier now.

i386 BIOS. Crank minor.
Tested inside amd64 vmm.

date 2023-04-25T14:48:17Z
author kn
files src/sys/arch/i386/stand/cdboot/conf.c log diff annotate
src/sys/arch/i386/stand/libsa/biosdev.c log diff annotate
src/sys/arch/i386/stand/pxeboot/conf.c log diff annotate
message Do not attempt to write to read-only softraid

Bootloaders have no write support for softraid volumes, which manifests in,
e.g. /bsd.upgrade not being stripped of its 'x' permission bit to prevent
sysupgrade loops in case of upgrade failure.

Set a no-write flag handled by libsa to bail out early in write calls.
There should be no real behaviour change, writes just fail earlier now.

i386 BIOS. Crank minor.
Tested inside amd64 vmm.

date 2023-04-25T15:41:17Z
author phessler
files src/sys/netinet6/nd6_nbr.c log diff annotate
message When configuring a new address on an interface, an upstream router
doesn't know where to send traffic. This will send an unsolicited
neighbor advertisement, as described in RFC9131, to the all-routers
multicast address so all routers on the same link will learn the path
back to the address.

This is intended to speed up the first return packet on an IPv6 interface.

OK florian@

date 2023-04-25T16:24:25Z
author bluhm
files src/sys/netinet/if_ether.c log diff annotate
message Exclusive net lock or mutex arp_mtx protect the llinfo_arp fields.
So kernel lock is only needed for changing the route rt_flags. In
arpresolve() protect rt_llinfo lookup and llinfo_arp modification
with arp_mtx. Grab kernel lock for rt_flags reject modification
only when needed.
Tested by Hrvoje Popovski; OK patrick@ kn@

date 2023-04-25T16:59:57Z
author tb
files src/sys/lib/libz/adler32.c log diff annotate
src/sys/lib/libz/compress.c log diff annotate
src/sys/lib/libz/crc32.c log diff annotate
src/sys/lib/libz/deflate.c log diff annotate
src/sys/lib/libz/deflate.h log diff annotate
src/sys/lib/libz/infback.c log diff annotate
src/sys/lib/libz/inffast.c log diff annotate
src/sys/lib/libz/inffast.h log diff annotate
src/sys/lib/libz/inflate.c log diff annotate
src/sys/lib/libz/inftrees.c log diff annotate
src/sys/lib/libz/inftrees.h log diff annotate
src/sys/lib/libz/trees.c log diff annotate
src/sys/lib/libz/zconf.h log diff annotate
src/sys/lib/libz/zlib.h log diff annotate
src/sys/lib/libz/zutil.c log diff annotate
src/sys/lib/libz/zutil.h log diff annotate
message zlib: sync with src

date 2023-04-25T18:14:06Z
author claudio
files src/sys/kern/kern_exit.c log diff annotate
src/sys/kern/kern_fork.c log diff annotate
src/sys/sys/proc.h log diff annotate
message Rename ps_refcnt to ps_threadcnt in struct process and implement
P_HASSIBLING() using this count.
OK mvs@ mpi@

date 2023-04-25T21:57:29Z
author kettenis
files src/sys/dev/pci/pcidevs log diff annotate
message Add RK3588.

date 2023-04-25T21:58:36Z
author kettenis
files src/sys/dev/pci/pcidevs.h log diff annotate
src/sys/dev/pci/pcidevs_data.h log diff annotate
message regen

date 2023-04-25T22:56:28Z
author bluhm
files src/sys/netinet/tcp_output.c log diff annotate
message Fix white space.