CVS: cvs.openbsd.org: src

2024-05-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/05/18 00:45:00

Modified files:
usr.sbin/vmd   : i8259.h mc146818.h vmd.c 
usr.sbin/vmctl : main.c vmctl.h 

Log message:
remove prototypes with no matching function



CVS: cvs.openbsd.org: src

2024-05-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/05/18 00:34:46

Modified files:
usr.sbin/relayd: hce.c relay_udp.c relayd.h 

Log message:
remove prototypes with no matching function



CVS: cvs.openbsd.org: src

2024-05-17 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2024/05/17 23:21:38

Modified files:
bin/pax: ar_subs.c 

Log message:
When comparing mtimes for the -u and -Z options and the target is
'too old', use pathconfat(_PC_TIMESTAMP_RESOLUTION, AT_SYMLINK_NOFOLLOW)
to get the timestamp resolution to which the _source_ timestamp
should be truncated for a stable comparison.

Problem reported by Walter Alejandro Iglesias (wai(at)roquesor.com)
ok millert@



CVS: cvs.openbsd.org: src

2024-05-17 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2024/05/17 23:21:02

Modified files:
sys/kern   : init_sysent.c syscalls.c 
sys/sys: syscall.h syscallargs.h 

Log message:
Regen



CVS: cvs.openbsd.org: src

2024-05-17 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2024/05/17 23:20:22

Modified files:
include: unistd.h 
sys/kern   : syscalls.master vfs_syscalls.c kern_pledge.c 
lib/libc/sys   : Makefile.inc pathconf.2 
lib/libc/hidden: unistd.h 
lib/libc   : Symbols.list shlib_version 
usr.bin/kdump  : kdump.c 

Log message:
Add pathconfat(2): pathconf(2) but with at-fd and flags arguments,
the latter supporting the ability to get timestamp resolution of
symlinks.

ok deraadt@ millert@



CVS: cvs.openbsd.org: src

2024-05-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/05/17 20:44:22

Modified files:
sbin/ifconfig  : ifconfig.c 

Log message:
remove prototype with no matching function



CVS: cvs.openbsd.org: src

2024-05-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/05/17 19:51:44

Modified files:
usr.bin/top: display.h 

Log message:
remove prototypes with no matching function



CVS: cvs.openbsd.org: src

2024-05-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/05/17 18:08:06

Modified files:
usr.bin/less   : forwback.c 

Log message:
remove externs for removed vars



CVS: cvs.openbsd.org: src

2024-05-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/05/17 17:56:19

Modified files:
usr.bin/dig: dig.h 
usr.bin/dig/lib/dns: dst_internal.h 
usr.bin/dig/lib/dns/include/dns: compress.h message.h 
usr.bin/dig/lib/isc/include/isc: log.h 

Log message:
remove prototypes with no matching function; ok florian@



CVS: cvs.openbsd.org: src

2024-05-17 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2024/05/17 14:44:36

Modified files:
sys/netinet: ip_ipip.c 

Log message:
IPv6 has to use ip6_defhlim, not ip_defttl.

OK claudio@



CVS: cvs.openbsd.org: src

2024-05-17 Thread Miod Vallat
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2024/05/17 14:11:58

Modified files:
sys/dev/wscons : wsmouse.c 

Log message:
Make sure `row' is not used uninitialized in wsmouse_matching().



CVS: cvs.openbsd.org: src

2024-05-17 Thread Miod Vallat
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2024/05/17 14:07:33

Modified files:
sys/arch/alpha/include: intr.h 

Log message:
Cast alpha_pal_swpipl return value to int in splx, to make sure both sides
of the ternary operator have the same type. NFC



CVS: cvs.openbsd.org: src

2024-05-17 Thread Miod Vallat
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2024/05/17 14:05:08

Modified files:
sys/arch/sparc64/include: autoconf.h 
sys/arch/sparc64/sparc64: autoconf.c 

Log message:
Constify the first argument of getdevunit(). NFCI



CVS: cvs.openbsd.org: src

2024-05-17 Thread Miod Vallat
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2024/05/17 14:03:13

Modified files:
sys/dev/sbus   : esp_sbus.c 

Log message:
Update comments to match reality.



CVS: cvs.openbsd.org: src

2024-05-17 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2024/05/17 13:43:45

Modified files:
sys/dev/pci: azalia.c 

Log message:
The INTSTS register is read-only, so the attempt to clear interrupts
by writing to it doesn't actually work.  Therefore we have to keep
processing interrupts until all the bits corresponding to enabled
interrupts are cleared.  This makes MSIs actually work, also on the AMD
implementations for which we currently disable MSIs.

Based on some digging by martijn@

ok ratchov@, martijn@, stsp@



CVS: cvs.openbsd.org: src

2024-05-17 Thread Vitaliy Makkoveev
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2024/05/17 13:11:14

Modified files:
sys/kern   : uipc_socket.c uipc_socket2.c 
sys/sys: socketvar.h 

Log message:
Turn sblock() to `sb_lock' rwlock(9) wrapper for all sockets.

