OpenBSD cvs log

created 2024-11-09T21:34:44Z
begin 2024-11-05T00:00:00Z
end 2024-11-06T00:00:00Z
path src/sys
commits 34

date 2024-11-05T00:54:32Z
author yasuoka
files src/sys/arch/amd64/conf/GENERIC log diff annotate
message Enable ixv(4)

ok jan

date 2024-11-05T06:03:19Z
author jsg
files src/sys/kern/kern_sig.c log diff annotate
src/sys/kern/tty_pty.c log diff annotate
src/sys/kern/uipc_usrreq.c log diff annotate
src/sys/kern/vfs_syscalls.c log diff annotate
src/sys/kern/vfs_vnops.c log diff annotate
src/sys/nfs/nfs_serv.c log diff annotate
src/sys/nfs/nfs_vnops.c log diff annotate
message remove VATTR_NULL() define, directly call vattr_null()

There used to be a predefined null vattr for !DIAGNOSTIC
but that was removed in vnode.h rev 1.84 in 2007.

ok semarie@ miod@

date 2024-11-05T06:03:20Z
author jsg
files src/sys/sys/vnode.h log diff annotate
message remove VATTR_NULL() define, directly call vattr_null()

There used to be a predefined null vattr for !DIAGNOSTIC
but that was removed in vnode.h rev 1.84 in 2007.

ok semarie@ miod@

date 2024-11-05T08:11:54Z
author mpi
files src/sys/dev/dt/dt_dev.c log diff annotate
message Tweak softc initialization:

- move softintr_establish(), which allocates memory, into dtalloc()
- Use M_DEVBUF consistently for all memory chunks in the softc.
- Do not check for NULL before calling free(9).

Reviewed by Christian Ludwig, ok miod@

date 2024-11-05T08:12:08Z
author miod
files src/sys/dev/wscons/wsemul_vt100.c log diff annotate
src/sys/dev/wscons/wsemul_vt100_subr.c log diff annotate
src/sys/dev/wscons/wsemul_vt100var.h log diff annotate
src/sys/dev/wscons/wsemulvar.h log diff annotate
message Add support for CSI b control sequence (repeat last printed character) to
the wscons vt100 emulation. Based on a diff from Crystal Kolipe, modified
to properly handle partial updates, verified to work with udl(4).

date 2024-11-05T08:13:41Z
author mpi
files src/sys/uvm/uvm_fault.c log diff annotate
message Handle faults on wired map entries similarly to VM_FAULT_WIRE faults.

It is valid to fault on wired mappings if the object was truncated then grown
again.

Adapted from NetBSD r1.207, ok miod@

date 2024-11-05T08:15:01Z
author mpi
files src/sys/uvm/uvm_fault.c log diff annotate
message Check if the mapping for an vm_map_entry exists while holding its lock.

Prevent a race where the mapped object is being truncated while we are spinning
to unwire it.

Reported-by: [email protected]

Adapted from NetBSD r1.207, ok miod@

date 2024-11-05T08:16:40Z
author mpi
files src/sys/uvm/uvm_fault.c log diff annotate
message Do not put wired pages on the page queues & release their swap resources.

While here move the code to release swap resources outside of the pageq
mutex and shuffle some locking dances to reduce differences with NetBSD.

ok miod@

date 2024-11-05T08:18:44Z
author mpi
files src/sys/uvm/uvm_map.c log diff annotate
message Stop grabbging the KERNEL_LOCK() for uvm_fault_unwire_locked() in the reaper.

The vmap lock is enough to unwire entries.

ok kettenis@

date 2024-11-05T08:51:23Z
author miod
files src/sys/arch/landisk/landisk/intr.c log diff annotate
src/sys/arch/sh/include/cpu.h log diff annotate
message Rename ci_intrdepth to ci_idepth in preparation for MI use of it; I mistakenly
picked the old name when introducing this field.
Reminded by mpi@

date 2024-11-05T09:14:19Z
author claudio
files src/sys/kern/kern_sig.c log diff annotate
src/sys/kern/sys_generic.c log diff annotate
src/sys/kern/uipc_syscalls.c log diff annotate
message Unlock ptsignal by using the ps_mtx instead of KERNEL_LOCK to ensure
the process is not modified during signal delivery.
This also unlocks psignal and prsignal since those are simple wrappers
around ptsignal.

OK mpi@

date 2024-11-05T09:42:48Z
author miod
files src/sys/arch/alpha/stand/nboot/boot.8 log diff annotate
src/sys/arch/amd64/stand/boot/boot.8 log diff annotate
src/sys/arch/hppa/stand/boot/boot.8 log diff annotate
src/sys/arch/i386/stand/boot/boot.8 log diff annotate
src/sys/arch/landisk/stand/boot/boot.8 log diff annotate
message The MI boot code used to have an infinite loop trying to boot the kernel,
which got limited to at most two tries 26 years ago for the 2.3 release,
but the documentation was never updated to match this change. Do it now.

