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@
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@
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@
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
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
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
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@
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
[12 lines not shown]