rdate.8: note RFC 868 is obsolescent
From OpenBSD, specifically a mailing list post, which corrects the
maximum effective date.
https://marc.info/?l=openbsd-bugs&m=177447243611195&w=2
US NIST still supports RFC 868 queries via time.nist.gov. (For
comparison, the Canadian equivalent via NRC dropped support, citing
security concerns.)
autoconf(9): Take device references in iteration for detach.
This avoids a race with concurrent detach that can lead to tripping
KASSERT(!dv->dv_detach_done) in config_detach -> device_acquire, even
if the device_t itself remains stable while the device iteration is
ongoing (because alldev_nwrite or alldev_nread is raised).
While here, add:
- deviter_first_acquire
- deviter_next_acquire
- device_find_by_xname_acquire
- device_find_by_driver_unit_acquire
Prompted by:
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Revoke vnodes when unconfiguring.
This way, if you unconfigure an fss instance and reconfigure it,
anything that had it open (e.g., a file system mounted from it) won't
suddenly start mixing old cached data with new data -- instead, new
I/O operations will fail.
Not perfect -- see comments.
Prompted by:
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Use LK_SHARED, not LK_EXCLUSIVE, to read out mount point.
No need to exclude other readers.
Prompted by:
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Nix needless sc == NULL conditionals.
fss_strategy and fss_ioctl can be reached only after fss_open has
returned and (now that fss_cancel exists) before fss_close has been
called (on both block _and_ all character devices that have been
opened); between (first) open and (last) close, the autoconf unit
must exist.
Prompted by:
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Tighten fss_close a bit.
Clear last FSS_CDEV_OPEN/FSS_BDEV_OPEN in fss_close so we can assert
it in fss_detach, and pass DETACH_FORCE to fss_detach so it knows
when to expect the flags to be cleared.
Prompted by:
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Install a cancel handler.
This way, fss_close doesn't run until all concurrent I/O operations
(read, write, ioctl, strategy) have returned. Note that this applies
independently to the bdev and the cdev, so (e.g.) fss_close may run
on the cdev while there's still an fss_strategy running in parallel.
But in that case, sc->sc_flags will have FSS_BDEV_OPEN set, so
fss_close won't try to detach it too soon.
Prompted by:
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Ensure newly attached autoconf unit matches dev_t minor.
Setting cf->cf_fstate = FSTATE_STAR means autoconf(9) may select any
unit from cf->cf_unit onward, rather than only cf->cf_unit. Since
the attach is always serialized by fss_device_lock, this proably
doesn't make a difference in practice -- and we can't get rid of
fss_device_lock without a config_intern_pseudo_acquire or something
that atomically acquires the existing unit or if there is none
attaches a new one. But let's make the intent clearer in case any of
that changes.
Prompted by:
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Gather module init/fini logic into one place.
Fixes some little-used error branches and avoids duplication that can
get out of sync.
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Avoid races with drvctl detach.
Attach and detach by opening and closing /dev/fssN is serialized by
fss_device_lock, but concurrent `drvctl -d fssN' can cause an fss
instance to be detached and freed while fss_open or fss_close is
still trying to use it.
Prevent concurrent detach during other operations like fss_ioctl or
fss_strategy by making fss_detach fail if sc_flags shows it is held
open.
Prompted by:
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Rework creation path to avoid various races.
1. Look up each vnode exactly once; the identity of the vnode may
change between lookups otherwise.
2. Don't read v_vflag or v_mount without holding the vnode lock;
otherwise they may be changed by concurrent revoke.
3. Hold vfs_busy(mp) while we don't have one of its vnode's locked
and we haven't committed the fss instance to FSS_ACTIVE (at which
point fss_unmount_hook will take care of it).
4. Set sc->sc_uflags at the same time the transition to FSS_ACTIVE,
and loosen assertion after fss_create_snapshot, to avoid a race
between FSSIOCSET and FSSIOCCLR. See comments in FSSIOCSET for
details.
XXX Should consider using namei and VOP_REMOVE instead of
do_sys_unlink to remove only the vnode that we actually looked up,
[3 lines not shown]
fss(4): Handle fss_softc_alloc failure.
Shouldn't successfully transition to FSS_ACTIVE in that case; should
instead back out and fail.
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Initialize sc_state in fss_attach, not fss_open.
Access without sc_slock is forbidden.
Prompted by:
PR kern/60986: fssconfig panics on bad backing store type
fss(4): Close vn_open with vn_close, not with vrele.
Fixes
# fssconfig fss0 / /dev/ld4
...
panic: vrelel: bad ref count
(The mistake is using the block device /dev/ld4 instead of the
character device /dev/rld4, but this ought to be handled gracefully,
not by panicking.)
PR kern/60986: fssconfig panics on bad backing store type
PR/61017: Juan Manuel Mendez Rey: regexec reads past the string after a
multibyte character. Provide a prevchar() function that fetches the previous
multibyte character.
implement /32 IPv4 parsing in NPF.
Timo Burhmester (timo@) requested in a recent tech-net thread on NPF.
during the extraction of address/mask data, if mask is equal to max mask,
both v4 and v6, it is assumed to be no net mask set.
reviewed by martin@ and tests also included.