Reported by Nir Lichtman on tech@

date 2024-11-05T09:42:49Z
author miod
files src/sys/arch/luna88k/stand/boot/boot.8 log diff annotate
message The MI boot code used to have an infinite loop trying to boot the kernel,
which got limited to at most two tries 26 years ago for the 2.3 release,
but the documentation was never updated to match this change. Do it now.

Reported by Nir Lichtman on tech@

date 2024-11-05T09:45:22Z
author miod
files src/sys/arch/macppc/stand/boot.8 log diff annotate
message The MI boot code used to have an infinite loop trying to boot the kernel,
which got limited to at most two tries 26 years ago for the 2.3 release,
but the documentation was never updated to match this change. Do it now.

Reported by Nir Lichtman on tech@, file forgotten in previous commit

date 2024-11-05T10:19:11Z
author miod
files src/sys/ddb/db_break.c log diff annotate
src/sys/ddb/db_run.c log diff annotate
message Correctly honour the count optional argument of the break command, by
actually not causing execution to stop until the breakpoint is hit at
least count times.
Noticed and fix by Nir Lichtman on tech@

date 2024-11-05T10:49:23Z
author bluhm
files src/sys/kern/kern_sysctl.c log diff annotate
src/sys/netinet/in_pcb.c log diff annotate
src/sys/netinet/in_pcb.h log diff annotate
src/sys/netinet/udp_usrreq.c log diff annotate
src/sys/netinet6/in6_pcb.c log diff annotate
message Replace rwlock with iterator in UDP input multicast loop.

The broadcast and multicast loop in udp_input() is protected by the
table mutex. The relevant PCBs were collected in a separate list,
which was processed while the table notify rwlock was held. When
sending UDP multicast packets over vxlan(4) configured over UDP
with multicast groups, this lock was taken recursively causing a
kernel crash.
By using an iterator, traversing the PCB list of the table does not
require to hold the mutex all the time. Only while accessing the
next element after the iterator, the mutex is taken for a short
time. udp_sbappend() and the upcall to vxlan_input() is done with
neither mutex nor rwlock. The PCB is reference counted while
traversing the list.

crash reported by Holger Glaess; iterator implemented by mvs@;
tested and fixed by bluhm@; OK mvs@

date 2024-11-05T13:15:13Z
author jsg
files src/sys/sys/mbuf.h log diff annotate
message remove unused M_MAXCOMPRESS MCLOFSET; ok claudio@ miod@

date 2024-11-05T13:28:35Z
author bluhm
files src/sys/dev/ic/psp.c log diff annotate
src/sys/dev/ic/pspvar.h log diff annotate
message Implement psp(4) shutdown command and ioctl(2) PSP_IOC_SHUTDOWN.

This will be used by vmd(8) to reset psp(4) on startup.

from hshoexer@; OK mlarkin@

date 2024-11-05T14:49:52Z
author miod
files src/sys/arch/macppc/stand/alloc.c log diff annotate
src/sys/arch/macppc/stand/conf.c log diff annotate
src/sys/arch/sparc64/stand/ofwboot/alloc.c log diff annotate
src/sys/arch/sparc64/stand/ofwboot/vers.c log diff annotate
message Apply the changes in sys/lib/libsa/alloc.c 1.13 to the other copies of that
file modified to use OpenFirmware routines:
``Make the freelist best fit code a tiny bit smarter to not use a block if
half or more would be wasted. Causes more effective re-use of blocks.''

Bump bootloader version in the unlikely case this misbehaves on some machines.

date 2024-11-05T15:29:00Z
author mpi
files src/sys/uvm/uvm_pdaemon.c log diff annotate
message Use computed `shortage' value instead of `uvmexp.free' in uvmpd_scan_inactive().

ok miod@

date 2024-11-05T15:32:08Z
author mpi
files src/sys/uvm/uvm_fault.c log diff annotate
message Use a helper to get lower page from backing store: uvm_fault_lower_io().

Reduce differences with NetBSD, no behavior change.

ok tb@, miod@

date 2024-11-05T15:34:30Z
author mpi
files src/sys/kern/sysv_shm.c log diff annotate
message Prevent a double free by unlinking the descriptor before unmaping & freeing it.

Reported-by: [email protected]

ok millert@

date 2024-11-05T15:54:12Z
author miod
files src/sys/dev/wscons/wsemul_vt100_subr.c log diff annotate
message Implement CSI s and CSI u to save and restore cursor position. These are
supported by the FreeBSD syscon and some software assumes running on *BSD
implies they work.

date 2024-11-05T16:33:18Z
author kettenis
files src/sys/arch/arm64/stand/efiboot/efiboot.c log diff annotate
message Fix typo in smbios product string for the HP OmniBook X.
Keep entries sorted by vendor.