Unify behaviour to all sockets. Now sblock() should be always
taken before solock() in all involved paths as sosend(), soreceive(),
sorflush() and sosplice(). sblock() is fine-grained lock which
serializes socket send and receive routines on `so_rcv' or `so_snd'
buffers. There is no big problem to wait netlock while holding sblock().

This unification removes a lot of temporary "sb_flags & SB_MTXLOCK" code
from sockets layer. This unification makes straight "solock()" and
"sblock()" lock order, no more solock() -> sblock() -> sounlock() ->
solock() -> sbunlock() -> sounlock() chains in sosend() and soreceive()
paths. This unification brings witness(4) support for sblock(), include
NFS involved sockets, which is useful.

Since the witness(4) support was introduced to sblock() with this diff,
some new witness reports appeared.

bulk(1) tests by tb, ok bluhm



CVS: cvs.openbsd.org: src

2024-05-17 Thread Vitaliy Makkoveev
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2024/05/17 13:02:04

Modified files:
sys/kern   : uipc_socket.c 
sys/net: pfkeyv2.c 

Log message:
Switch AF_KEY sockets to the new locking scheme.

The simplest case. Nothing to change in sockets layer, only set
SB_MTXLOCK on socket buffers.

ok bluhm



CVS: cvs.openbsd.org: src

2024-05-17 Thread Vitaliy Makkoveev
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2024/05/17 12:58:26

Modified files:
sys/net: pfkeyv2.c 

Log message:
Fix uninitialized memory access in pfkeyv2_sysctl().

pfkeyv2_sysctl() reads the SA type from uninitialized memory if it is
not provided by the caller of sysctl(2) because of a missing length
check.

>From Carsten Beckmann.

ok bluhm



CVS: cvs.openbsd.org: src

2024-05-17 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2024/05/17 12:11:58

Modified files:
gnu/usr.bin/perl: locale.c 

Log message:
Fix possible segmentation fault in Perl 5.38.2.

When calling POSIX::setlocale() with unknown locale category, Perl
could crash due to NULL dereference.

found by sthen@ in smokeping build; OK afresh1@



CVS: cvs.openbsd.org: src

2024-05-17 Thread Stefan Fritsch
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2024/05/17 10:37:11

Modified files:
sys/dev/fdt: virtio_mmio.c 
sys/dev/pci: virtio_pci.c 
sys/dev/pv : if_vio.c virtiovar.h 

Log message:
vio: Fix signal handling and locking in sysctl path

Commits f0b002d01d5 "Release the netlock when sleeping for control
messages in in vioioctl()" and 126b881f71 "Insert a workaround for
per-ifp ioctl being called w/o NET_LOCK()." in vio(4) fixed a deadlock
but may cause a crash with a protection fault trap if addresses are
added/removed concurrently.

The actual issue is that signals are not handled correctly while
sleeping. After a signal, there is a race condition where sc_ctrl_inuse
is first set to FREE and then the interrupt handler sets it to DONE,
causing a hang in the next vio_wait_ctrl() call.

To fix it:

* Revert the NET_LOCK unlocking work-around.

* Remove PCATCH from the sleep call when we wait for control queue,
avoiding the race with vio_ctrleof(). To ensure that we don't hang
forever, use a 5 second timeout.

* If the timeout is hit, or if the hypervisor has set the
DEVICE_NEEDS_RESET status bit, do not try to use the control queue
until the next ifconfig down/up which resets the device.

* In order to allow reading the device status from device drivers, add a
new interface to the virtio transport drivers.

* Avoid a crash if there is outgoing traffic while doing ifconfig down.

OK bluhm@



CVS: cvs.openbsd.org: src

2024-05-17 Thread Christian Weisgerber
CVSROOT:/cvs
Module name:src
Changes by: na...@cvs.openbsd.org   2024/05/17 08:42:00

Modified files:
usr.bin/ssh/sshd-session: Makefile 

Log message:
remove duplicate copy of relink kit for sshd-session



CVS: cvs.openbsd.org: src

2024-05-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/05/17 03:36:48

Modified files:
usr.bin/dig/lib/isc: sha2.c 

Log message:
dig: make function definitions match their prototypes

ok florian



CVS: cvs.openbsd.org: src

2024-05-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/05/17 03:36:15

Modified files:
usr.bin/dig/lib/dns: rdataset.c 

Log message:
dig: garbage collect the unused 'added'

ok florian