ok miod@, mlarkin@

date 2024-11-05T16:53:30Z
author miod
files src/sys/dev/wscons/files.wscons log diff annotate
src/sys/dev/wscons/wsdisplay.c log diff annotate
message The ability to attach a wsdisplay without a terminal emulator has been
removed quite many years ago. Drop the _emul component of config machinery
symbol names, and merge the wsdisplay_emul_smth with wsdisplay_common_smth
as they are their only users.

No functional change, but you need to rerun config(8) on your kernels.

date 2024-11-05T17:02:19Z
author mpi
files src/sys/uvm/uvm_pmemrange.c log diff annotate
message Protect the page daemon memory reserve from allocations in interrupt contexts.

ok kettenis@

date 2024-11-05T17:28:31Z
author mpi
files src/sys/kern/vfs_bio.c log diff annotate
src/sys/kern/vfs_biomem.c log diff annotate
message Return the number of freed pages in bufbackoff().

Reviewed by miod@, ok tb@, beck@

date 2024-11-05T17:28:32Z
author mpi
files src/sys/sys/mount.h log diff annotate
src/sys/uvm/uvm_pdaemon.c log diff annotate
src/sys/uvm/uvm_pmemrange.c log diff annotate
message Return the number of freed pages in bufbackoff().

Reviewed by miod@, ok tb@, beck@

date 2024-11-05T18:02:03Z
author claudio
files src/sys/kern/kern_synch.c log diff annotate
message sleep_signal_check() is called twice in sleep_finish().

The first time a pending stop should result in a stopped thread but
the second call should not call proc_stop since the sleep is done and
the proc should continue as SONPROC until it hits the next cursig call.

Fix for a panic seen by bluhm@
OK mpi@

date 2024-11-05T18:27:24Z
author mpi
files src/sys/uvm/uvm_pmemrange.c log diff annotate
message Revert r1.69, I committed a wrong & broken diff.

date 2024-11-05T18:35:14Z
author mpi
files src/sys/uvm/uvm_pmemrange.c log diff annotate
message Protect the page daemon memory reserve from allocations in interrupt contexts.

ok miod@, kettenis@

date 2024-11-05T18:58:59Z
author miod
files src/sys/arch/amd64/pci/aapic.c log diff annotate
src/sys/arch/landisk/dev/obio.c log diff annotate
src/sys/arch/landisk/dev/rs5c313.c log diff annotate
src/sys/arch/sh/dev/scif.c log diff annotate
src/sys/arch/sh/dev/shb.c log diff annotate
src/sys/arch/sh/dev/shpcic.c log diff annotate
src/sys/arch/sh/sh/cpu.c log diff annotate
src/sys/dev/ic/bcmgenet.c log diff annotate
src/sys/dev/ic/dc.c log diff annotate
src/sys/dev/ic/mtd8xx.c log diff annotate
src/sys/dev/ic/re.c log diff annotate
src/sys/dev/ic/rtl81x9.c log diff annotate
src/sys/dev/ic/smc83c170.c log diff annotate
src/sys/dev/ic/xl.c log diff annotate
src/sys/dev/pci/cz.c log diff annotate
src/sys/dev/pci/if_se.c log diff annotate
src/sys/dev/pci/if_sk.c log diff annotate
src/sys/dev/pci/drm/drm_drv.c log diff annotate
src/sys/dev/pci/drm/i915/i915_driver.c log diff annotate
message The first field of struct cfdriver is a pointer. Put NULL rather than 0 here.

date 2024-11-05T21:47:00Z
author miod
files src/sys/arch/powerpc/include/frame.h log diff annotate
message The `pri' field of struct clockframe has become unused since the removal of
the need for CLKF_BASEPRI in OpenBSD 3.2. Rename it to stress the fact that
it is no longer used.

date 2024-11-05T22:44:20Z
author bluhm
files src/sys/kern/kern_sysctl.c log diff annotate
src/sys/netinet/in_pcb.c log diff annotate
src/sys/netinet/raw_ip.c log diff annotate
src/sys/netinet/udp_usrreq.c log diff annotate
message Use PCB iterator for raw IP input deliver loop.

Inspired by mvs@ idea of the iterator in the UDP multicast loop,
implement the same for raw IP input delivery. This removes an
unneccesary rwlock and only uses table mutex.
When comparing the inp routing table, address and port, the table
lock must be held. So assume that in_pcb_iterator() already has
the table mutex and hold it while traversing the list and doing the
checks. Release the mutex during mbuf copy, socket buffer append
and the upcalls. Adapt the logic for both rip_input() and udp_input().
In rip_input() move the actual work to rip_sbappend(). This can
be called without mutex during list traversal and for the final
element.

OK mvs@