aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--Makefile.inc19
-rwxr-xr-xbin/cp/tests/cp_test.sh8
-rw-r--r--bin/ln/tests/ln_test.sh2
-rw-r--r--contrib/sendmail/src/newaliases.12
-rw-r--r--etc/mtree/BSD.include.dist4
-rw-r--r--etc/mtree/BSD.root.dist90
-rw-r--r--etc/mtree/BSD.usr.dist16
-rw-r--r--etc/mtree/BSD.var.dist2
-rw-r--r--lib/libc/gen/fts.3195
-rw-r--r--lib/libc/gen/fts.c3
-rw-r--r--lib/libc/gen/getgrouplist.333
-rw-r--r--lib/libc/gen/initgroups.38
-rw-r--r--lib/libsamplerate/Makefile2
-rw-r--r--lib/libsys/getgroups.225
-rw-r--r--libexec/rc/rc.conf3
-rw-r--r--libexec/rc/rc.d/Makefile462
-rwxr-xr-xlibexec/rc/rc.d/netwait86
-rw-r--r--libexec/rc/rc.d/virtual_oss4
-rw-r--r--release/Makefile4
-rw-r--r--release/Makefile.mirrors20
-rw-r--r--release/arm64/RPI.conf5
-rwxr-xr-xrelease/packages/generate-set-ucl.lua16
-rwxr-xr-xrelease/packages/generate-ucl.lua10
-rw-r--r--release/packages/set-template.ucl2
-rw-r--r--release/packages/sets/base-dbg.ucl2
-rw-r--r--release/packages/sets/base-jail-dbg.ucl2
-rw-r--r--release/packages/sets/base-jail.ucl3
-rw-r--r--release/packages/sets/base.ucl3
-rw-r--r--release/packages/sets/optional-dbg.ucl1
-rw-r--r--release/packages/sets/optional-jail-dbg.ucl1
-rw-r--r--release/packages/sets/optional-jail.ucl1
-rw-r--r--release/packages/sets/optional.ucl1
-rw-r--r--release/packages/ucl/at.ucl2
-rw-r--r--release/packages/ucl/bluetooth.ucl1
-rw-r--r--release/packages/ucl/bsdconfig.ucl1
-rw-r--r--release/packages/ucl/bsdinstall.ucl1
-rw-r--r--release/packages/ucl/caroot.ucl1
-rw-r--r--release/packages/ucl/certctl.ucl1
-rw-r--r--release/packages/ucl/clang.ucl2
-rw-r--r--release/packages/ucl/devd.ucl1
-rw-r--r--release/packages/ucl/ncurses-all.ucl4
-rw-r--r--release/packages/ucl/newsyslog.ucl1
-rw-r--r--release/packages/ucl/periodic.ucl1
-rw-r--r--release/packages/ucl/rc.ucl1
-rw-r--r--release/packages/ucl/rcmds.ucl1
-rw-r--r--release/packages/ucl/sendmail.ucl1
-rw-r--r--release/packages/ucl/tests-all.ucl3
-rw-r--r--release/packages/ucl/yp.ucl1
-rw-r--r--release/scripts/make-oci-image.sh10
-rw-r--r--release/tools/ec2-builder.conf7
-rw-r--r--release/tools/ec2-small.conf7
-rw-r--r--release/tools/oci-image-notoolchain.conf54
-rw-r--r--release/tools/oci-image-runtime.conf4
-rw-r--r--release/tools/vmimage.subr26
-rw-r--r--sbin/ipf/libipf/printdstl_live.c3
-rw-r--r--sbin/ipf/libipf/printdstlist.c2
-rw-r--r--sbin/ipf/libipf/printdstlistdata.c5
-rw-r--r--sbin/ipf/libipf/printhash_live.c8
-rw-r--r--sbin/ipf/libipf/printhashdata.c19
-rw-r--r--sbin/ipf/libipf/printpooldata.c2
-rw-r--r--sbin/rcorder/rcorder.c8
-rw-r--r--secure/lib/libpkgecc/Makefile1
-rw-r--r--share/man/man4/aacraid.412
-rw-r--r--share/man/man4/ice.430
-rw-r--r--share/man/man4/umass.456
-rw-r--r--share/man/man5/pf.conf.56
-rw-r--r--share/man/man5/rc.conf.527
-rw-r--r--share/mk/bsd.confs.mk8
-rw-r--r--share/mk/src.libnames.mk2
-rw-r--r--stand/lua/cli.lua.818
-rw-r--r--sys/arm64/include/armreg.h5
-rw-r--r--sys/arm64/include/hypervisor.h96
-rw-r--r--sys/arm64/vmm/arm64.h7
-rw-r--r--sys/arm64/vmm/vmm.c34
-rw-r--r--sys/arm64/vmm/vmm_hyp.c19
-rw-r--r--sys/arm64/vmm/vmm_reset.c7
-rw-r--r--sys/contrib/openzfs/module/zfs/vdev_raidz.c2
-rw-r--r--sys/dev/ahci/ahci_pci.c46
-rw-r--r--sys/dev/nvme/nvme_private.h6
-rw-r--r--sys/libkern/arm64/crc32c_armv8.S8
-rw-r--r--sys/netinet/tcp_lro.c9
-rw-r--r--sys/netinet/tcp_syncache.c5
-rw-r--r--sys/x86/include/mca.h25
-rw-r--r--sys/x86/x86/mca.c88
-rw-r--r--tests/sys/fs/tarfs/tarfs_test.sh6
-rw-r--r--usr.bin/sockstat/main.c55
-rw-r--r--usr.bin/sockstat/sockstat.111
-rw-r--r--usr.bin/sockstat/tests/Makefile3
-rwxr-xr-xusr.bin/tail/tests/tail_test.sh2
-rw-r--r--usr.sbin/bsdinstall/bsdinstall.823
-rw-r--r--usr.sbin/iovctl/iovctl.82
-rw-r--r--usr.sbin/nfsuserd/nfsuserd.c16
93 files changed, 1095 insertions, 748 deletions
diff --git a/Makefile b/Makefile
index 664f31a48abf..5f27f22d7a3f 100644
--- a/Makefile
+++ b/Makefile
@@ -175,7 +175,7 @@ TGTS= all all-man buildenv buildenvvars buildetc buildkernel buildworld \
create-packages-world create-packages-kernel \
create-packages-kernel-repo create-packages-world-repo \
create-packages-source create-packages \
- update-packages packages installconfig real-packages real-update-packages \
+ installconfig real-packages real-update-packages \
sign-packages package-pkg print-dir test-system-compiler test-system-linker \
test-includes
@@ -521,6 +521,9 @@ kernels: .PHONY
worlds: .PHONY
@cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=buildworld universe
+packages update-packages: .PHONY
+ ${_+_}@cd ${.CURDIR}; ${_MAKE} DISTDIR=/ ${.TARGET}
+
#
# universe
#
diff --git a/Makefile.inc1 b/Makefile.inc1
index e98b5f233b51..cd3e3f007c3b 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2256,7 +2256,7 @@ _default_flavor= -default
_debug=-dbg
. endif
-create-dtb-package:
+create-dtb-package: .PHONY
@if [ -f ${KSTAGEDIR}/${DISTDIR}/dtb.plist ]; then \
${SRCDIR}/release/packages/generate-ucl.lua \
PKGNAME "dtb" \
@@ -2281,9 +2281,12 @@ create-dtb-package:
-o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR} ; \
fi
-create-kernel-packages: .PHONY
+create-kernel-packages: .PHONY create-kernel-flavored-packages create-dtb-package
+create-kernel-flavored-packages: .PHONY
+.ORDER: create-kernel-flavored-packages create-dtb-package
+
. for flavor in "" ${_debug}
-create-kernel-packages: create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},} create-dtb-package
+create-kernel-flavored-packages: create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}
create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap .PHONY
@cd ${KSTAGEDIR}/${DISTDIR} ; \
${METALOG_SORT_CMD} ${KSTAGEDIR}/kernel.meta | \
diff --git a/bin/cp/tests/cp_test.sh b/bin/cp/tests/cp_test.sh
index fdf50d042f0b..b637f862b7d3 100755
--- a/bin/cp/tests/cp_test.sh
+++ b/bin/cp/tests/cp_test.sh
@@ -90,7 +90,7 @@ hardlink_body()
echo "foo" >foo
atf_check cp -l foo bar
atf_check -o inline:"foo\n" cat bar
- atf_check_equal "$(stat -f%d,%i foo)" "$(stat -f%d,%i bar)"
+ atf_check test foo -ef bar
}
atf_test_case hardlink_exists
@@ -105,7 +105,7 @@ hardlink_exists_body()
echo "bar" >bar
atf_check -s not-exit:0 -e match:exists cp -l foo bar
atf_check -o inline:"bar\n" cat bar
- atf_check_not_equal "$(stat -f%d,%i foo)" "$(stat -f%d,%i bar)"
+ atf_check test ! foo -ef bar
}
atf_test_case hardlink_exists_force
@@ -120,7 +120,7 @@ hardlink_exists_force_body()
echo "bar" >bar
atf_check cp -fl foo bar
atf_check -o inline:"foo\n" cat bar
- atf_check_equal "$(stat -f%d,%i foo)" "$(stat -f%d,%i bar)"
+ atf_check test foo -ef bar
}
atf_test_case matching_srctgt
@@ -389,7 +389,7 @@ file_is_sparse()
files_are_equal()
{
- atf_check_not_equal "$(stat -f%d,%i "$1")" "$(stat -f%d,%i "$2")"
+ atf_check test ! "$1" -ef "$2"
atf_check cmp "$1" "$2"
}
diff --git a/bin/ln/tests/ln_test.sh b/bin/ln/tests/ln_test.sh
index 78b4074aea18..ac9d785ba1fc 100644
--- a/bin/ln/tests/ln_test.sh
+++ b/bin/ln/tests/ln_test.sh
@@ -28,7 +28,7 @@
atf_check_same_file()
{
- atf_check_equal "$(stat -f %d,%i "$1")" "$(stat -f %d,%i "$2")"
+ atf_check test "$1" -ef "$2"
}
atf_check_symlink_to()
diff --git a/contrib/sendmail/src/newaliases.1 b/contrib/sendmail/src/newaliases.1
index 59dc0de20cf7..cdb6eef67416 100644
--- a/contrib/sendmail/src/newaliases.1
+++ b/contrib/sendmail/src/newaliases.1
@@ -14,7 +14,7 @@
.TH NEWALIASES 1 "$Date: 2013-11-22 20:51:56 $"
.SH NAME
newaliases
-\- rebuild the data base for the mail aliases file
+\- rebuild the data base for the sendmail aliases file
.SH SYNOPSIS
.B newaliases
.SH DESCRIPTION
diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist
index 28c4d91ac1c0..454657183c58 100644
--- a/etc/mtree/BSD.include.dist
+++ b/etc/mtree/BSD.include.dist
@@ -276,9 +276,7 @@
..
kadm5
..
- kdb5
- ..
- krb5
+ krb5 tags=package=kerberos-dev
..
lib80211
..
diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist
index 6ba632894ca7..95a3361b3c61 100644
--- a/etc/mtree/BSD.root.dist
+++ b/etc/mtree/BSD.root.dist
@@ -4,8 +4,9 @@
/set type=dir uname=root gname=wheel mode=0755
.
- bin
+ bin tags=package=runtime
..
+/set tags=package=bootloader
boot
defaults
..
@@ -27,7 +28,7 @@
..
kernel
..
- loader.conf.d tags=package=bootloader
+ loader.conf.d
..
lua
..
@@ -38,88 +39,89 @@
zfs
..
..
+/unset tags
dev mode=0555 tags=package=runtime
..
- etc
- X11
+ etc tags=package=runtime
+ X11 tags=package=runtime
..
- authpf
+ authpf tags=package=pf
..
- autofs
+ autofs tags=package=autofs
..
- bluetooth
+ bluetooth tags=package=bluetooth
..
- cron.d
+ cron.d tags=package=cron
..
- defaults
+ defaults tags=package=runtime
..
- devd
+ devd tags=package=devd
..
- dma
+ dma tags=package=dma
..
- gss
+ gss tags=package=runtime
..
- jail.conf.d
+ jail.conf.d tags=package=jail
..
kyua tags=package=tests
..
- mail
+ mail tags=package=runtime
..
- mtree
+ mtree tags=package=mtree
..
- newsyslog.conf.d
+ newsyslog.conf.d tags=package=newsyslog
..
- ntp mode=0700
+ ntp mode=0700 tags=package=ntp
..
- pam.d
+ pam.d tags=package=runtime
..
- periodic
- daily
+ periodic tags=package=periodic
+ daily tags=package=periodic
..
- monthly
+ monthly tags=package=periodic
..
- security
+ security tags=package=periodic
..
- weekly
+ weekly tags=package=periodic
..
..
- pkg
+ pkg tags=package=pkg-bootstrap
..
- ppp
+ ppp tags=package=ppp
..
- profile.d
+ profile.d tags=package=runtime
..
- rc.conf.d
+ rc.conf.d tags=package=rc
..
- rc.d
+ rc.d tags=package=rc
..
- security
+ security tags=package=audit
..
- ssh
+ ssh tags=package=ssh
..
- ssl
+ ssl tags=package=caroot
certs tags=package=caroot
..
untrusted tags=package=caroot
..
..
- sysctl.kld.d
+ sysctl.kld.d tags=package=runtime
..
- syslog.d
+ syslog.d tags=package=syslogd
..
- zfs tags=package=zfs
- compatibility.d
+ zfs tags=package=zfs
+ compatibility.d tags=package=zfs
..
..
..
- lib
- geom
+ lib tags=package=clibs
+ geom tags=package=geom
..
- nvmecontrol
+ nvmecontrol tags=package=nvme-tools
..
..
- libexec
- resolvconf
+ libexec tags=package=clibs
+ resolvconf tags=package=resolvconf
..
..
media tags=package=runtime
@@ -132,14 +134,14 @@
..
rescue tags=package=rescue
..
- root mode=0750
+ root mode=0750 tags=package=runtime
..
- sbin
+ sbin tags=package=runtime
..
tmp mode=01777 tags=package=runtime
..
- usr
+ usr tags=package=runtime
..
- var
+ var tags=package=runtime
..
..
diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist
index 7f54ccbcb4cb..7d5b8620e5c4 100644
--- a/etc/mtree/BSD.usr.dist
+++ b/etc/mtree/BSD.usr.dist
@@ -26,6 +26,8 @@
..
..
..
+ samplerate
+ ..
sqlite3
..
ucl
@@ -83,15 +85,15 @@
..
i18n
..
- krb5
- kdb
+ krb5 tags=package=kerberos-kdc
+ kdb tags=package=kerberos-kdc
..
- plugins
- kdb
+ plugins tags=package=kerberos-kdc
+ kdb tags=package=kerberos-kdc
..
- preauth
+ preauth tags=package=kerberos-kdc
..
- tls
+ tls tags=package=kerberos-kdc
..
..
..
@@ -269,7 +271,7 @@
..
dtrace
..
- et
+ et tags=package=kerberos-dev
..
examples
BSD_daemon
diff --git a/etc/mtree/BSD.var.dist b/etc/mtree/BSD.var.dist
index 0845d8a59f65..b3372196f5f9 100644
--- a/etc/mtree/BSD.var.dist
+++ b/etc/mtree/BSD.var.dist
@@ -45,6 +45,8 @@
..
ipf mode=0700 tags=package=ipf
..
+ krb5kdc mode=0700 tags=package=kerberos-kdc
+ ..
mtree
..
ntp uname=ntpd gname=ntpd
diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3
index ee558b892c8c..da304e59ee72 100644
--- a/lib/libc/gen/fts.3
+++ b/lib/libc/gen/fts.3
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd June 30, 2025
+.Dd October 6, 2025
.Dt FTS 3
.Os
.Sh NAME
@@ -69,14 +69,15 @@ on a file hierarchy, which is then supplied to
the other
.Nm
functions.
-The function
+The
.Fn fts_read
-returns a pointer to a structure describing one of the files in the file
-hierarchy.
-The function
+function returns a pointer to a structure describing one of the files
+in the file hierarchy.
+The
.Fn fts_children
-returns a pointer to a linked list of structures, each of which describes
-one of the files contained in a directory in the hierarchy.
+function returns a pointer to a linked list of structures, each of
+which describes one of the files contained in a directory in the
+hierarchy.
In general, directories are visited two distinguishable times; in pre-order
(before any of their descendants are visited) and in post-order (after all
of their descendants have been visited).
@@ -376,7 +377,44 @@ The
.Fa fts_name
field is always
.Dv NUL Ns -terminated .
-.Sh FTS_OPEN
+.Ss Thread Safety
+The
+.Nm
+functions can safely be used in multi-threaded programs provided no
+two threads access the same
+.Vt FTS
+or
+.Vt FTSENT
+structure simultaneously.
+However, unless the
+.Dv FTS_NOCHDIR
+flag was passed to
+.Fn fts_open
+or
+.Fn fts_open_b ,
+calls to
+.Fn fts_read
+and
+.Fn fts_children
+may change the current working directory, which will affect all
+threads.
+Conversely, changing the current working directory either during or
+between calls to
+.Fn fts_read
+or
+.Fn fts_children
+(even in a single-thread program) may cause
+.Nm
+to malfunction unless the
+.Dv FTS_NOCHDIR
+flag was passed to
+.Fn fts_open
+or
+.Fn fts_open_b
+and all paths in
+.Va path_argv
+were absolute.
+.Ss Fn fts_open
The
.Fn fts_open
function takes a pointer to an array of character pointers naming one
@@ -507,10 +545,10 @@ from descending into directories that have a different device number
than the file from which the descent began.
.El
.Pp
-The argument
-.Fn compar
-specifies a user-defined function which may be used to order the traversal
-of the hierarchy.
+The
+.Fa compar
+argument points to a user-defined function which may be used to order
+the traversal of the hierarchy.
It
takes two pointers to pointers to
.Vt FTSENT
@@ -545,7 +583,7 @@ the directory traversal order is in the order listed in
.Fa path_argv
for the root paths, and in the order listed in the directory for
everything else.
-.Sh FTS_OPEN_B
+.Ss Fn fts_open_b
The
.Fn fts_open_b
function is identical to
@@ -554,7 +592,7 @@ except that it takes a block pointer instead of a function pointer.
The block is copied before
.Fn fts_open_b
returns, so the original can safely go out of scope or be released.
-.Sh FTS_READ
+.Ss Fn fts_read
The
.Fn fts_read
function returns a pointer to an
@@ -588,6 +626,15 @@ structure is returned, and
.Va errno
may or may not have been set (see
.Fa fts_info ) .
+Note that
+.Fn fts_read
+will not set
+.Va errno
+to 0 if called again with the same
+.Fa ftsp
+argument after the
+.Dv FTS_STOP
+flag has been set or the end of the stream has been reached.
.Pp
The
.Vt FTSENT
@@ -602,10 +649,10 @@ directory, in which case they will not be overwritten until after a call to
.Fn fts_read
after the
.Vt FTSENT
-structure has been returned by the function
+structure has been returned by the
.Fn fts_read
-in post-order.
-.Sh FTS_CHILDREN
+function in post-order.
+.Ss Fn fts_children
The
.Fn fts_children
function returns a pointer to an
@@ -679,11 +726,11 @@ and
.Fa fts_namelen
fields.
.El
-.Sh FTS_SET
-The function
+.Ss Fn fts_set
+The
.Fn fts_set
-allows the user application to determine further processing for the
-file
+function allows the user application to determine further processing
+for the file
.Fa f
of the stream
.Fa ftsp .
@@ -749,7 +796,40 @@ The file may be one of those most recently returned by either
or
.Fn fts_read .
.El
-.Sh FTS_CLOSE
+.Ss Fn fts_set_clientptr , Fn fts_get_clientptr
+The
+.Fn fts_set_clientptr
+function sets the client data pointer for the stream
+.Fa ftsp
+to
+.Fa clientdata .
+The
+.Fn fts_get_clientptr
+function returns the client data pointer associated with
+.Fa ftsp .
+This can be used to pass per-stream data to the comparison function.
+.Pp
+For performance reasons,
+.Fn fts_get_clientptr
+may be shadowed by a preprocessor macro.
+.Ss Fn fts_get_stream
+The
+.Fn fts_get_stream
+function returns the
+.Nm
+stream associated with the file entry
+.Fa f .
+A typical use for this would be for a comparison function to first call
+.Fn fts_get_stream
+on one of its arguments, then call
+.Fn fts_get_clientptr
+to obtain the client data pointer, which in turn points to information
+necessary to correctly order the two entries.
+.Pp
+For performance reasons,
+.Fn fts_get_stream
+may be shadowed by a preprocessor macro.
+.Ss Fn fts_close
The
.Fn fts_close
function closes a file hierarchy stream
@@ -760,6 +840,75 @@ or
.Fn fts_open_b
was called to open
.Fa ftsp .
+.Sh RETURN VALUES
+The
+.Fn fts_open
+and
+.Fn fts_open_b
+functions return a pointer to the new
+.Nm
+stream on success and
+.Dv NULL
+on failure.
+.Pp
+The
+.Fn fts_read
+function returns a pointer to the next file entry on success, or if an
+error occurs that relates specifically to that file entry.
+On reaching the end of the file hierarchy, it returns
+.Dv NULL
+and sets the external variable
+.Va errno
+to 0.
+On failure, it returns
+.Dv NULL
+and sets
+.Va errno
+to an appropriate non-zero value.
+If called again after the
+.Dv FTS_STOP
+flag has been set or the end of the stream has been reached,
+.Fn fts_read
+returns
+.Dv NULL
+and leaves
+.Va errno
+untouched.
+.Pp
+The
+.Fn fts_children
+function returns a pointer to a linked list of file entries on
+success.
+On reaching the end of the file hierarchy, it returns
+.Dv NULL
+and sets the external variable
+.Va errno
+to 0.
+On failure, it returns
+.Dv NULL
+and sets
+.Va errno
+to an appropriate non-zero value.
+.Pp
+The
+.Fn fts_set
+function returns 0 on success and \-1 if its
+.Fa instr
+argument is invalid.
+.Pp
+The
+.Fn fts_get_clientptr
+function returns the client data pointer associated with its argument,
+or
+.Dv NULL
+if none has been set.
+.Pp
+The
+.Fn fts_get_stream
+function returns a pointer to the
+.Nm
+stream associated with its argument.
+.Pp
The
.Fn fts_close
function
@@ -816,7 +965,7 @@ functions may fail and set
as follows:
.Bl -tag -width Er
.It Bq Er EINVAL
-The options were invalid, or the list were empty.
+The options were invalid, or the list was empty.
.El
.Sh SEE ALSO
.Xr find 1 ,
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
index cce959ba836a..4aa386d777cd 100644
--- a/lib/libc/gen/fts.c
+++ b/lib/libc/gen/fts.c
@@ -106,7 +106,6 @@ struct _fts_private {
* This assumption only holds for UFS-like filesystems that implement
* links and directories this way, so we must punt for others.
*/
-
static const char *ufslike_filesystems[] = {
"ufs",
"zfs",
@@ -679,7 +678,6 @@ fts_children(FTS *sp, int instr)
void *
(fts_get_clientptr)(FTS *sp)
{
-
return (fts_get_clientptr(sp));
}
@@ -696,7 +694,6 @@ FTS *
void
fts_set_clientptr(FTS *sp, void *clientptr)
{
-
sp->fts_clientptr = clientptr;
}
diff --git a/lib/libc/gen/getgrouplist.3 b/lib/libc/gen/getgrouplist.3
index e3939fc2481a..9e05ff7e7a29 100644
--- a/lib/libc/gen/getgrouplist.3
+++ b/lib/libc/gen/getgrouplist.3
@@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd August 29, 2025
+.Dd October 9, 2025
.Dt GETGROUPLIST 3
.Os
.Sh NAME
@@ -48,30 +48,37 @@
.Sh DESCRIPTION
The
.Fn getgrouplist
-function reads through the group database to retrieve the supplementary groups
-for the user specified in
-.Fa name ,
+function retrieves from the group database the supplementary groups for the user
+specified in
+.Fa name
and returns the effective group list, whose first group is the value of
.Fa basegid
-and the others are the retrieved supplementary groups.
+and the others are the supplementary groups.
.Fa basegid
-typically is the user's group number from the password database.
+typically is the user's initial numerical group ID from the password database.
.Pp
The effective group list is returned in the array pointed to by
.Fa groups .
-The caller specifies the size of the
+The caller specifies the length of the
.Fa groups
array in the integer pointed to by
-.Fa ngroups ;
-the actual number of groups found is returned in
+.Fa ngroups .
+The number of groups of the effective group list, which may be greater than the
+.Fa groups
+array's length, is returned through
.Fa ngroups .
.Sh RETURN VALUES
The
.Fn getgrouplist
-function
-returns 0 on success and \-1 if the size of the group list is too small to
-hold all the user's groups.
-Here, the group array will be filled with as many groups as will fit.
+function returns 0 on success and \-1 if the length of the group list is too
+small to hold all the user's groups.
+In the latter case, the
+.Fa groups
+array is filled with as many groups as possible from the start of the effective
+group list, and the length pointed to by
+.Fa ngroups
+is set to the full length of the latter, thus to a value strictly greater than
+before the call.
.Sh FILES
.Bl -tag -width /etc/group -compact
.It Pa /etc/group
diff --git a/lib/libc/gen/initgroups.3 b/lib/libc/gen/initgroups.3
index 4f538fb180ec..74133e7d7048 100644
--- a/lib/libc/gen/initgroups.3
+++ b/lib/libc/gen/initgroups.3
@@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd September 17, 2025
+.Dd October 9, 2025
.Dt INITGROUPS 3
.Os
.Sh NAME
@@ -67,9 +67,9 @@ The
.Fn initgroups
function may fail and set
.Va errno
-to any of the errors specified for the library function
-.Xr setgroups 2 .
-It may also return:
+to any of the errors specified for the
+.Xr setgroups 2
+system call, or to:
.Bl -tag -width Er
.It Bq Er ENOMEM
The
diff --git a/lib/libsamplerate/Makefile b/lib/libsamplerate/Makefile
index c094cbb791d2..4c55d5c2cb82 100644
--- a/lib/libsamplerate/Makefile
+++ b/lib/libsamplerate/Makefile
@@ -3,7 +3,7 @@
PACKAGE= sound
LIB= samplerate
-INTERNALLIB=
+PRIVATELIB=
SRCS= samplerate.c \
src_linear.c \
diff --git a/lib/libsys/getgroups.2 b/lib/libsys/getgroups.2
index 4881a65d532e..4e94b32d4e7b 100644
--- a/lib/libsys/getgroups.2
+++ b/lib/libsys/getgroups.2
@@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd September 17, 2025
+.Dd October 10, 2025
.Dt GETGROUPS 2
.Os
.Sh NAME
@@ -107,10 +107,8 @@ array.
The
.Fn getgroups
system call conforms to
-.St -p1003.1-2008
-with the additional properties that supplementary groups are reported in
-strictly ascending order and the returned size coincides with the cardinal of
-the set.
+.St -p1003.1-2008 ,
+not reporting the effective group ID.
.Sh HISTORY
The
.Fn getgroups
@@ -121,8 +119,8 @@ Since
.Fx 14.3 ,
the
.Fn getgroups
-system call has treated the supplementary groups as a set, reporting them in
-strictly ascending order and returning the cardinal of the set.
+system call has been reporting the supplementary groups in strictly ascending
+order.
.Pp
Before
.Fx 15.0 ,
@@ -138,15 +136,14 @@ system call gets the supplementary groups set in the
array.
In particular, as evoked in
.Sx HISTORY ,
-it does not anymore retrieve the effective GID in the first slot of
+it does not anymore retrieve the effective group ID in the first slot of
.Fa gidset .
-Programs should not make any assumption about which group is placed in the first
-slot of
-.Fa gidset
-other than it being the supplementary group with smallest GID.
+Programs that process this slot in a specific way must be modified to obtain the
+effective group ID through other means, such as a call to
+.Xr getegid 2 .
.Pp
-The effective GID is present in the supplementary groups set if and only if it
-was explicitly set as a supplementary group.
+The effective group ID is present in the supplementary groups set if and only if
+it was explicitly set as a supplementary group.
The function
.Fn initgroups
enforces that, while the
diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
index 9da2aef44d3d..96dd420d0322 100644
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -500,6 +500,9 @@ netwait_enable="NO" # Enable rc.d/netwait (or NO)
netwait_timeout="60" # Total number of seconds to perform pings.
#netwait_if="" # Wait for active link on each intf in this list.
netwait_if_timeout="30" # Total number of seconds to monitor link state.
+netwait_dad="NO" # Wait for DAD to complete
+netwait_dad_timeout="" # Total number of seconds to wait for DAD, zero
+ # or unset to autodetect
### Miscellaneous network options: ###
icmp_bmcastecho="NO" # respond to broadcast ping packets
diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile
index 7ac2f382b989..f6d1a34ceb9e 100644
--- a/libexec/rc/rc.d/Makefile
+++ b/libexec/rc/rc.d/Makefile
@@ -4,6 +4,7 @@ CONFDIR= /etc/rc.d
CONFGROUPS= CONFS
CONFSPACKAGE= rc
+# Files which are always installed and go in the -rc package.
CONFS= DAEMON \
FILESYSTEMS \
LOGIN \
@@ -47,10 +48,7 @@ CONFS= DAEMON \
netoptions \
netwait \
noshutdown \
- ${_nscd} \
- ${_opensm} \
os-release \
- pppoed \
pwcheck \
quota \
random \
@@ -78,214 +76,258 @@ CONFS= DAEMON \
var_run \
watchdogd
-CONFGROUPS+= DEVD
-DEVD= devd
-DEVDPACKAGE= devd
-
-CONFGROUPS+= DEVMATCH
-DEVMATCH= devmatch
-DEVMATCHPACKAGE= devmatch
-
-CONFGROUPS+= DHCLIENT
-DHCLIENT= dhclient
-DHCLIENTPACKAGE= dhclient
-
-CONFGROUPS+= GEOM
-GEOM= geli \
- geli2 \
- gptboot
-GEOMPACKAGE= geom
-
-CONFGROUPS+= GGATED
-GGATED= ggated
-GGATEDPACKAGE= ggate
-
-CONFGROUPS+= RESOLVCONF
-RESOLVCONF= resolv
-RESOLVCONFPACKAGE= resolvconf
-
-CONFGROUPS+= CRON
-CRON+= cron
-CRONPACKAGE= cron
-
-CONFGROUPS+= CTL
-CTL= ctld
-CTLPACKAGE= ctl
-
-CONFGROUPS+= NFS
-NFS= lockd \
- mountd \
- nfscbd \
- nfsclient \
- nfsd \
- nfsuserd \
- statd
-NFSPACKAGE= nfs
-
-CONFGROUPS+= NEWSYSLOG
-NEWSYSLOG= newsyslog
-NEWSYSLOGPACKAGE= newsyslog
-
-CONFGROUPS+= POWERD
-POWERD= powerd
-POWERDPACKAGE= powerd
-
-CONFGROUPS+= SYSLOGD
-SYSLOGD= syslogd
-SYSLOGDPACKAGE= syslogd
-
-CONFGROUPS+= RCMDS
-RCMDS= rwho
-RCMDSPACKAGE= rcmds
+# Groups for files which don't go in -rc, or which depend on src.conf knobs.
.if ${MK_ACCT} != "no" || ${MK_UTMPX} != "no"
-CONFGROUPS+= ACCT
-ACCTPACKAGE= acct
+CONFGROUPS+= ACCT
+ACCTPACKAGE= acct
.if ${MK_ACCT} != "no"
-ACCT+= accounting
+ACCT= accounting
.endif
.if ${MK_UTMPX} != "no"
ACCT+= utx
.endif
.endif
-.if ${MK_ACPI} != "no"
-CONFGROUPS+= ACPI
+CONFGROUPS.${MK_ACPI}+= ACPI
+ACPIPACKAGE= acpi
ACPI= power_profile
-ACPIPACKAGE= acpi
-.endif
-.if ${MK_APM} != "no"
-CONFGROUPS+= APM
-APM+= apm
+CONFGROUPS.${MK_APM}+= APM
+APMPACKAGE= apm
+APM= apm
.if ${MACHINE} == "i386"
APM+= apmd
.endif
-APMPACKAGE= apm
-.endif
-.if ${MK_AUDIT} != "no"
-CONFGROUPS+= AUDIT
-AUDIT+= auditd
-AUDIT+= auditdistd
-AUDITPACKAGE= audit
-.endif
+CONFGROUPS.${MK_AUDIT}+= AUDIT
+AUDITPACKAGE= audit
+AUDIT= auditd \
+ auditdistd
-.if ${MK_AUTOFS} != "no"
-CONFGROUPS+= AUTOFS
+CONFGROUPS.${MK_AUTOFS}+= AUTOFS
+AUTOFSPACKAGE= autofs
AUTOFS= automount \
automountd \
autounmountd
-AUTOFSPACKAGE= autofs
-.endif
-.if ${MK_BLACKLIST} != "no"
-CONFGROUPS+= BLOCKLIST
+CONFGROUPS.${MK_BLACKLIST}+= BLOCKLIST
+BLOCKLISTPACKAGE= blocklist
BLOCKLIST= blacklistd
-BLOCKLISTPACKAGE=blocklist
-.endif
-.if ${MK_BLUETOOTH} != "no"
-CONFGROUPS+= BLUETOOTH
-BLUETOOTH+= bluetooth \
+CONFGROUPS.${MK_BLUETOOTH}+= BLUETOOTH
+BLUETOOTHPACKAGE= bluetooth
+BLUETOOTH= bluetooth \
bthidd \
hcsecd \
rfcomm_pppd_server \
sdpd \
ubthidhci
-BLUETOOTHPACKAGE= bluetooth
-.endif
-.if ${MK_BOOTPARAMD} != "no"
-CONFS+= bootparams
-.endif
+CONFGROUPS.${MK_BOOTPARAMD}+= BOOTPARAMD
+BOOTPARAMD= bootparams
-.if ${MK_BSNMP} != "no"
-CONFGROUPS+= BSNMP
-BSNMP+= bsnmpd
-BSNMPPACKAGE= bsnmp
-.endif
+CONFGROUPS.${MK_BSNMP}+= BSNMP
+BSNMPPACKAGE= bsnmp
+BSNMP= bsnmpd
-.if ${MK_CCD} != "no"
-CONFGROUPS+= CCD
+CONFGROUPS.${MK_CCD}+= CCD
+CCDPACKAGE= ccdconfig
CCD= ccd
-CCDPACKAGE= ccdconfig
-.endif
-.if ${MK_CUSE} != "no"
-CONFGROUPS+= VOSS
-VOSS= virtual_oss
-VOSSPACKAGE= sound
-.endif
+CONFGROUPS+= DEVD
+DEVDPACKAGE= devd
+DEVD= devd
+
+CONFGROUPS+= DEVMATCH
+DEVMATCHPACKAGE= devmatch
+DEVMATCH= devmatch
+
+CONFGROUPS+= DHCLIENT
+DHCLIENTPACKAGE= dhclient
+DHCLIENT= dhclient
+
+CONFGROUPS+= CRON
+CRONPACKAGE= cron
+CRON= cron
-.if ${MK_KERBEROS_SUPPORT} != "no"
-CONFGROUPS+= GSSD
+CONFGROUPS+= CTL
+CTLPACKAGE= ctl
+CTL= ctld
+
+CONFGROUPS+= GEOM
+GEOMPACKAGE= geom
+GEOM= geli \
+ geli2 \
+ gptboot
+
+CONFGROUPS+= GGATED
+GGATEDPACKAGE= ggate
+GGATED= ggated
+
+CONFGROUPS.${MK_KERBEROS_SUPPORT}+=GSSD
+GSSDPACKAGE= gssd
GSSD= gssd
-GSSDPACKAGE= gssd
-.endif
-.if ${MK_HAST} != "no"
-CONFGROUPS+= HAST
+CONFGROUPS.${MK_HAST}+= HAST
+HASTPACKAGE= hast
HAST= hastd
-HASTPACKAGE= hast
-.endif
-.if ${MK_INETD} != "no"
-CONFGROUPS+= INETD
+CONFGROUPS.${MK_INETD}+= INETD
+INETDPACKAGE= inetd
INETD= inetd
-INETDPACKAGE= inetd
-.endif
-.if ${MK_IPFILTER} != "no"
-CONFGROUPS+= IPF
+CONFGROUPS.${MK_IPFILTER}+= IPF
+IPFPACKAGE= ipf
IPF= ipfilter \
ipfs \
ipmon \
ipnat \
ippool
-IPFPACKAGE= ipf
-.endif
-.if ${MK_IPFW} != "no"
-CONFGROUPS+= IPFW
-IPFW= ipfw dnctl
+CONFGROUPS.${MK_IPFW}+= IPFW
+IPFWPACKAGE= ipfw
+IPFW= ipfw \
+ dnctl
.if ${MK_NETGRAPH} != "no"
IPFW+= ipfw_netflow
.endif
-IPFWPACKAGE= ipfw
-# natd is only built when ipfw is built
-CONFGROUPS+= NATD
-NATD+= natd
-NATDPACKAGE= natd
-.endif
-
-.if ${MK_ISCSI} != "no"
-CONFGROUPS+= ISCSI
+CONFGROUPS.${MK_ISCSI}+= ISCSI
+ISCSIPACKAGE= iscsi
ISCSI= iscsictl \
iscsid
-ISCSIPACKAGE= iscsi
-.endif
-.if ${MK_JAIL} != "no"
-CONFGROUPS+= JAIL
-JAIL+= jail
-JAILPACKAGE= jail
-.endif
+# natd is only built when ipfw is built
+CONFGROUPS.${MK_IPFW}+= NATD
+NATDPACKAGE= natd
+NATD= natd
+
+CONFGROUPS.${MK_JAIL}+= JAIL
+JAILPACKAGE= jail
+JAIL= jail
+
+CONFGROUPS.${MK_LPR}+= LP
+LPPACKAGE= lp
+LP= lpd
+
+CONFGROUPS+= NEWSYSLOG
+NEWSYSLOGPACKAGE= newsyslog
+NEWSYSLOG= newsyslog
+
+CONFGROUPS+= NFS
+NFSPACKAGE= nfs
+NFS= lockd \
+ mountd \
+ nfscbd \
+ nfsclient \
+ nfsd \
+ nfsuserd \
+ statd
+
+CONFGROUPS.${MK_NIS}+= NIS
+NISPACKAGE= yp
+NIS= ypbind \
+ ypldap \
+ yppasswdd \
+ ypserv \
+ ypset \
+ ypupdated \
+ ypxfrd \
+ nisdomain
-.if ${MK_LEGACY_CONSOLE} != "no"
-CONFGROUPS+= CONSOLE
-CONSOLE+= moused
-CONSOLE+= msconvd
-CONSOLE+= syscons
-CONSOLEPACKAGE= console-tools
-.endif
+CONFGROUPS.${MK_NS_CACHING}+= NSCD
+NSCD= nscd
-.if ${MK_LPR} != "no"
-CONFGROUPS+= LP
-LP+= lpd
-LPPACKAGE= lp
-.endif
+CONFGROUPS.${MK_NTP}+= NTP
+NTPPACKAGE= ntp
+NTP= ntpd \
+ ntpdate
+
+CONFGROUPS.${MK_NUAGEINIT}+= NUAGEINIT
+NUAGEINITPACKAGE= nuageinit
+NUAGEINIT= nuageinit \
+ nuageinit_post_net \
+ nuageinit_user_data_script
+
+CONFGROUPS.${MK_OFED_EXTRA}+= OPENSM
+OPENSM= opensm
+
+CONFGROUPS.${MK_PF}+= PF
+PFPACKAGE= pf
+PF= pf \
+ pflog \
+ pfsync \
+ ftp-proxy
+
+CONFGROUPS+= POWERD
+POWERDPACKAGE= powerd
+POWERD= powerd
+
+CONFGROUPS.${MK_PPP}+= PPP
+PPPPACKAGE= ppp
+PPP= ppp
+
+CONFGROUPS+= PPPOED
+PPPOEDPACKAGE= ppp
+PPPOED= pppoed
+
+CONFGROUPS+= SYSLOGD
+SYSLOGDPACKAGE= syslogd
+SYSLOGD= syslogd
+
+CONFGROUPS+= RCMDS
+RCMDSPACKAGE= rcmds
+RCMDS= rwho
+
+CONFGROUPS+= RESOLVCONF
+RESOLVCONFPACKAGE= resolvconf
+RESOLVCONF= resolv
+
+CONFGROUPS.${MK_SENDMAIL}+= SENDMAIL
+SENDMAILPACKAGE= sendmail
+SENDMAIL= sendmail
+
+CONFGROUPS.${MK_OPENSSH}+= SSH
+SSHPACKAGE= ssh
+SSH= sshd
+
+CONFGROUPS.${MK_UNBOUND}+= UNBOUND
+UNBOUNDPACKAGE= unbound
+UNBOUND= local_unbound
+
+CONFGROUPS.${MK_VI}+= VI
+VIPACKAGE= vi
+VI= virecover
+
+CONFGROUPS.${MK_CUSE}+= VOSS
+VOSSPACKAGE= sound
+VOSS= virtual_oss
+
+CONFGROUPS.${MK_WIRELESS}+= HOSTAPD
+HOSTAPDPACKAGE= hostapd
+HOSTAPD= hostapd
+
+CONFGROUPS.${MK_WIRELESS}+= WPA
+WPAPACKAGE= wpa
+WPA= wpa_supplicant
+
+CONFGROUPS.${MK_ZFS}+= ZFS
+ZFSPACKAGE= zfs
+ZFS= zfs \
+ zfsbe \
+ zfsd \
+ zfskeys \
+ zpool \
+ zpoolreguid \
+ zpoolupgrade \
+ zvol
+
+CONFGROUPS.${MK_LEGACY_CONSOLE}+=SYSCONS
+SYSCONSPACKAGE= console-tools
+SYSCONS= moused \
+ msconvd \
+ syscons
.if ${MK_KERBEROS} != "no"
.if ${MK_MITKRB5} == "no"
@@ -315,58 +357,10 @@ KRB5PACKAGE= kerberos-kdc
.endif # ${MK_MITKRB5}
.endif # ${MK_KERBEROS}
-.if ${MK_NIS} != "no"
-CONFGROUPS+= YP
-YP= ypbind \
- ypldap \
- yppasswdd \
- ypserv \
- ypset \
- ypupdated \
- ypxfrd \
- nisdomain
-YPPACKAGE= yp
-.endif
-
-.if ${MK_NS_CACHING} != "no"
-_nscd= nscd
-.endif
-
-.if ${MK_NTP} != "no"
-CONFGROUPS+= NTP
-NTP+= ntpd \
- ntpdate
-NTPPACKAGE= ntp
-.endif
-
-.if ${MK_OFED_EXTRA} != "no"
-_opensm= opensm
-.endif
-
.if ${MK_OPENSSL} != "no" && ${MK_OPENSSL_KTLS} != "no"
-CONFS+= tlsclntd \
- tlsservd
-.endif
-
-.if ${MK_OPENSSH} != "no"
-CONFGROUPS+= SSH
-SSH= sshd
-SSHPACKAGE= ssh
-.endif
-
-.if ${MK_PF} != "no"
-CONFGROUPS+= PF
-PF= pf \
- pflog \
- pfsync \
- ftp-proxy
-PFPACKAGE= pf
-.endif
-
-.if ${MK_PPP} != "no"
-CONFGROUPS+= PPP
-PPP= ppp
-PPPPACKAGE= ppp
+CONFGROUPS+= KTLS
+KTLS= tlsclntd \
+ tlsservd
.endif
.if ${MK_INET6} != "no" || ${MK_ROUTED} != "no"
@@ -381,57 +375,9 @@ RIP+= routed
.endif
.endif
-.if ${MK_SENDMAIL} != "no"
-CONFGROUPS+= SMRCD
-SMRCD= sendmail
-SMRCDPACKAGE= sendmail
-.endif
-
-.if ${MK_NUAGEINIT} != "no"
-CONFGROUPS+= NIUAGEINIT
-NIUAGEINIT= nuageinit \
- nuageinit_post_net \
- nuageinit_user_data_script
-NIUAGEINITPACKAGE= nuageinit
-.endif
-
-.if ${MK_UNBOUND} != "no"
-CONFGROUPS+= UNBOUND
-UNBOUND+= local_unbound
-UNBOUNDPACKAGE= unbound
-.endif
-
-.if ${MK_VI} != "no"
-CONFGROUPS+= VI
-VI+= virecover
-VIPACKAGE= vi
-.endif
-
-.if ${MK_WIRELESS} != "no"
-CONFGROUPS+= HOSTAPD
-HOSTAPD= hostapd
-HOSTAPDPACKAGE= hostapd
-
-CONFGROUPS+= WPA
-WPA= wpa_supplicant
-WPAPACKAGE= wpa
-.endif
-
-.if ${MK_ZFS} != "no"
-CONFGROUPS+= ZFS
-ZFS+= zfs
-ZFS+= zfsbe
-ZFS+= zfsd
-ZFS+= zfskeys
-ZFS+= zpool
-ZFS+= zpoolreguid
-ZFS+= zpoolupgrade
-ZFS+= zvol
-ZFSPACKAGE= zfs
-.endif
-
-.for fg in ${CONFGROUPS}
+.for fg in ${CONFGROUPS} ${CONFGROUPS.yes}
${fg}MODE?= ${BINMODE}
+${fg}PACKAGE?= rc
.endfor
.include <bsd.prog.mk>
diff --git a/libexec/rc/rc.d/netwait b/libexec/rc/rc.d/netwait
index 3f374806d97c..05874552cf1c 100755
--- a/libexec/rc/rc.d/netwait
+++ b/libexec/rc/rc.d/netwait
@@ -2,12 +2,14 @@
#
# PROVIDE: netwait
# REQUIRE: devd ipfw pf routing
-# KEYWORD: nojail
#
-# The netwait script helps handle two situations:
+# The netwait script helps handle three situations:
# - Systems with USB or other late-attaching network hardware which
# is initialized by devd events. The script waits for all the
# interfaces named in the netwait_if list to appear.
+# - Systems with IPv6 addresses, especially jails, where we need to
+# wait for DAD to complete before starting daemons, as they will
+# otherwise fail to bind to IN6ADDR_ANY.
# - Systems with statically-configured IP addresses in rc.conf(5).
# The IP addresses in the netwait_ip list are pinged. The script
# waits for any single IP in the list to respond to the ping. If your
@@ -29,28 +31,38 @@ netwait_start()
{
local ip rc count output link wait_if got_if any_error
- if [ -z "${netwait_if}" ] && [ -z "${netwait_ip}" ]; then
- err 1 "No interface or IP addresses listed, nothing to wait for"
+ if [ -z "${netwait_if}" ] && [ -z "${netwait_ip}" ] &&
+ ! checkyesno netwait_dad ; then
+ err 1 "Nothing to wait for"
fi
- if [ ${netwait_timeout} -lt 1 ]; then
+ if ! [ "${netwait_if_timeout:=0}" -ge 1 ]; then
+ err 1 "netwait_if_timeout must be >= 1"
+ fi
+ if ! check_kern_features inet6; then
+ netwait_dad="NO"
+ elif ! [ "${netwait_dad_timeout:=0}" -ge 1 ]; then
+ netwait_dad_timeout=$(($(sysctl -n net.inet6.ip6.dad_count)+1))
+ fi
+ if ! [ "${netwait_timeout:=0}" -ge 1 ]; then
err 1 "netwait_timeout must be >= 1"
fi
+ any_error=false
+
if [ -n "${netwait_if}" ]; then
- any_error=0
for wait_if in ${netwait_if}; do
echo -n "Waiting for ${wait_if}"
link=""
- got_if=0
+ got_if=false
count=1
- # Handle SIGINT (Ctrl-C); force abort of while() loop
+ # Handle SIGINT (Ctrl-C); force abort of while loop
trap break SIGINT
while [ ${count} -le ${netwait_if_timeout} ]; do
if output=`/sbin/ifconfig ${wait_if} 2>/dev/null`; then
- if [ ${got_if} -eq 0 ]; then
+ if ! ${got_if}; then
echo -n ", interface present"
- got_if=1
+ got_if=true
fi
link=`expr "${output}" : '.*[[:blank:]]status: \(no carrier\)'`
if [ -z "${link}" ]; then
@@ -63,22 +75,45 @@ netwait_start()
done
# Restore default SIGINT handler
trap - SIGINT
- if [ ${got_if} -eq 0 ]; then
+ if ! ${got_if}; then
echo ", wait failed: interface never appeared."
- any_error=1
+ any_error=true
elif [ -n "${link}" ]; then
echo ", wait failed: interface still has no link."
- any_error=1
+ any_error=true
fi
done
- if [ ${any_error} -eq 1 ]; then
- warn "Continuing with startup, but be aware you may not have "
- warn "a fully functional networking layer at this point."
- fi
fi
+ if checkyesno netwait_dad; then
+ got_dad=false
+ # Handle SIGINT (Ctrl-C); force abort of while loop
+ trap break SIGINT
+
+ echo -n "Waiting for DAD to complete"
+ count=1
+ while [ ${count} -le ${netwait_dad_timeout} ]; do
+ if ! ifconfig | grep -q 'inet6.*tentative'; then
+ echo ', done.'
+ got_dad=true
+ break
+ fi
+ sleep 1
+ count=$((count+1))
+ done
+
+ # Restore default SIGINT handler
+ trap - SIGINT
+
+ if ! ${got_dad}; then
+ echo ', timed out.'
+ any_error=true
+ fi
+ fi
+
if [ -n "${netwait_ip}" ]; then
- # Handle SIGINT (Ctrl-C); force abort of for() loop
+ got_ip=false
+ # Handle SIGINT (Ctrl-C); force abort of for loop
trap break SIGINT
for ip in ${netwait_ip}; do
@@ -90,11 +125,9 @@ netwait_start()
rc=$?
if [ $rc -eq 0 ]; then
- # Restore default SIGINT handler
- trap - SIGINT
-
echo ', got response.'
- return
+ got_ip=false
+ break 2
fi
count=$((count+1))
done
@@ -104,10 +137,15 @@ netwait_start()
# Restore default SIGINT handler
trap - SIGINT
- warn "Exhausted IP list. Continuing with startup, but be aware you may"
- warn "not have a fully functional networking layer at this point."
+ if ! ${got_ip}; then
+ any_error=true
+ fi
fi
+ if ${any_error}; then
+ warn "Continuing with startup, but be aware you may not have "
+ warn "a fully functional networking layer at this point."
+ fi
}
load_rc_config $name
diff --git a/libexec/rc/rc.d/virtual_oss b/libexec/rc/rc.d/virtual_oss
index 4f5c34ce03f3..b9c830617385 100644
--- a/libexec/rc/rc.d/virtual_oss
+++ b/libexec/rc/rc.d/virtual_oss
@@ -1,8 +1,8 @@
#!/bin/sh
# PROVIDE: virtual_oss
-# REQUIRE: kld ldconfig
-# BEFORE: LOGIN sndiod
+# REQUIRE: NETWORKING kld ldconfig
+# BEFORE: LOGIN
# KEYWORD: shutdown
. /etc/rc.subr
diff --git a/release/Makefile b/release/Makefile
index 6bcb651d8dba..6b5b0c1b975c 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -445,9 +445,7 @@ release: real-release vm-release cloudware-release oci-release
release-done:
touch release
-real-release:
- ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj
- ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS}
+real-release: obj .WAIT ${RELEASE_TARGETS}
install: release-install vm-install oci-install .WAIT cloud-install
diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors
index 6778b86873e6..ed9420e926ce 100644
--- a/release/Makefile.mirrors
+++ b/release/Makefile.mirrors
@@ -382,16 +382,16 @@ pkgbase-repo-stage:
mkdir -p ${PKGBASE_DIR}/Latest
mkdir -p ${PKGBASE_DIR}/${BUILDDATE}
cd ${RELEASEDIR}/pkgbase && \
- mv pkgbase-repo.tar pkgbase-repo-${SNAP_SUFFIX}.tar
- cp -p ${RELEASEDIR}/pkgbase/pkgbase-repo-${SNAP_SUFFIX}.tar \
- ${PKGBASE_DIR}/${BUILDDATE}/pkgbase-repo-${SNAP_SUFFIX}.tar
+ mv pkgbase-repo.tar ${OSRELEASE}-pkgbase-repo-${SNAP_SUFFIX}.tar
+ cp -p ${RELEASEDIR}/pkgbase/${OSRELEASE}-pkgbase-repo-${SNAP_SUFFIX}.tar \
+ ${PKGBASE_DIR}/${BUILDDATE}/${OSRELEASE}-pkgbase-repo-${SNAP_SUFFIX}.tar
cd ${PKGBASE_DIR}/Latest && \
- ln -s ../${BUILDDATE}/pkgbase-repo-${SNAP_SUFFIX}.tar \
- pkgbase-repo.tar
+ ln -s ../${BUILDDATE}/${OSRELEASE}-pkgbase-repo-${SNAP_SUFFIX}.tar \
+ ${OSRELEASE}-pkgbase-repo.tar
cd ${RELEASEDIR}/pkgbase && rm -f CHECKSUM.*
. for CHECKSUM in ${CHECKSUM_FILES}
cd ${RELEASEDIR}/pkgbase && \
- ${CHECKSUM:tl} pkgbase-repo-*.tar > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX}
+ ${CHECKSUM:tl} ${OSRELEASE}-pkgbase-repo-*.tar > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX}
cp -p ${RELEASEDIR}/pkgbase/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \
${PKGBASE_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX}
cd ${PKGBASE_DIR}/Latest && \
@@ -403,10 +403,14 @@ pkgbase-repo-stage:
rm -rf ${PKGBASE_DIR}/Latest
. endif
mkdir -p ${PKGBASE_DIR}/Latest
- cp -p ${RELEASEDIR}/pkgbase/pkgbase-repo.tar \
- ${PKGBASE_DIR}/Latest/pkgbase-repo.tar
+ cd ${RELEASEDIR}/pkgbase && \
+ mv pkgbase-repo.tar ${OSRELEASE}-pkgbase-repo.tar
+ cp -p ${RELEASEDIR}/pkgbase/${OSRELEASE}-pkgbase-repo.tar \
+ ${PKGBASE_DIR}/Latest/${OSRELEASE}-pkgbase-repo.tar
. endfor
. for CHECKSUM in ${CHECKSUM_FILES}
+ cd ${RELEASEDIR}/pkgbase && \
+ ${CHECKSUM:tl} ${OSRELEASE}-pkgbase-repo.tar > CHECKSUM.${CHECKSUM}
cp -p ${RELEASEDIR}/pkgbase/CHECKSUM.${CHECKSUM} \
${PKGBASE_DIR}/Latest/CHECKSUM.${CHECKSUM}
. endfor
diff --git a/release/arm64/RPI.conf b/release/arm64/RPI.conf
index b973687c535d..d418dae28d3a 100644
--- a/release/arm64/RPI.conf
+++ b/release/arm64/RPI.conf
@@ -3,8 +3,9 @@
#
DTB_DIR="/usr/local/share/rpi-firmware"
-DTB="bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb bcm2710-rpi-cm3.dtb \
- bcm2711-rpi-4-b.dtb bcm2711-rpi-cm4-io.dtb bcm2711-rpi-cm4.dtb"
+DTB="bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb \
+ bcm2710-rpi-cm3.dtb bcm2710-rpi-zero-2-w.dtb bcm2711-rpi-4-b.dtb \
+ bcm2711-rpi-cm4-io.dtb bcm2711-rpi-cm4.dtb"
EMBEDDED_TARGET_ARCH="aarch64"
EMBEDDED_TARGET="arm64"
EMBEDDEDBUILD=1
diff --git a/release/packages/generate-set-ucl.lua b/release/packages/generate-set-ucl.lua
index 3c8474bf8e68..9ba7026b75df 100755
--- a/release/packages/generate-set-ucl.lua
+++ b/release/packages/generate-set-ucl.lua
@@ -1,4 +1,10 @@
#!/usr/libexec/flua
+--
+-- Copyright (c) 2024-2025 Baptiste Daroussin <bapt@FreeBSD.org>
+-- Copyright (c) 2025 Lexi Winter <ivy@FreeBSD.org>
+--
+-- SPDX-License-Identifier: BSD-2-Clause
+--
--[[ usage:
generate-set-ucl.lua <template> [<variablename> <variablevalue>]
@@ -75,15 +81,15 @@ end
-- Add dependencies from SET_DEPENDS.
for dep in string.gmatch(pkgdeps, "[^%s]+") do
obj["deps"][dep] = {
- ["origin"] = "base"
+ ["origin"] = "base/"..dep
}
end
--- Add a version key to all dependencies, otherwise pkg doesn't like it.
+-- Add a version and origin key to all dependencies, otherwise pkg
+-- doesn't like it.
for dep, opts in pairs(obj["deps"]) do
- if obj["deps"][dep]["version"] == nil then
- obj["deps"][dep]["version"] = pkgversion
- end
+ obj["deps"][dep]["origin"] = obj["deps"][dep]["origin"] or "base/"..dep
+ obj["deps"][dep]["version"] = obj["deps"][dep]["version"] or pkgversion
end
-- If there are no dependencies, remove the deps key, otherwise pkg raises an
diff --git a/release/packages/generate-ucl.lua b/release/packages/generate-ucl.lua
index c61cbb251d8b..19a9a95d5d38 100755
--- a/release/packages/generate-ucl.lua
+++ b/release/packages/generate-ucl.lua
@@ -1,4 +1,10 @@
#!/usr/libexec/flua
+--
+-- Copyright (c) 2024-2025 Baptiste Daroussin <bapt@FreeBSD.org>
+-- Copyright (c) 2025 Lexi Winter <ivy@FreeBSD.org>
+--
+-- SPDX-License-Identifier: BSD-2-Clause
+--
--[[ usage:
generate-ucl.lua [<variablename> <variablevalue>]... <sourceucl> <destucl>
@@ -161,7 +167,7 @@ if add_gen_dep(pkgname, pkggenname) then
end
obj["deps"][pkggenname] = {
["version"] = pkgversion,
- ["origin"] = "base"
+ ["origin"] = "base/"..pkgprefix.."-"..pkggenname,
}
end
@@ -217,6 +223,8 @@ if pkgprefix ~= nil and obj["deps"] ~= nil then
newdeps = {}
for dep, opts in pairs(obj["deps"]) do
local newdep = pkgprefix .. "-" .. dep
+ -- Make sure origin is set.
+ opts["origin"] = opts["origin"] or "base/"..newdep
newdeps[newdep] = opts
end
obj["deps"] = newdeps
diff --git a/release/packages/set-template.ucl b/release/packages/set-template.ucl
index b7ea2b830168..ff2c2d3e6057 100644
--- a/release/packages/set-template.ucl
+++ b/release/packages/set-template.ucl
@@ -4,7 +4,7 @@
name = "${PKG_NAME_PREFIX}-set-${PKGNAME}"
prefix = "/"
-origin = "base"
+origin = "base/${PKG_NAME_PREFIX}-set-${PKGNAME}"
categories = [ base ]
version = "${VERSION}"
maintainer = "${PKG_MAINTAINER}"
diff --git a/release/packages/sets/base-dbg.ucl b/release/packages/sets/base-dbg.ucl
index d9eeb2c49677..79e5de22522e 100644
--- a/release/packages/sets/base-dbg.ucl
+++ b/release/packages/sets/base-dbg.ucl
@@ -25,10 +25,8 @@ EOD
deps {
"set-minimal-dbg" {
version = "${VERSION}"
- origin = "base"
},
"set-devel-dbg" {
version = "${VERSION}"
- origin = "base"
}
}
diff --git a/release/packages/sets/base-jail-dbg.ucl b/release/packages/sets/base-jail-dbg.ucl
index 7996b9afbb21..56a130367fa3 100644
--- a/release/packages/sets/base-jail-dbg.ucl
+++ b/release/packages/sets/base-jail-dbg.ucl
@@ -25,10 +25,8 @@ EOD
deps {
"set-minimal-jail-dbg" {
version = "${VERSION}"
- origin = "base"
},
"set-devel-dbg" {
version = "${VERSION}"
- origin = "base"
}
}
diff --git a/release/packages/sets/base-jail.ucl b/release/packages/sets/base-jail.ucl
index d1dc17bc9860..88861510f954 100644
--- a/release/packages/sets/base-jail.ucl
+++ b/release/packages/sets/base-jail.ucl
@@ -28,14 +28,11 @@ EOD
deps {
"set-minimal-jail" {
version = "${VERSION}"
- origin = "base"
},
"set-optional-jail" {
version = "${VERSION}"
- origin = "base"
},
"set-devel" {
version = "${VERSION}"
- origin = "base"
}
}
diff --git a/release/packages/sets/base.ucl b/release/packages/sets/base.ucl
index 823e2342fab8..6a970668c13e 100644
--- a/release/packages/sets/base.ucl
+++ b/release/packages/sets/base.ucl
@@ -31,14 +31,11 @@ EOD
deps {
"set-minimal" {
version = "${VERSION}"
- origin = "base"
},
"set-optional" {
version = "${VERSION}"
- origin = "base"
},
"set-devel" {
version = "${VERSION}"
- origin = "base"
}
}
diff --git a/release/packages/sets/optional-dbg.ucl b/release/packages/sets/optional-dbg.ucl
index a221327518f9..882469c3ad57 100644
--- a/release/packages/sets/optional-dbg.ucl
+++ b/release/packages/sets/optional-dbg.ucl
@@ -26,6 +26,5 @@ EOD
deps {
"set-minimal-dbg" {
version = "${VERSION}"
- origin = "base"
},
}
diff --git a/release/packages/sets/optional-jail-dbg.ucl b/release/packages/sets/optional-jail-dbg.ucl
index 84c76fa407fe..54e7309abdf1 100644
--- a/release/packages/sets/optional-jail-dbg.ucl
+++ b/release/packages/sets/optional-jail-dbg.ucl
@@ -26,6 +26,5 @@ EOD
deps {
"set-minimal-jail-dbg" {
version = "${VERSION}"
- origin = "base"
},
}
diff --git a/release/packages/sets/optional-jail.ucl b/release/packages/sets/optional-jail.ucl
index da6d5fb00825..877023a10eed 100644
--- a/release/packages/sets/optional-jail.ucl
+++ b/release/packages/sets/optional-jail.ucl
@@ -29,6 +29,5 @@ EOD
deps {
"set-minimal-jail" {
version = "${VERSION}"
- origin = "base"
},
}
diff --git a/release/packages/sets/optional.ucl b/release/packages/sets/optional.ucl
index f50fa17e4297..8b44dfe1f3ea 100644
--- a/release/packages/sets/optional.ucl
+++ b/release/packages/sets/optional.ucl
@@ -28,6 +28,5 @@ EOD
deps {
"set-minimal" {
version = "${VERSION}"
- origin = "base"
},
}
diff --git a/release/packages/ucl/at.ucl b/release/packages/ucl/at.ucl
index 25724adfd7af..1e2495028b30 100644
--- a/release/packages/ucl/at.ucl
+++ b/release/packages/ucl/at.ucl
@@ -20,13 +20,11 @@ deps {
# atrun relies on cron to work.
"cron" {
version = "${VERSION}"
- origin = "base"
},
# at(1) passes the command to /bin/sh
"runtime" {
version = "${VERSION}"
- origin = "base"
},
}
diff --git a/release/packages/ucl/bluetooth.ucl b/release/packages/ucl/bluetooth.ucl
index c87d5e9c8420..e9c4787fdbfb 100644
--- a/release/packages/ucl/bluetooth.ucl
+++ b/release/packages/ucl/bluetooth.ucl
@@ -20,7 +20,6 @@ deps {
# rfcomm_pppd(8) uses ppp(8)
"ppp" {
version = "${VERSION}"
- origin = "base"
},
}
diff --git a/release/packages/ucl/bsdconfig.ucl b/release/packages/ucl/bsdconfig.ucl
index 752c352ae904..98981f65bea4 100644
--- a/release/packages/ucl/bsdconfig.ucl
+++ b/release/packages/ucl/bsdconfig.ucl
@@ -20,6 +20,5 @@ deps {
# bsdconfig is written in shell script, so it needs /bin/sh
"runtime" {
version = "${VERSION}"
- origin = "base"
},
}
diff --git a/release/packages/ucl/bsdinstall.ucl b/release/packages/ucl/bsdinstall.ucl
index 6e5cbce4e342..7fe8898b9427 100644
--- a/release/packages/ucl/bsdinstall.ucl
+++ b/release/packages/ucl/bsdinstall.ucl
@@ -20,6 +20,5 @@ deps {
# bsdinstall is written in shell script, so it needs /bin/sh
"runtime" {
version = "${VERSION}"
- origin = "base"
},
}
diff --git a/release/packages/ucl/caroot.ucl b/release/packages/ucl/caroot.ucl
index 4d2b52d300fc..e43c9d0771f2 100644
--- a/release/packages/ucl/caroot.ucl
+++ b/release/packages/ucl/caroot.ucl
@@ -1,7 +1,6 @@
deps {
"certctl": {
version = "${VERSION}"
- origin = "base"
}
}
scripts: {
diff --git a/release/packages/ucl/certctl.ucl b/release/packages/ucl/certctl.ucl
index f12158459c5e..d2b4790946ec 100644
--- a/release/packages/ucl/certctl.ucl
+++ b/release/packages/ucl/certctl.ucl
@@ -19,6 +19,5 @@
deps {
"openssl": {
version = "${VERSION}"
- origin = "base"
}
}
diff --git a/release/packages/ucl/clang.ucl b/release/packages/ucl/clang.ucl
index 956b769a1ee7..3c15d9b7ef03 100644
--- a/release/packages/ucl/clang.ucl
+++ b/release/packages/ucl/clang.ucl
@@ -1,11 +1,9 @@
deps {
"lld" {
version = "${VERSION}"
- origin = "base"
}
"libcompiler_rt-dev" {
version = "${VERSION}"
- origin = "base"
}
}
diff --git a/release/packages/ucl/devd.ucl b/release/packages/ucl/devd.ucl
index 8d83ab9ee020..c5fcfef1c368 100644
--- a/release/packages/ucl/devd.ucl
+++ b/release/packages/ucl/devd.ucl
@@ -20,6 +20,5 @@ deps {
# devd uses /bin/sh to invoke hooks.
"runtime" {
version = "${VERSION}"
- origin = "base"
},
}
diff --git a/release/packages/ucl/ncurses-all.ucl b/release/packages/ucl/ncurses-all.ucl
index c0d52e046e78..3963eb98aa72 100644
--- a/release/packages/ucl/ncurses-all.ucl
+++ b/release/packages/ucl/ncurses-all.ucl
@@ -17,3 +17,7 @@ curses interface, and is also backward compatible with traditional BSD curses.
This package ships with a limited termcap database, but it is designed to use
a terminfo database provided by ports, such as in misc/terminfo-db.
EOD
+
+annotations {
+ set = "minimal,minimal-jail"
+}
diff --git a/release/packages/ucl/newsyslog.ucl b/release/packages/ucl/newsyslog.ucl
index b1dfa8253737..27b212a42b77 100644
--- a/release/packages/ucl/newsyslog.ucl
+++ b/release/packages/ucl/newsyslog.ucl
@@ -2,6 +2,5 @@ deps {
# newsyslog uses bzip2 to compress log files.
"bzip2" {
version = "${VERSION}"
- origin = "base"
}
}
diff --git a/release/packages/ucl/periodic.ucl b/release/packages/ucl/periodic.ucl
index c8b8ac57c676..2a8a482f959f 100644
--- a/release/packages/ucl/periodic.ucl
+++ b/release/packages/ucl/periodic.ucl
@@ -19,6 +19,5 @@
deps {
"cron" {
version = "${VERSION}"
- origin = "base"
}
}
diff --git a/release/packages/ucl/rc.ucl b/release/packages/ucl/rc.ucl
index 1a734aaa187c..854963a81ca1 100644
--- a/release/packages/ucl/rc.ucl
+++ b/release/packages/ucl/rc.ucl
@@ -19,7 +19,6 @@
deps {
"runtime": {
version = "${VERSION}"
- origin = "base"
}
}
diff --git a/release/packages/ucl/rcmds.ucl b/release/packages/ucl/rcmds.ucl
index b572ff25e6c3..de608487e07d 100644
--- a/release/packages/ucl/rcmds.ucl
+++ b/release/packages/ucl/rcmds.ucl
@@ -20,7 +20,6 @@ deps {
# The RPC daemons require rpcbind.
"utilities" {
version = "${VERSION}"
- origin = "base"
}
}
diff --git a/release/packages/ucl/sendmail.ucl b/release/packages/ucl/sendmail.ucl
index 62d0a1f2bc61..318fd5aabbe5 100644
--- a/release/packages/ucl/sendmail.ucl
+++ b/release/packages/ucl/sendmail.ucl
@@ -20,6 +20,5 @@ deps {
# sendmail requires make to build its configuration file.
"bmake": {
version = "${VERSION}"
- origin = "base"
}
}
diff --git a/release/packages/ucl/tests-all.ucl b/release/packages/ucl/tests-all.ucl
index 1f3b027b7037..3ad2d0f50e6b 100644
--- a/release/packages/ucl/tests-all.ucl
+++ b/release/packages/ucl/tests-all.ucl
@@ -27,20 +27,17 @@ deps {
# Nearly all the tests require atf to run.
"atf": {
version = "${VERSION}"
- origin = "base"
},
# The test framework requires Kyua.
"kyua": {
version = "${VERSION}"
- origin = "base"
},
# Since the purpose of the tests is to test the base system, the base
# system must be installed.
"set-base": {
version = "${VERSION}"
- origin = "base"
}
}
diff --git a/release/packages/ucl/yp.ucl b/release/packages/ucl/yp.ucl
index be4310c85591..9babdbe98fb1 100644
--- a/release/packages/ucl/yp.ucl
+++ b/release/packages/ucl/yp.ucl
@@ -20,6 +20,5 @@ deps {
# YP requires bmake to rebuild the database.
"bmake": {
version = "${VERSION}"
- origin = "base"
}
}
diff --git a/release/scripts/make-oci-image.sh b/release/scripts/make-oci-image.sh
index 6e5ad69741f7..f8ea679bfd18 100644
--- a/release/scripts/make-oci-image.sh
+++ b/release/scripts/make-oci-image.sh
@@ -39,10 +39,18 @@ install_packages() {
local abi=$1; shift
local workdir=$1; shift
local rootdir=${workdir}/rootfs
+
+ # Make sure we have the keys needed for verifying package integrity if
+ # not already added by a parent image.
if [ ! -d ${rootdir}/usr/share/keys/pkg/trusted ]; then
mkdir -p ${rootdir}/usr/share/keys/pkg/trusted
fi
- cp /usr/share/keys/pkg/trusted/* ${rootdir}/usr/share/keys/pkg/trusted
+ for i in ${curdir}/../share/keys/pkg/trusted/pkg.*; do
+ if [ ! -f ${rootdir}/usr/share/keys/pkg/trusted/$(basename $i) ]; then
+ cp $i ${rootdir}/usr/share/keys/pkg/trusted
+ fi
+ done
+
# We install the packages and then remove repository metadata (keeping the
# metadata for what was installed). This trims more than 40Mb from the
# resulting image.
diff --git a/release/tools/ec2-builder.conf b/release/tools/ec2-builder.conf
index cf4276fc80ec..a55485fec0cd 100644
--- a/release/tools/ec2-builder.conf
+++ b/release/tools/ec2-builder.conf
@@ -7,17 +7,16 @@
export VMSIZE=8000m
# Flags to installworld/kernel: We don't want debug symbols (kernel or
-# userland), 32-bit libraries, tests, or the debugger.
+# userland), 32-bit libraries, or tests.
export INSTALLOPTS="WITHOUT_DEBUG_FILES=YES WITHOUT_KERNEL_SYMBOLS=YES \
- WITHOUT_LIB32=YES WITHOUT_TESTS=YES WITHOUT_LLDB=YES"
+ WITHOUT_LIB32=YES WITHOUT_TESTS=YES"
# Equivalent to INSTALLOPTS for pkgbase
vm_extra_filter_base_packages() {
grep -v \
-e '.*-dbg$' \
-e '.*-lib32$' \
- -e '^FreeBSD-tests.*' \
- -e '^FreeBSD-lldb.*'
+ -e '^FreeBSD-set-tests'
}
# Packages to install into the image we're creating. In addition to packages
diff --git a/release/tools/ec2-small.conf b/release/tools/ec2-small.conf
index 32d02cbb79e4..acaffbbc0c42 100644
--- a/release/tools/ec2-small.conf
+++ b/release/tools/ec2-small.conf
@@ -10,17 +10,16 @@
export VMSIZE=5000m
# Flags to installworld/kernel: We don't want debug symbols (kernel or
-# userland), 32-bit libraries, tests, or the debugger.
+# userland), 32-bit libraries, or tests.
export INSTALLOPTS="WITHOUT_DEBUG_FILES=YES WITHOUT_KERNEL_SYMBOLS=YES \
- WITHOUT_LIB32=YES WITHOUT_TESTS=YES WITHOUT_LLDB=YES"
+ WITHOUT_LIB32=YES WITHOUT_TESTS=YES"
# Equivalent to INSTALLOPTS for pkgbase
vm_extra_filter_base_packages() {
grep -v \
-e '.*-dbg$' \
-e '.*-lib32$' \
- -e '^FreeBSD-tests.*' \
- -e '^FreeBSD-lldb.*'
+ -e '^FreeBSD-set-tests'
}
# Packages to install into the image we're creating. In addition to packages
diff --git a/release/tools/oci-image-notoolchain.conf b/release/tools/oci-image-notoolchain.conf
index a769b53f9ff6..72a62657fa76 100644
--- a/release/tools/oci-image-notoolchain.conf
+++ b/release/tools/oci-image-notoolchain.conf
@@ -1,67 +1,25 @@
#! /bin/sh
-# Build OCI container image with almost all packages suitable for jails, excluding compiler
+# Build OCI container image with almost all packages suitable for jails,
+# excluding toolchain.
OCI_BASE_IMAGE=runtime
oci_image_build() {
set_cmd ${workdir} /bin/sh
install_packages ${abi} ${workdir} \
- FreeBSD-acct \
- FreeBSD-at \
- FreeBSD-audit \
- FreeBSD-autofs \
- FreeBSD-blocklist \
- FreeBSD-bsnmp \
- FreeBSD-caroot \
- FreeBSD-certctl \
- FreeBSD-clibs \
- FreeBSD-console-tools \
- FreeBSD-cron \
- FreeBSD-csh \
+ FreeBSD-bmake \
FreeBSD-dma \
- FreeBSD-ee \
- FreeBSD-fd \
- FreeBSD-fetch \
- FreeBSD-ftp \
FreeBSD-inetd \
FreeBSD-ipf \
FreeBSD-ipfw \
- FreeBSD-iscsi \
- FreeBSD-jail \
- FreeBSD-kerberos \
- FreeBSD-kerberos-lib \
- FreeBSD-libarchive \
- FreeBSD-libcompiler_rt-dev \
- FreeBSD-libexecinfo \
- FreeBSD-libucl \
- FreeBSD-locales \
- FreeBSD-lp \
- FreeBSD-mtree \
FreeBSD-natd \
FreeBSD-netmap \
- FreeBSD-newsyslog \
- FreeBSD-nfs \
- FreeBSD-nuageinit \
- FreeBSD-openssl \
- FreeBSD-periodic \
FreeBSD-pf \
- FreeBSD-pkg-bootstrap \
- FreeBSD-quotacheck \
- FreeBSD-rc \
- FreeBSD-rcmds \
- FreeBSD-rescue \
- FreeBSD-resolvconf \
- FreeBSD-runtime \
FreeBSD-ssh \
- FreeBSD-syslogd \
- FreeBSD-tcpd \
FreeBSD-telnet \
- FreeBSD-ufs \
- FreeBSD-unbound \
- FreeBSD-utilities \
- FreeBSD-vi \
- FreeBSD-yp \
+ FreeBSD-xz \
FreeBSD-zfs \
- FreeBSD-zoneinfo
+ FreeBSD-set-minimal-jail
}
+
diff --git a/release/tools/oci-image-runtime.conf b/release/tools/oci-image-runtime.conf
index 93aad1e39250..db99e5640040 100644
--- a/release/tools/oci-image-runtime.conf
+++ b/release/tools/oci-image-runtime.conf
@@ -9,6 +9,10 @@ OCI_BASE_IMAGE=dynamic
oci_image_build() {
set_cmd ${workdir} /bin/sh
+ # The static image installed termcap.small into /usr/share/misc/termcap
+ # and we are replacing it with the full termcap file. We remove the
+ # small one first to avoid creating a .pkgsave file.
+ rm ${workdir}/rootfs/usr/share/misc/termcap
install_packages ${abi} ${workdir} \
FreeBSD-runtime \
FreeBSD-certctl \
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index cae8a113871e..067eb5ea48a8 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -70,15 +70,20 @@ vm_copy_base() {
return 0
}
-vm_filter_base_packages() {
- # Reads a list of all base system packages from stdin.
- # Writes a list of base system packages to install to stdout.
- grep -v -e '^FreeBSD-src.*' -e '^FreeBSD-kernel.*'
- # There are several kernel variants available in separate packages.
- # For VMs it is sufficient to install only the generic kernel.
- echo "FreeBSD-kernel-man"
- echo "FreeBSD-kernel-generic"
- echo "FreeBSD-kernel-generic-dbg"
+vm_base_packages_list() {
+ # Output a list of package sets equivalent to what we get from
+ # "installworld installkernel distribution", aka. the full base
+ # system.
+ for S in base kernels; do
+ echo FreeBSD-set-$S
+ echo FreeBSD-set-$S-dbg
+ done
+ case ${TARGET_ARCH} in
+ amd64 | aarch64 | powerpc64)
+ echo FreeBSD-set-lib32
+ echo FreeBSD-set-lib32-dbg
+ esac
+ echo FreeBSD-set-tests
}
vm_extra_filter_base_packages() {
@@ -99,8 +104,7 @@ vm_install_base() {
pkg_cmd="$pkg_cmd -o METALOG=METALOG"
fi
$pkg_cmd update
- selected=$($pkg_cmd rquery -U -r FreeBSD-base %n | \
- vm_filter_base_packages | vm_extra_filter_base_packages)
+ selected=$(vm_base_packages_list | vm_extra_filter_base_packages)
$pkg_cmd install -U -r FreeBSD-base $selected
else
cd ${WORLDDIR} && \
diff --git a/sbin/ipf/libipf/printdstl_live.c b/sbin/ipf/libipf/printdstl_live.c
index 088448e6656d..72cb75a832c9 100644
--- a/sbin/ipf/libipf/printdstl_live.c
+++ b/sbin/ipf/libipf/printdstl_live.c
@@ -40,6 +40,9 @@ printdstl_live( ippool_dst_t *d, int fd, char *name, int opts,
if ((d->ipld_flags & IPHASH_DELETE) != 0)
PRINTF("# ");
+ if (opts & OPT_SAVEOUT)
+ PRINTF("{\n");
+
if ((opts & OPT_DEBUG) == 0)
PRINTF("\t{");
diff --git a/sbin/ipf/libipf/printdstlist.c b/sbin/ipf/libipf/printdstlist.c
index 2cf41ffe414c..497d7004c94c 100644
--- a/sbin/ipf/libipf/printdstlist.c
+++ b/sbin/ipf/libipf/printdstlist.c
@@ -42,6 +42,8 @@ printdstlist( ippool_dst_t *pp, copyfunc_t copyfunc, char *name, int opts,
return (NULL);
}
+ if (opts & OPT_SAVEOUT)
+ PRINTF("\t");
node = printdstlistnode(n, bcopywrap, opts, fields);
free(n);
diff --git a/sbin/ipf/libipf/printdstlistdata.c b/sbin/ipf/libipf/printdstlistdata.c
index 7940d2ae021b..546bf35cabf6 100644
--- a/sbin/ipf/libipf/printdstlistdata.c
+++ b/sbin/ipf/libipf/printdstlistdata.c
@@ -11,8 +11,7 @@
void
printdstlistdata( ippool_dst_t *pool, int opts)
{
-
- if ((opts & OPT_DEBUG) == 0) {
+ if ((opts & OPT_DEBUG) == 0 || opts & OPT_SAVEOUT) {
if ((pool->ipld_flags & IPDST_DELETE) != 0)
PRINTF("# ");
PRINTF("pool ");
@@ -24,7 +23,7 @@ printdstlistdata( ippool_dst_t *pool, int opts)
printunit(pool->ipld_unit);
- if ((opts & OPT_DEBUG) == 0) {
+ if ((opts & OPT_DEBUG) == 0 || opts & OPT_SAVEOUT) {
PRINTF("/dstlist (name %s;", pool->ipld_name);
if (pool->ipld_policy != IPLDP_NONE) {
PRINTF(" policy ");
diff --git a/sbin/ipf/libipf/printhash_live.c b/sbin/ipf/libipf/printhash_live.c
index b8ee31b27597..427daa18316b 100644
--- a/sbin/ipf/libipf/printhash_live.c
+++ b/sbin/ipf/libipf/printhash_live.c
@@ -26,7 +26,9 @@ printhash_live(iphtable_t *hp, int fd, char *name, int opts, wordtab_t *fields)
if ((hp->iph_flags & IPHASH_DELETE) != 0)
PRINTF("# ");
- if ((opts & OPT_DEBUG) == 0)
+ if (opts & OPT_SAVEOUT)
+ PRINTF("{\n");
+ else if ((opts & OPT_DEBUG) == 0)
PRINTF("\t{");
obj.ipfo_rev = IPFILTER_VERSION;
@@ -50,6 +52,8 @@ printhash_live(iphtable_t *hp, int fd, char *name, int opts, wordtab_t *fields)
last = 1;
if (bcmp(&zero, &entry, sizeof(zero)) == 0)
break;
+ if (opts & OPT_SAVEOUT)
+ PRINTF("\t");
(void) printhashnode(hp, &entry, bcopywrap, opts, fields);
printed++;
}
@@ -59,7 +63,7 @@ printhash_live(iphtable_t *hp, int fd, char *name, int opts, wordtab_t *fields)
if (printed == 0)
putchar(';');
- if ((opts & OPT_DEBUG) == 0)
+ if ((opts & OPT_DEBUG) == 0 || (opts & OPT_SAVEOUT))
PRINTF(" };\n");
(void) ioctl(fd,SIOCIPFDELTOK, &iter.ili_key);
diff --git a/sbin/ipf/libipf/printhashdata.c b/sbin/ipf/libipf/printhashdata.c
index 690243d63f1e..6fa62e67556d 100644
--- a/sbin/ipf/libipf/printhashdata.c
+++ b/sbin/ipf/libipf/printhashdata.c
@@ -12,7 +12,11 @@ void
printhashdata(iphtable_t *hp, int opts)
{
- if ((opts & OPT_DEBUG) == 0) {
+ if (opts & OPT_SAVEOUT) {
+ if ((hp->iph_flags & IPHASH_DELETE) == IPHASH_DELETE)
+ PRINTF("# ");
+ PRINTF("pool ");
+ } else if ((opts & OPT_DEBUG) == 0) {
if ((hp->iph_type & IPHASH_ANON) == IPHASH_ANON)
PRINTF("# 'anonymous' table refs %d\n", hp->iph_ref);
if ((hp->iph_flags & IPHASH_DELETE) == IPHASH_DELETE)
@@ -37,6 +41,8 @@ printhashdata(iphtable_t *hp, int opts)
}
PRINTF(" role=");
} else {
+ if ((hp->iph_flags & IPHASH_DELETE) == IPHASH_DELETE)
+ PRINTF("# ");
PRINTF("Hash Table %s: %s",
ISDIGIT(*hp->iph_name) ? "Number" : "Name",
hp->iph_name);
@@ -48,7 +54,16 @@ printhashdata(iphtable_t *hp, int opts)
printunit(hp->iph_unit);
- if ((opts & OPT_DEBUG) == 0) {
+ if ((opts & OPT_SAVEOUT)) {
+ if ((hp->iph_type & ~IPHASH_ANON) == IPHASH_LOOKUP)
+ PRINTF("/hash");
+ PRINTF("(%s \"%s\"; size %lu;",
+ ISDIGIT(*hp->iph_name) ? "number" : "name",
+ hp->iph_name, (u_long)hp->iph_size);
+ if (hp->iph_seed != 0)
+ PRINTF(" seed %lu;", hp->iph_seed);
+ PRINTF(")\n", hp->iph_seed);
+ } else if ((opts & OPT_DEBUG) == 0) {
if ((hp->iph_type & ~IPHASH_ANON) == IPHASH_LOOKUP)
PRINTF(" type=hash");
PRINTF(" %s=%s size=%lu",
diff --git a/sbin/ipf/libipf/printpooldata.c b/sbin/ipf/libipf/printpooldata.c
index bd5af316eb19..b203522734be 100644
--- a/sbin/ipf/libipf/printpooldata.c
+++ b/sbin/ipf/libipf/printpooldata.c
@@ -13,6 +13,8 @@ printpooldata(ip_pool_t *pool, int opts)
{
if (opts & OPT_SAVEOUT) {
+ if ((pool->ipo_flags & IPOOL_DELETE) != 0)
+ PRINTF("# ");
PRINTF("pool ");
} else if ((opts & OPT_DEBUG) == 0) {
if ((pool->ipo_flags & IPOOL_ANON) != 0)
diff --git a/sbin/rcorder/rcorder.c b/sbin/rcorder/rcorder.c
index 87b0e873c7ae..3d2a67c82a5a 100644
--- a/sbin/rcorder/rcorder.c
+++ b/sbin/rcorder/rcorder.c
@@ -980,9 +980,11 @@ do_file(filenode *fnode, strnodelist *stack_ptr)
fnode->last->next = fnode->next;
}
- if (fnode->issues_count)
- warnx("`%s' was seen in circular dependencies for %d times.",
- fnode->filename, fnode->issues_count);
+ if (fnode->issues_count) {
+ warnx("`%s' was seen in circular dependencies %d time%s.",
+ fnode->filename, fnode->issues_count,
+ fnode->issues_count > 1 ? "s" : "");
+ }
DPRINTF((stderr, "nuking %s\n", fnode->filename));
}
diff --git a/secure/lib/libpkgecc/Makefile b/secure/lib/libpkgecc/Makefile
index 476cd8635aeb..8d18e72e48f7 100644
--- a/secure/lib/libpkgecc/Makefile
+++ b/secure/lib/libpkgecc/Makefile
@@ -128,7 +128,6 @@ CONFLICTS= -Dsha256_init=_libecc_sha256_init \
-Dsha512_256_init=_libecc_sha512_256_init
CFLAGS= -I$(SRCTOP)/crypto/libecc/include \
- -ffreestanding \
-fno-builtin \
-DUSE_WARN_UNUSED_RET \
-DWITH_STDLIB \
diff --git a/share/man/man4/aacraid.4 b/share/man/man4/aacraid.4
index 3bf683ac40c8..0f64f36c493a 100644
--- a/share/man/man4/aacraid.4
+++ b/share/man/man4/aacraid.4
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2013 Achim Leubner
.\" All rights reserved.
.\"
@@ -21,12 +24,12 @@
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
-.Dd June 19, 2015
+.Dd September 29, 2025
.Dt AACRAID 4
.Os
.Sh NAME
.Nm aacraid
-.Nd Adaptec AACRAID Controller driver
+.Nd Adaptec Series 6/7/8 6G and 12G SAS+SATA RAID controller driver
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your
@@ -78,9 +81,10 @@ Linux-compatible
interface for the management device will be enabled and will allow
Linux-based management applications to control the card.
.Sh HARDWARE
-Controllers supported by the
+The
.Nm
-driver include:
+driver supports the following
+Adaptec 6G and 12G SAS/SATA RAID controllers:
.Pp
.Bl -bullet -compact
.It
diff --git a/share/man/man4/ice.4 b/share/man/man4/ice.4
index 3f7a9017756d..172b5a197b64 100644
--- a/share/man/man4/ice.4
+++ b/share/man/man4/ice.4
@@ -1,4 +1,4 @@
-.\"-
+.\"
.\" SPDX-License-Identifier: BSD-3-Clause
.\"
.\" Copyright (c) 2019-2020, Intel Corporation
@@ -37,20 +37,30 @@
.Os
.Sh NAME
.Nm ice
-.Nd "Intel\(rg Ethernet 800 Series Driver"
+.Nd Intel Ethernet 800 Series Driver
.Sh SYNOPSIS
-To compile this driver into the kernel, place the following lines in your
-kernel configuration file:
-.Bd -literal -offset indent
.Cd device iflib
.Cd device ice
-.Ed
.Pp
-To load the driver as a module at boot time, place the following lines in
+In
.Xr loader.conf 5 :
-.Bd -literal -offset indent
-if_ice_load="YES"
-.Ed
+.Cd if_ice_load
+.Cd hw.ice.enable_health_events
+.Cd hw.ice.irdma
+.Cd hw.ice.irdma_max_msix
+.Cd hw.ice.debug.enable_tx_fc_filter
+.Cd hw.ice.debug.enable_tx_lldp_filter
+.Cd hw.ice.debug.ice_tx_balance_en
+.Pp
+In
+.Xr sysctl.conf 5
+or
+.Xr loader.conf 5 :
+.Cd dev.ice.#.current_speed
+.Cd dev.ice.#.fw_version
+.Cd dev.ice.#.ddp_version
+.Cd dev.ice.#.pba_number
+.Cd dev.ice.#.hw.mac.*
.Sh DESCRIPTION
.Ss Features
The
diff --git a/share/man/man4/umass.4 b/share/man/man4/umass.4
index db4e6f0890f2..8c6b03a3afea 100644
--- a/share/man/man4/umass.4
+++ b/share/man/man4/umass.4
@@ -25,44 +25,44 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 2, 2025
+.Dd October 9, 2025
.Dt UMASS 4
.Os
.Sh NAME
.Nm umass
.Nd USB Mass Storage Devices driver
.Sh SYNOPSIS
-To compile this driver into the kernel,
-place the following line in your
-kernel configuration file:
-.Bd -ragged -offset indent
+.Cd "device da"
.Cd "device scbus"
+.Cd "device pass"
.Cd "device usb"
.Cd "device umass"
-.Ed
.Pp
-Alternatively, to load the driver as a
-module at boot time, place the following line in
+In
.Xr loader.conf 5 :
-.Bd -literal -offset indent
-umass_load="YES"
-.Ed
+.Cd umass_load
.Sh DESCRIPTION
The
.Nm
driver provides support for Mass Storage devices that attach to the USB
-port.
+interface.
.Pp
-To use the
-.Nm
-driver,
+If the appropriate hardware is detected,
+the driver will be loaded automatically by
+.Xr devmatch 8 .
+To load the driver manually at boot time, use the
+.Cm umass_load
+command at the
+.Xr loader 8
+prompt, or add it to
+.Xr loader.conf 5 .
+.Pp
+To use the driver in a custom kernel,
.Xr usb 4
-and one of
-.Xr uhci 4
-or
-.Xr ohci 4
-or
-.Xr ehci 4
+and at least one of
+.Xr uhci 4 ,
+.Xr ohci 4 ,
+.Xr ehci 4 ,
or
.Xr xhci 4
must be configured in the kernel.
@@ -88,16 +88,8 @@ USB hard disk drives
USB floppy drives
.El
.Sh EXAMPLES
-.Bd -literal -offset indent
-device umass
-device scbus
-device da
-device pass
-.Ed
-.Pp
-Add the
-.Nm
-driver to the kernel.
+Rescan all slots on a multi-slot flash reader,
+where the slots map to separate LUNs on a single SCSI ID:
.Bd -literal -offset indent
camcontrol rescan 0:0:0
camcontrol rescan 0:0:1
@@ -105,8 +97,6 @@ camcontrol rescan 0:0:2
camcontrol rescan 0:0:3
.Ed
.Pp
-Rescan all slots on a multi-slot flash reader, where the slots map to separate
-LUNs on a single SCSI ID.
Typically only the first slot will be enabled at boot time.
This assumes that
the flash reader is the first SCSI bus in the system and has 4 slots.
diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5
index bdd8a843d72a..5bf50c70d9e5 100644
--- a/share/man/man5/pf.conf.5
+++ b/share/man/man5/pf.conf.5
@@ -27,7 +27,7 @@
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd July 30, 2025
+.Dd October 7, 2025
.Dt PF.CONF 5
.Os
.Sh NAME
@@ -2357,7 +2357,7 @@ packets matching the same connection.
.It Ar route-to
The
.Ar route-to
-option routes the packet to the specified interface with an optional address
+option routes the packet to the specified interface with an address
for the next hop.
When a
.Ar route-to
@@ -3532,7 +3532,7 @@ hosts = "all" |
ipspec = "any" | host | "{" host-list "}"
host = [ "!" ] ( address [ "/" mask-bits ] | "<" string ">" )
redirhost = address [ "/" mask-bits ]
-routehost = "(" interface-name [ address [ "/" mask-bits ] ] ")"
+routehost = "(" interface-name address [ "/" mask-bits ] ")"
address = ( interface-name | interface-group |
"(" ( interface-name | interface-group ) ")" |
hostname | ipv4-dotted-quad | ipv6-coloned-hex )
diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5
index b8c72fc07083..edbfa937f8df 100644
--- a/share/man/man5/rc.conf.5
+++ b/share/man/man5/rc.conf.5
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd September 25, 2025
+.Dd October 5, 2025
.Dt RC.CONF 5
.Os
.Sh NAME
@@ -4563,20 +4563,16 @@ If set to
.Dq Li YES ,
delays the start of network-reliant services until
.Va netwait_if
-is up and ICMP packets to a destination defined in
+is up, duplicate address discovery (DAD) has completed, and ICMP
+packets to a destination defined in
.Va netwait_ip
are flowing.
-Link state is examined first, followed by
+Link state is examined first, followed by DAD, then
.Dq Li pinging
an IP address to verify network usability.
If no destination can be reached or timeouts are exceeded,
network services are started anyway with no guarantee that
the network is usable.
-Use of this variable requires both
-.Va netwait_ip
-and
-.Va netwait_if
-to be set.
.It Va netwait_ip
.Pq Vt str
Empty by default.
@@ -4612,6 +4608,21 @@ interface if desired.
Defines the total number of seconds to wait for link to become usable,
polled at a 1-second interval.
The default is 30.
+.It Va netwait_dad
+.Pq Vt str
+Set to
+.Dq Li NO
+by default.
+Set to
+.Dq Li YES
+to enable waiting for DAD to complete.
+.It Va netwait_dad_timeout
+.Pq Vt int
+Unset by default.
+Indicates the maximum number of seconds to wait for DAD to complete.
+If zero or unset, the timeout will be one more than the value of the
+.Va net.inet6.ip6.dad_count
+sysctl variable.
.It Va rctl_enable
.Pq Vt bool
If set to
diff --git a/share/mk/bsd.confs.mk b/share/mk/bsd.confs.mk
index 77b573c7e42c..e953e6d978dc 100644
--- a/share/mk/bsd.confs.mk
+++ b/share/mk/bsd.confs.mk
@@ -22,6 +22,14 @@ buildconfig: ${${group}}
all: buildconfig
. endif
+# Take groups from both CONFGROUPS and CONFGROUPS.yes, to allow syntax like
+# CONFGROUPS.${MK_FOO}=FOO. Sort and uniq the list of groups in case of
+# duplicates.
+.if defined(CONFGROUPS) || defined(CONFGROUPS.yes)
+CONFGROUPS:=${CONFGROUPS} ${CONFGROUPS.yes}
+CONFGROUPS:=${CONFGROUPS:O:u}
+.endif
+
. for group in ${CONFGROUPS}
. if defined(${group}) && !empty(${group})
diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk
index 6e1796f4397a..1fccb0c53ad0 100644
--- a/share/mk/src.libnames.mk
+++ b/share/mk/src.libnames.mk
@@ -29,6 +29,7 @@ _PRIVATELIBS= \
heimipcs \
kldelf \
ldns \
+ samplerate \
sqlite3 \
ssh \
ucl \
@@ -72,7 +73,6 @@ _INTERNALLIBS= \
pfctl \
pkgecc \
pmcstat \
- samplerate \
sl \
sm \
smdb \
diff --git a/stand/lua/cli.lua.8 b/stand/lua/cli.lua.8
index aee1d3d53579..e47ecd3d23db 100644
--- a/stand/lua/cli.lua.8
+++ b/stand/lua/cli.lua.8
@@ -52,10 +52,11 @@ For instance:
local cli = require("cli")
cli.foo = function(...)
- -- Expand args to command name and the rest of argv. These arguments
- -- are pushed directly to the stack by loader, then handed off to
- -- cli_execute. cli_execute then passes them on to the invoked
- -- function, where they appear as varargs that must be peeled apart into
+ -- Expand args to command name and the rest of argv.
+ -- These arguments are pushed directly to the stack by
+ -- loader, then handed off to cli_execute. cli_execute
+ -- then passes them on to the invoked function, where
+ -- they appear as varargs that must be peeled apart into
-- their respective components.
local _, argv = cli.arguments(...)
@@ -63,10 +64,11 @@ cli.foo = function(...)
for k, v in ipairs(argv) do
print("arg #" .. tostring(k) .. ": '" .. v .. "'")
end
- -- Perform a loader command directly. This will not get dispatched back
- -- to Lua, so it is acceptable to have a function of the exact same name
- -- in loader. Lua will have the first chance to handle any commands
- -- executed at the loader prompt.
+ -- Perform a loader command directly. This will not get
+ -- dispatched back to Lua, so it is acceptable to have a
+ -- function of the exact same name in loader. Lua will
+ -- have the first chance to handle any commands executed
+ -- at the loader prompt.
loader.perform("foo")
end
.Ed
diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h
index 500f35c48787..401a963e2ba9 100644
--- a/sys/arm64/include/armreg.h
+++ b/sys/arm64/include/armreg.h
@@ -2148,6 +2148,7 @@
#define OSLAR_EL1_CRn 1
#define OSLAR_EL1_CRm 0
#define OSLAR_EL1_op2 4
+#define OSLAR_OSLK (0x1ul << 0)
/* OSLSR_EL1 */
#define OSLSR_EL1_op0 2
@@ -2155,6 +2156,10 @@
#define OSLSR_EL1_CRn 1
#define OSLSR_EL1_CRm 1
#define OSLSR_EL1_op2 4
+#define OSLSR_OSLM_1 (0x1ul << 3)
+#define OSLSR_nTT (0x1ul << 2)
+#define OSLSR_OSLK (0x1ul << 1)
+#define OSLSR_OSLM_0 (0x1ul << 0)
/* PAR_EL1 - Physical Address Register */
#define PAR_F_SHIFT 0
diff --git a/sys/arm64/include/hypervisor.h b/sys/arm64/include/hypervisor.h
index e3a880afbe9c..6e96ce7f1a7d 100644
--- a/sys/arm64/include/hypervisor.h
+++ b/sys/arm64/include/hypervisor.h
@@ -190,6 +190,54 @@
#define ICC_SRE_EL2_SRE (1UL << 0)
#define ICC_SRE_EL2_EN (1UL << 3)
+/* MDCR_EL2 - Hyp Debug Control Register */
+#define MDCR_EL2_HPMN_MASK 0x1f
+#define MDCR_EL2_HPMN_SHIFT 0
+#define MDCR_EL2_TPMCR_SHIFT 5
+#define MDCR_EL2_TPMCR (0x1UL << MDCR_EL2_TPMCR_SHIFT)
+#define MDCR_EL2_TPM_SHIFT 6
+#define MDCR_EL2_TPM (0x1UL << MDCR_EL2_TPM_SHIFT)
+#define MDCR_EL2_HPME_SHIFT 7
+#define MDCR_EL2_HPME (0x1UL << MDCR_EL2_HPME_SHIFT)
+#define MDCR_EL2_TDE_SHIFT 8
+#define MDCR_EL2_TDE (0x1UL << MDCR_EL2_TDE_SHIFT)
+#define MDCR_EL2_TDA_SHIFT 9
+#define MDCR_EL2_TDA (0x1UL << MDCR_EL2_TDA_SHIFT)
+#define MDCR_EL2_TDOSA_SHIFT 10
+#define MDCR_EL2_TDOSA (0x1UL << MDCR_EL2_TDOSA_SHIFT)
+#define MDCR_EL2_TDRA_SHIFT 11
+#define MDCR_EL2_TDRA (0x1UL << MDCR_EL2_TDRA_SHIFT)
+#define MDCR_EL2_E2PB_SHIFT 12
+#define MDCR_EL2_E2PB_MASK (0x3UL << MDCR_EL2_E2PB_SHIFT)
+#define MDCR_EL2_TPMS_SHIFT 14
+#define MDCR_EL2_TPMS (0x1UL << MDCR_EL2_TPMS_SHIFT)
+#define MDCR_EL2_EnSPM_SHIFT 15
+#define MDCR_EL2_EnSPM (0x1UL << MDCR_EL2_EnSPM_SHIFT)
+#define MDCR_EL2_HPMD_SHIFT 17
+#define MDCR_EL2_HPMD (0x1UL << MDCR_EL2_HPMD_SHIFT)
+#define MDCR_EL2_TTRF_SHIFT 19
+#define MDCR_EL2_TTRF (0x1UL << MDCR_EL2_TTRF_SHIFT)
+#define MDCR_EL2_HCCD_SHIFT 23
+#define MDCR_EL2_HCCD (0x1UL << MDCR_EL2_HCCD_SHIFT)
+#define MDCR_EL2_E2TB_SHIFT 24
+#define MDCR_EL2_E2TB_MASK (0x3UL << MDCR_EL2_E2TB_SHIFT)
+#define MDCR_EL2_HLP_SHIFT 26
+#define MDCR_EL2_HLP (0x1UL << MDCR_EL2_HLP_SHIFT)
+#define MDCR_EL2_TDCC_SHIFT 27
+#define MDCR_EL2_TDCC (0x1UL << MDCR_EL2_TDCC_SHIFT)
+#define MDCR_EL2_MTPME_SHIFT 28
+#define MDCR_EL2_MTPME (0x1UL << MDCR_EL2_MTPME_SHIFT)
+#define MDCR_EL2_HPMFZO_SHIFT 29
+#define MDCR_EL2_HPMFZO (0x1UL << MDCR_EL2_HPMFZO_SHIFT)
+#define MDCR_EL2_PMSSE_SHIFT 30
+#define MDCR_EL2_PMSSE_MASK (0x3UL << MDCR_EL2_PMSSE_SHIFT)
+#define MDCR_EL2_HPMFZS_SHIFT 36
+#define MDCR_EL2_HPMFZS (0x1UL << MDCR_EL2_HPMFZS_SHIFT)
+#define MDCR_EL2_PMEE_SHIFT 40
+#define MDCR_EL2_PMEE_MASK (0x3UL << MDCR_EL2_PMEE_SHIFT)
+#define MDCR_EL2_EBWE_SHIFT 43
+#define MDCR_EL2_EBWE (0x1UL << MDCR_EL2_EBWE_SHIFT)
+
/* SCTLR_EL2 - System Control Register */
#define SCTLR_EL2_RES1 0x30c50830
#define SCTLR_EL2_M_SHIFT 0
@@ -299,52 +347,4 @@
/* Assumed to be 0 by locore.S */
#define VTTBR_HOST 0x0000000000000000
-/* MDCR_EL2 - Hyp Debug Control Register */
-#define MDCR_EL2_HPMN_MASK 0x1f
-#define MDCR_EL2_HPMN_SHIFT 0
-#define MDCR_EL2_TPMCR_SHIFT 5
-#define MDCR_EL2_TPMCR (0x1UL << MDCR_EL2_TPMCR_SHIFT)
-#define MDCR_EL2_TPM_SHIFT 6
-#define MDCR_EL2_TPM (0x1UL << MDCR_EL2_TPM_SHIFT)
-#define MDCR_EL2_HPME_SHIFT 7
-#define MDCR_EL2_HPME (0x1UL << MDCR_EL2_HPME_SHIFT)
-#define MDCR_EL2_TDE_SHIFT 8
-#define MDCR_EL2_TDE (0x1UL << MDCR_EL2_TDE_SHIFT)
-#define MDCR_EL2_TDA_SHIFT 9
-#define MDCR_EL2_TDA (0x1UL << MDCR_EL2_TDA_SHIFT)
-#define MDCR_EL2_TDOSA_SHIFT 10
-#define MDCR_EL2_TDOSA (0x1UL << MDCR_EL2_TDOSA_SHIFT)
-#define MDCR_EL2_TDRA_SHIFT 11
-#define MDCR_EL2_TDRA (0x1UL << MDCR_EL2_TDRA_SHIFT)
-#define MDCR_E2PB_SHIFT 12
-#define MDCR_E2PB_MASK (0x3UL << MDCR_E2PB_SHIFT)
-#define MDCR_TPMS_SHIFT 14
-#define MDCR_TPMS (0x1UL << MDCR_TPMS_SHIFT)
-#define MDCR_EnSPM_SHIFT 15
-#define MDCR_EnSPM (0x1UL << MDCR_EnSPM_SHIFT)
-#define MDCR_HPMD_SHIFT 17
-#define MDCR_HPMD (0x1UL << MDCR_HPMD_SHIFT)
-#define MDCR_TTRF_SHIFT 19
-#define MDCR_TTRF (0x1UL << MDCR_TTRF_SHIFT)
-#define MDCR_HCCD_SHIFT 23
-#define MDCR_HCCD (0x1UL << MDCR_HCCD_SHIFT)
-#define MDCR_E2TB_SHIFT 24
-#define MDCR_E2TB_MASK (0x3UL << MDCR_E2TB_SHIFT)
-#define MDCR_HLP_SHIFT 26
-#define MDCR_HLP (0x1UL << MDCR_HLP_SHIFT)
-#define MDCR_TDCC_SHIFT 27
-#define MDCR_TDCC (0x1UL << MDCR_TDCC_SHIFT)
-#define MDCR_MTPME_SHIFT 28
-#define MDCR_MTPME (0x1UL << MDCR_MTPME_SHIFT)
-#define MDCR_HPMFZO_SHIFT 29
-#define MDCR_HPMFZO (0x1UL << MDCR_HPMFZO_SHIFT)
-#define MDCR_PMSSE_SHIFT 30
-#define MDCR_PMSSE_MASK (0x3UL << MDCR_PMSSE_SHIFT)
-#define MDCR_HPMFZS_SHIFT 36
-#define MDCR_HPMFZS (0x1UL << MDCR_HPMFZS_SHIFT)
-#define MDCR_PMEE_SHIFT 40
-#define MDCR_PMEE_MASK (0x3UL << MDCR_PMEE_SHIFT)
-#define MDCR_EBWE_SHIFT 43
-#define MDCR_EBWE (0x1UL << MDCR_EBWE_SHIFT)
-
#endif /* !_MACHINE_HYPERVISOR_H_ */
diff --git a/sys/arm64/vmm/arm64.h b/sys/arm64/vmm/arm64.h
index 6a0c4c78e568..10261c6a6499 100644
--- a/sys/arm64/vmm/arm64.h
+++ b/sys/arm64/vmm/arm64.h
@@ -78,14 +78,16 @@ struct hypctx {
uint64_t pmcr_el0; /* Performance Monitors Control Register */
uint64_t pmccntr_el0;
uint64_t pmccfiltr_el0;
+ uint64_t pmuserenr_el0;
+ uint64_t pmselr_el0;
+ uint64_t pmxevcntr_el0;
uint64_t pmcntenset_el0;
uint64_t pmintenset_el1;
uint64_t pmovsset_el0;
- uint64_t pmselr_el0;
- uint64_t pmuserenr_el0;
uint64_t pmevcntr_el0[31];
uint64_t pmevtyper_el0[31];
+ uint64_t dbgclaimset_el1;
uint64_t dbgbcr_el1[16]; /* Debug Breakpoint Control Registers */
uint64_t dbgbvr_el1[16]; /* Debug Breakpoint Value Registers */
uint64_t dbgwcr_el1[16]; /* Debug Watchpoint Control Registers */
@@ -117,6 +119,7 @@ struct hypctx {
struct vgic_v3_regs vgic_v3_regs;
struct vgic_v3_cpu *vgic_cpu;
bool has_exception;
+ bool dbg_oslock;
};
struct hyp {
diff --git a/sys/arm64/vmm/vmm.c b/sys/arm64/vmm/vmm.c
index 1dcefa1489e9..a551a2807183 100644
--- a/sys/arm64/vmm/vmm.c
+++ b/sys/arm64/vmm/vmm.c
@@ -651,6 +651,33 @@ vmm_reg_wi(struct vcpu *vcpu, uint64_t wval, void *arg)
return (0);
}
+static int
+vmm_write_oslar_el1(struct vcpu *vcpu, uint64_t wval, void *arg)
+{
+ struct hypctx *hypctx;
+
+ hypctx = vcpu_get_cookie(vcpu);
+ /* All other fields are RES0 & we don't do anything with this */
+ /* TODO: Disable access to other debug state when locked */
+ hypctx->dbg_oslock = (wval & OSLAR_OSLK) == OSLAR_OSLK;
+ return (0);
+}
+
+static int
+vmm_read_oslsr_el1(struct vcpu *vcpu, uint64_t *rval, void *arg)
+{
+ struct hypctx *hypctx;
+ uint64_t val;
+
+ hypctx = vcpu_get_cookie(vcpu);
+ val = OSLSR_OSLM_1;
+ if (hypctx->dbg_oslock)
+ val |= OSLSR_OSLK;
+ *rval = val;
+
+ return (0);
+}
+
static const struct vmm_special_reg vmm_special_regs[] = {
#define SPECIAL_REG(_reg, _read, _write) \
{ \
@@ -707,6 +734,13 @@ static const struct vmm_special_reg vmm_special_regs[] = {
SPECIAL_REG(CNTP_TVAL_EL0, vtimer_phys_tval_read,
vtimer_phys_tval_write),
SPECIAL_REG(CNTPCT_EL0, vtimer_phys_cnt_read, vtimer_phys_cnt_write),
+
+ /* Debug registers */
+ SPECIAL_REG(DBGPRCR_EL1, vmm_reg_raz, vmm_reg_wi),
+ SPECIAL_REG(OSDLR_EL1, vmm_reg_raz, vmm_reg_wi),
+ /* TODO: Exceptions on invalid access */
+ SPECIAL_REG(OSLAR_EL1, vmm_reg_raz, vmm_write_oslar_el1),
+ SPECIAL_REG(OSLSR_EL1, vmm_read_oslsr_el1, vmm_reg_wi),
#undef SPECIAL_REG
};
diff --git a/sys/arm64/vmm/vmm_hyp.c b/sys/arm64/vmm/vmm_hyp.c
index d61885c15871..636247c48080 100644
--- a/sys/arm64/vmm/vmm_hyp.c
+++ b/sys/arm64/vmm/vmm_hyp.c
@@ -108,6 +108,8 @@ vmm_hyp_reg_store(struct hypctx *hypctx, struct hyp *hyp, bool guest)
}
}
+ hypctx->dbgclaimset_el1 = READ_SPECIALREG(dbgclaimset_el1);
+
dfr0 = READ_SPECIALREG(id_aa64dfr0_el1);
switch (ID_AA64DFR0_BRPs_VAL(dfr0) - 1) {
#define STORE_DBG_BRP(x) \
@@ -167,10 +169,13 @@ vmm_hyp_reg_store(struct hypctx *hypctx, struct hyp *hyp, bool guest)
hypctx->pmcr_el0 = READ_SPECIALREG(pmcr_el0);
hypctx->pmccntr_el0 = READ_SPECIALREG(pmccntr_el0);
hypctx->pmccfiltr_el0 = READ_SPECIALREG(pmccfiltr_el0);
+ hypctx->pmuserenr_el0 = READ_SPECIALREG(pmuserenr_el0);
+ hypctx->pmselr_el0 = READ_SPECIALREG(pmselr_el0);
+ hypctx->pmxevcntr_el0 = READ_SPECIALREG(pmxevcntr_el0);
hypctx->pmcntenset_el0 = READ_SPECIALREG(pmcntenset_el0);
hypctx->pmintenset_el1 = READ_SPECIALREG(pmintenset_el1);
hypctx->pmovsset_el0 = READ_SPECIALREG(pmovsset_el0);
- hypctx->pmuserenr_el0 = READ_SPECIALREG(pmuserenr_el0);
+
switch ((hypctx->pmcr_el0 & PMCR_N_MASK) >> PMCR_N_SHIFT) {
#define STORE_PMU(x) \
case (x + 1): \
@@ -333,12 +338,15 @@ vmm_hyp_reg_restore(struct hypctx *hypctx, struct hyp *hyp, bool guest)
WRITE_SPECIALREG(pmcr_el0, hypctx->pmcr_el0);
WRITE_SPECIALREG(pmccntr_el0, hypctx->pmccntr_el0);
WRITE_SPECIALREG(pmccfiltr_el0, hypctx->pmccfiltr_el0);
+ WRITE_SPECIALREG(pmuserenr_el0, hypctx->pmuserenr_el0);
+ WRITE_SPECIALREG(pmselr_el0, hypctx->pmselr_el0);
+ WRITE_SPECIALREG(pmxevcntr_el0, hypctx->pmxevcntr_el0);
/* Clear all events/interrupts then enable them */
- WRITE_SPECIALREG(pmcntenclr_el0, 0xfffffffful);
+ WRITE_SPECIALREG(pmcntenclr_el0, ~0ul);
WRITE_SPECIALREG(pmcntenset_el0, hypctx->pmcntenset_el0);
- WRITE_SPECIALREG(pmintenclr_el1, 0xfffffffful);
+ WRITE_SPECIALREG(pmintenclr_el1, ~0ul);
WRITE_SPECIALREG(pmintenset_el1, hypctx->pmintenset_el1);
- WRITE_SPECIALREG(pmovsclr_el0, 0xfffffffful);
+ WRITE_SPECIALREG(pmovsclr_el0, ~0ul);
WRITE_SPECIALREG(pmovsset_el0, hypctx->pmovsset_el0);
switch ((hypctx->pmcr_el0 & PMCR_N_MASK) >> PMCR_N_SHIFT) {
@@ -384,6 +392,9 @@ vmm_hyp_reg_restore(struct hypctx *hypctx, struct hyp *hyp, bool guest)
#undef LOAD_PMU
}
+ WRITE_SPECIALREG(dbgclaimclr_el1, ~0ul);
+ WRITE_SPECIALREG(dbgclaimclr_el1, hypctx->dbgclaimset_el1);
+
dfr0 = READ_SPECIALREG(id_aa64dfr0_el1);
switch (ID_AA64DFR0_BRPs_VAL(dfr0) - 1) {
#define LOAD_DBG_BRP(x) \
diff --git a/sys/arm64/vmm/vmm_reset.c b/sys/arm64/vmm/vmm_reset.c
index 79d022cf33e8..1240c3ed16ec 100644
--- a/sys/arm64/vmm/vmm_reset.c
+++ b/sys/arm64/vmm/vmm_reset.c
@@ -100,10 +100,12 @@ reset_vm_el01_regs(void *vcpu)
el2ctx->pmcr_el0 |= PMCR_LC;
set_arch_unknown(el2ctx->pmccntr_el0);
set_arch_unknown(el2ctx->pmccfiltr_el0);
+ set_arch_unknown(el2ctx->pmuserenr_el0);
+ set_arch_unknown(el2ctx->pmselr_el0);
+ set_arch_unknown(el2ctx->pmxevcntr_el0);
set_arch_unknown(el2ctx->pmcntenset_el0);
set_arch_unknown(el2ctx->pmintenset_el1);
set_arch_unknown(el2ctx->pmovsset_el0);
- set_arch_unknown(el2ctx->pmuserenr_el0);
memset(el2ctx->pmevcntr_el0, 0, sizeof(el2ctx->pmevcntr_el0));
memset(el2ctx->pmevtyper_el0, 0, sizeof(el2ctx->pmevtyper_el0));
}
@@ -143,7 +145,8 @@ reset_vm_el2_regs(void *vcpu)
/* Set the Extended Hypervisor Configuration Register */
el2ctx->hcrx_el2 = 0;
/* TODO: Trap all extensions we don't support */
- el2ctx->mdcr_el2 = 0;
+ el2ctx->mdcr_el2 = MDCR_EL2_TDOSA | MDCR_EL2_TDRA | MDCR_EL2_TPMS |
+ MDCR_EL2_TTRF;
/* PMCR_EL0.N is read from MDCR_EL2.HPMN */
el2ctx->mdcr_el2 |= (el2ctx->pmcr_el0 & PMCR_N_MASK) >> PMCR_N_SHIFT;
diff --git a/sys/contrib/openzfs/module/zfs/vdev_raidz.c b/sys/contrib/openzfs/module/zfs/vdev_raidz.c
index 80727b0d8f91..56b8e3b60b22 100644
--- a/sys/contrib/openzfs/module/zfs/vdev_raidz.c
+++ b/sys/contrib/openzfs/module/zfs/vdev_raidz.c
@@ -5495,7 +5495,7 @@ ZFS_MODULE_PARAM(zfs, zfs_, scrub_after_expand, INT, ZMOD_RW,
"completes");
ZFS_MODULE_PARAM(zfs_vdev, vdev_, read_sit_out_secs, ULONG, ZMOD_RW,
"Raidz/draid slow disk sit out time period in seconds");
-ZFS_MODULE_PARAM(zfs_vdev, vdev_, raidz_outlier_check_interval_ms, ULONG,
+ZFS_MODULE_PARAM(zfs_vdev, vdev_, raidz_outlier_check_interval_ms, U64,
ZMOD_RW, "Interval to check for slow raidz/draid children");
ZFS_MODULE_PARAM(zfs_vdev, vdev_, raidz_outlier_insensitivity, UINT,
ZMOD_RW, "How insensitive the slow raidz/draid child check should be");
diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c
index f29d803e99a8..9e7cfd4a9a33 100644
--- a/sys/dev/ahci/ahci_pci.c
+++ b/sys/dev/ahci/ahci_pci.c
@@ -466,28 +466,6 @@ ahci_ata_probe(device_t dev)
}
static int
-ahci_pci_read_msix_bars(device_t dev, uint8_t *table_bar, uint8_t *pba_bar)
-{
- int cap_offset = 0, ret;
- uint32_t val;
-
- if ((table_bar == NULL) || (pba_bar == NULL))
- return (EINVAL);
-
- ret = pci_find_cap(dev, PCIY_MSIX, &cap_offset);
- if (ret != 0)
- return (EINVAL);
-
- val = pci_read_config(dev, cap_offset + PCIR_MSIX_TABLE, 4);
- *table_bar = PCIR_BAR(val & PCIM_MSIX_BIR_MASK);
-
- val = pci_read_config(dev, cap_offset + PCIR_MSIX_PBA, 4);
- *pba_bar = PCIR_BAR(val & PCIM_MSIX_BIR_MASK);
-
- return (0);
-}
-
-static int
ahci_pci_attach(device_t dev)
{
struct ahci_controller *ctlr = device_get_softc(dev);
@@ -495,7 +473,6 @@ ahci_pci_attach(device_t dev)
uint32_t devid = pci_get_devid(dev);
uint8_t revid = pci_get_revid(dev);
int msi_count, msix_count;
- uint8_t table_bar = 0, pba_bar = 0;
uint32_t caps, pi;
msi_count = pci_msi_count(dev);
@@ -583,20 +560,11 @@ ahci_pci_attach(device_t dev)
if (ctlr->quirks & AHCI_Q_NOMSIX)
msix_count = 0;
- /* Read MSI-x BAR IDs if supported */
- if (msix_count > 0) {
- error = ahci_pci_read_msix_bars(dev, &table_bar, &pba_bar);
- if (error == 0) {
- ctlr->r_msix_tab_rid = table_bar;
- ctlr->r_msix_pba_rid = pba_bar;
- } else {
- /* Failed to read BARs, disable MSI-x */
- msix_count = 0;
- }
- }
-
/* Allocate resources for MSI-x table and PBA */
if (msix_count > 0) {
+ ctlr->r_msix_tab_rid = pci_msix_table_bar(dev);
+ ctlr->r_msix_pba_rid = pci_msix_pba_bar(dev);
+
/*
* Allocate new MSI-x table only if not
* allocated before.
@@ -607,8 +575,8 @@ ahci_pci_attach(device_t dev)
ctlr->r_msix_table = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
&ctlr->r_msix_tab_rid, RF_ACTIVE);
if (ctlr->r_msix_table == NULL) {
- ahci_free_mem(dev);
- return (ENXIO);
+ msix_count = 0;
+ goto no_msix;
}
}
@@ -623,12 +591,12 @@ ahci_pci_attach(device_t dev)
ctlr->r_msix_pba = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
&ctlr->r_msix_pba_rid, RF_ACTIVE);
if (ctlr->r_msix_pba == NULL) {
- ahci_free_mem(dev);
- return (ENXIO);
+ msix_count = 0;
}
}
}
+no_msix:
pci_enable_busmaster(dev);
/* Reset controller */
if ((error = ahci_pci_ctlr_reset(dev)) != 0) {
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h
index 52f9e12f8f9a..52e9fcbbebcd 100644
--- a/sys/dev/nvme/nvme_private.h
+++ b/sys/dev/nvme/nvme_private.h
@@ -463,13 +463,13 @@ static __inline void
nvme_completion_poll(struct nvme_completion_poll_status *status)
{
int timeout = ticks + 10 * hz;
- sbintime_t delta_t = SBT_1US;
+ sbintime_t delta = SBT_1US;
while (!atomic_load_acq_int(&status->done)) {
if (timeout - ticks < 0)
panic("NVME polled command failed to complete within 10s.");
- pause_sbt("nvme", delta_t, 0, C_PREL(1));
- delta_t = min(SBT_1MS, delta_t * 3 / 2);
+ pause_sbt("nvme", delta, 0, C_PREL(1));
+ delta = min(SBT_1MS, delta + delta / 2);
}
}
diff --git a/sys/libkern/arm64/crc32c_armv8.S b/sys/libkern/arm64/crc32c_armv8.S
index 649afff4b711..430b24f7615a 100644
--- a/sys/libkern/arm64/crc32c_armv8.S
+++ b/sys/libkern/arm64/crc32c_armv8.S
@@ -39,14 +39,14 @@ ENTRY(armv8_crc32c)
cbz w2, end
tbz x1, #0x0, half_word_aligned
sub w2, w2, 0x1
- ldr w10, [x1], #0x1
+ ldrb w10, [x1], #0x1
crc32cb w0, w0, w10
half_word_aligned:
cmp w2, #0x2
b.lo last_byte
tbz x1, #0x1, word_aligned
sub w2, w2, 0x2
- ldr w10, [x1], #0x2
+ ldrh w10, [x1], #0x2
crc32ch w0, w0, w10
word_aligned:
cmp w2, #0x4
@@ -69,11 +69,11 @@ last_word:
crc32cw w0, w0, w10
last_half_word:
tbz w2, #0x1, last_byte
- ldr w10, [x1], #0x2
+ ldrh w10, [x1], #0x2
crc32ch w0, w0, w10
last_byte:
tbz w2, #0x0, end
- ldr w10, [x1], #0x1
+ ldrb w10, [x1], #0x1
crc32cb w0, w0, w10
end:
ret
diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c
index 64efa4bf060f..9b5baf115855 100644
--- a/sys/netinet/tcp_lro.c
+++ b/sys/netinet/tcp_lro.c
@@ -1475,10 +1475,11 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc, struct mbuf *mb)
}
/* create sequence number */
- lc->lro_mbuf_data[lc->lro_mbuf_count].seq =
- (((uint64_t)M_HASHTYPE_GET(mb)) << 56) |
- (((uint64_t)mb->m_pkthdr.flowid) << 24) |
- ((uint64_t)lc->lro_mbuf_count);
+ lc->lro_mbuf_data[lc->lro_mbuf_count].seq = lc->lro_mbuf_count;
+ if (M_HASHTYPE_ISHASH(mb))
+ lc->lro_mbuf_data[lc->lro_mbuf_count].seq |=
+ (((uint64_t)M_HASHTYPE_GET(mb)) << 56) |
+ (((uint64_t)mb->m_pkthdr.flowid) << 24);
/* enter mbuf */
lc->lro_mbuf_data[lc->lro_mbuf_count].mb = mb;
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index def6bc886617..f842a5678fa1 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -1272,7 +1272,7 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th,
syncache_send_challenge_ack(sc, m);
SCH_UNLOCK(sch);
free(s, M_TCPLOG);
- return (-1); /* Do not send RST */;
+ return (-1); /* Do not send RST */
}
/*
@@ -1285,7 +1285,8 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th,
"segment rejected\n",
s, __func__, th->th_ack, sc->sc_iss + 1);
SCH_UNLOCK(sch);
- goto failed;
+ free(s, M_TCPLOG);
+ return (0); /* Do send RST, do not free sc. */
}
TAILQ_REMOVE(&sch->sch_bucket, sc, sc_hash);
diff --git a/sys/x86/include/mca.h b/sys/x86/include/mca.h
index 183480625f6d..553b5d765f17 100644
--- a/sys/x86/include/mca.h
+++ b/sys/x86/include/mca.h
@@ -44,6 +44,31 @@ struct mca_record {
int mr_cpu;
};
+enum mca_stat_types {
+ MCA_T_NONE = 0,
+ MCA_T_UNCLASSIFIED,
+ MCA_T_UCODE_ROM_PARITY,
+ MCA_T_EXTERNAL,
+ MCA_T_FRC,
+ MCA_T_INTERNAL_PARITY,
+ MCA_T_SMM_HANDLER,
+ MCA_T_INTERNAL_TIMER,
+ MCA_T_GENERIC_IO,
+ MCA_T_INTERNAL,
+ MCA_T_MEMORY,
+ MCA_T_TLB,
+ MCA_T_MEMCONTROLLER_GEN,
+ MCA_T_MEMCONTROLLER_RD,
+ MCA_T_MEMCONTROLLER_WR,
+ MCA_T_MEMCONTROLLER_AC,
+ MCA_T_MEMCONTROLLER_MS,
+ MCA_T_MEMCONTROLLER_OTHER,
+ MCA_T_CACHE,
+ MCA_T_BUS,
+ MCA_T_UNKNOWN,
+ MCA_T_COUNT /* Must stay last */
+};
+
#ifdef _KERNEL
void cmc_intr(void);
diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c
index 4ba49469d3a2..e43c88b3a27b 100644
--- a/sys/x86/x86/mca.c
+++ b/sys/x86/x86/mca.c
@@ -131,8 +131,16 @@ static STAILQ_HEAD(, mca_internal) mca_pending;
static int mca_ticks = 300;
static struct taskqueue *mca_tq;
static struct task mca_resize_task;
+static struct task mca_postscan_task;
static struct timeout_task mca_scan_task;
static struct mtx mca_lock;
+static bool mca_startup_done = false;
+
+/* Statistics on number of MCA events by type, updated atomically. */
+static uint64_t mca_stats[MCA_T_COUNT];
+SYSCTL_OPAQUE(_hw_mca, OID_AUTO, stats, CTLFLAG_RD | CTLFLAG_SKIP,
+ mca_stats, MCA_T_COUNT * sizeof(mca_stats[0]),
+ "S", "Array of MCA events by type");
static unsigned int
mca_ia32_ctl_reg(int bank)
@@ -356,21 +364,27 @@ mca_error_request(uint16_t mca_error)
}
static const char *
-mca_error_mmtype(uint16_t mca_error)
+mca_error_mmtype(uint16_t mca_error, enum mca_stat_types *event_type)
{
switch ((mca_error & 0x70) >> 4) {
case 0x0:
+ *event_type = MCA_T_MEMCONTROLLER_GEN;
return ("GEN");
case 0x1:
+ *event_type = MCA_T_MEMCONTROLLER_RD;
return ("RD");
case 0x2:
+ *event_type = MCA_T_MEMCONTROLLER_WR;
return ("WR");
case 0x3:
+ *event_type = MCA_T_MEMCONTROLLER_AC;
return ("AC");
case 0x4:
+ *event_type = MCA_T_MEMCONTROLLER_MS;
return ("MS");
}
+ *event_type = MCA_T_MEMCONTROLLER_OTHER;
return ("???");
}
@@ -426,6 +440,7 @@ static void
mca_log(const struct mca_record *rec)
{
uint16_t mca_error;
+ enum mca_stat_types event_type;
if (mca_mute(rec))
return;
@@ -473,34 +488,44 @@ mca_log(const struct mca_record *rec)
if (rec->mr_status & MC_STATUS_OVER)
printf("OVER ");
mca_error = rec->mr_status & MC_STATUS_MCA_ERROR;
+ event_type = MCA_T_COUNT;
switch (mca_error) {
/* Simple error codes. */
case 0x0000:
printf("no error");
+ event_type = MCA_T_NONE;
break;
case 0x0001:
printf("unclassified error");
+ event_type = MCA_T_UNCLASSIFIED;
break;
case 0x0002:
printf("ucode ROM parity error");
+ event_type = MCA_T_UCODE_ROM_PARITY;
break;
case 0x0003:
printf("external error");
+ event_type = MCA_T_EXTERNAL;
break;
case 0x0004:
printf("FRC error");
+ event_type = MCA_T_FRC;
break;
case 0x0005:
printf("internal parity error");
+ event_type = MCA_T_INTERNAL_PARITY;
break;
case 0x0006:
printf("SMM handler code access violation");
+ event_type = MCA_T_SMM_HANDLER;
break;
case 0x0400:
printf("internal timer error");
+ event_type = MCA_T_INTERNAL_TIMER;
break;
case 0x0e0b:
printf("generic I/O error");
+ event_type = MCA_T_GENERIC_IO;
if (rec->mr_cpu_vendor_id == CPU_VENDOR_INTEL &&
(rec->mr_status & MC_STATUS_MISCV)) {
printf(" (pci%d:%d:%d:%d)",
@@ -513,6 +538,7 @@ mca_log(const struct mca_record *rec)
default:
if ((mca_error & 0xfc00) == 0x0400) {
printf("internal error %x", mca_error & 0x03ff);
+ event_type = MCA_T_INTERNAL;
break;
}
@@ -521,6 +547,7 @@ mca_log(const struct mca_record *rec)
/* Memory hierarchy error. */
if ((mca_error & 0xeffc) == 0x000c) {
printf("%s memory error", mca_error_level(mca_error));
+ event_type = MCA_T_MEMORY;
break;
}
@@ -528,12 +555,14 @@ mca_log(const struct mca_record *rec)
if ((mca_error & 0xeff0) == 0x0010) {
printf("%sTLB %s error", mca_error_ttype(mca_error),
mca_error_level(mca_error));
+ event_type = MCA_T_TLB;
break;
}
/* Memory controller error. */
if ((mca_error & 0xef80) == 0x0080) {
- printf("%s channel ", mca_error_mmtype(mca_error));
+ printf("%s channel ", mca_error_mmtype(mca_error,
+ &event_type));
if ((mca_error & 0x000f) != 0x000f)
printf("%d", mca_error & 0x000f);
else
@@ -548,12 +577,14 @@ mca_log(const struct mca_record *rec)
mca_error_ttype(mca_error),
mca_error_level(mca_error),
mca_error_request(mca_error));
+ event_type = MCA_T_CACHE;
break;
}
/* Extended memory error. */
if ((mca_error & 0xef80) == 0x0280) {
- printf("%s channel ", mca_error_mmtype(mca_error));
+ printf("%s channel ", mca_error_mmtype(mca_error,
+ &event_type));
if ((mca_error & 0x000f) != 0x000f)
printf("%d", mca_error & 0x000f);
else
@@ -565,6 +596,7 @@ mca_log(const struct mca_record *rec)
/* Bus and/or Interconnect error. */
if ((mca_error & 0xe800) == 0x0800) {
printf("BUS%s ", mca_error_level(mca_error));
+ event_type = MCA_T_BUS;
switch ((mca_error & 0x0600) >> 9) {
case 0:
printf("Source");
@@ -600,6 +632,7 @@ mca_log(const struct mca_record *rec)
}
printf("unknown error %x", mca_error);
+ event_type = MCA_T_UNKNOWN;
break;
}
printf("\n");
@@ -615,6 +648,12 @@ mca_log(const struct mca_record *rec)
}
if (rec->mr_status & MC_STATUS_MISCV)
printf("MCA: Misc 0x%llx\n", (long long)rec->mr_misc);
+ if (event_type < 0 || event_type >= MCA_T_COUNT) {
+ KASSERT(0, ("%s: invalid event type (%d)", __func__,
+ event_type));
+ event_type = MCA_T_UNKNOWN;
+ }
+ atomic_add_64(&mca_stats[event_type], 1);
}
static bool
@@ -979,6 +1018,16 @@ mca_process_records(enum scan_mode mode)
{
struct mca_internal *mca;
+ /*
+ * If in an interrupt context, defer the post-scan activities to a
+ * task queue.
+ */
+ if (mode != POLLED) {
+ if (mca_startup_done)
+ taskqueue_enqueue(mca_tq, &mca_postscan_task);
+ return;
+ }
+
mtx_lock_spin(&mca_lock);
while ((mca = STAILQ_FIRST(&mca_pending)) != NULL) {
STAILQ_REMOVE_HEAD(&mca_pending, link);
@@ -986,10 +1035,19 @@ mca_process_records(enum scan_mode mode)
mca_store_record(mca);
}
mtx_unlock_spin(&mca_lock);
- if (mode == POLLED)
- mca_resize_freelist();
- else if (!cold)
- taskqueue_enqueue(mca_tq, &mca_resize_task);
+ mca_resize_freelist();
+}
+
+/*
+ * Emit log entries and resize the free list. This is intended to be called
+ * from a task queue to handle work which does not need to be done (or cannot
+ * be done) in an interrupt context.
+ */
+static void
+mca_postscan(void *context __unused, int pending __unused)
+{
+
+ mca_process_records(POLLED);
}
/*
@@ -1060,7 +1118,7 @@ sysctl_mca_maxcount(SYSCTL_HANDLER_ARGS)
doresize = true;
}
mtx_unlock_spin(&mca_lock);
- if (doresize && !cold)
+ if (doresize && mca_startup_done)
taskqueue_enqueue(mca_tq, &mca_resize_task);
return (error);
}
@@ -1072,12 +1130,16 @@ mca_startup(void *dummy)
if (mca_banks <= 0)
return;
- /* CMCIs during boot may have claimed items from the freelist. */
- mca_resize_freelist();
-
taskqueue_start_threads(&mca_tq, 1, PI_SWI(SWI_TQ), "mca taskq");
taskqueue_enqueue_timeout_sbt(mca_tq, &mca_scan_task,
mca_ticks * SBT_1S, 0, C_PREL(1));
+ mca_startup_done = true;
+
+ /*
+ * CMCIs during boot may have recorded entries. Conduct the post-scan
+ * activities now.
+ */
+ mca_postscan(NULL, 0);
}
SYSINIT(mca_startup, SI_SUB_KICK_SCHEDULER, SI_ORDER_ANY, mca_startup, NULL);
@@ -1137,6 +1199,7 @@ mca_setup(uint64_t mcg_cap)
TIMEOUT_TASK_INIT(mca_tq, &mca_scan_task, 0, mca_scan_cpus, NULL);
STAILQ_INIT(&mca_freelist);
TASK_INIT(&mca_resize_task, 0, mca_resize, NULL);
+ TASK_INIT(&mca_postscan_task, 0, mca_postscan, NULL);
mca_resize_freelist();
SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO,
"count", CTLFLAG_RD, (int *)(uintptr_t)&mca_count, 0,
@@ -1540,6 +1603,9 @@ mca_intr(void)
panic("Unrecoverable machine check exception");
}
+ if (count)
+ mca_process_records(MCE);
+
/* Clear MCIP. */
wrmsr(MSR_MCG_STATUS, mcg_status & ~MCG_STATUS_MCIP);
}
diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh
index 20baadfea5c5..d4de71271985 100644
--- a/tests/sys/fs/tarfs/tarfs_test.sh
+++ b/tests/sys/fs/tarfs/tarfs_test.sh
@@ -67,9 +67,9 @@ tarfs_basic_body() {
mktar "${tarball}"
atf_check mount -rt tarfs "${tarball}" "${mnt}"
atf_check -o match:"^${tarball} on ${mnt} \(tarfs," mount
- atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -f%d,%i "${mnt}"/hard_link)"
- atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -L -f%d,%i "${mnt}"/short_link)"
- atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -L -f%d,%i "${mnt}"/long_link)"
+ atf_check test "${mnt}"/sparse_file -ef "${mnt}"/hard_link
+ atf_check test "${mnt}"/sparse_file -ef "${mnt}"/short_link
+ atf_check test "${mnt}"/sparse_file -ef "${mnt}"/long_link
atf_check -o inline:"${sum}\n" sha256 -q "${mnt}"/sparse_file
atf_check -o inline:"2,40755\n" stat -f%l,%p "${mnt}"/directory
atf_check -o inline:"1,100644\n" stat -f%l,%p "${mnt}"/file
diff --git a/usr.bin/sockstat/main.c b/usr.bin/sockstat/main.c
index 2e75e4966d80..3b989c4283e4 100644
--- a/usr.bin/sockstat/main.c
+++ b/usr.bin/sockstat/main.c
@@ -51,6 +51,7 @@
#include <netinet/tcp_fsm.h>
#include <netinet/tcp_seq.h>
#include <netinet/tcp_var.h>
+#include <netinet/tcp_log_buf.h>
#include <arpa/inet.h>
#include <capsicum_helpers.h>
@@ -84,6 +85,7 @@
static bool opt_4; /* Show IPv4 sockets */
static bool opt_6; /* Show IPv6 sockets */
static bool opt_A; /* Show kernel address of pcb */
+static bool opt_b; /* Show BBLog state */
static bool opt_C; /* Show congestion control */
static bool opt_c; /* Show connected sockets */
static bool opt_f; /* Show FIB numbers */
@@ -141,6 +143,7 @@ struct sock {
int proto;
int state;
int fibnum;
+ int bblog_state;
const char *protoname;
char stack[TCP_FUNCTION_NAME_LEN_MAX];
char cc[TCP_CA_NAME_MAX];
@@ -738,6 +741,7 @@ gather_inet(int proto)
sock->vflag = xip->inp_vflag;
if (proto == IPPROTO_TCP) {
sock->state = xtp->t_state;
+ sock->bblog_state = xtp->t_logstate;
memcpy(sock->stack, xtp->xt_stack,
TCP_FUNCTION_NAME_LEN_MAX);
memcpy(sock->cc, xtp->xt_cc, TCP_CA_NAME_MAX);
@@ -1056,6 +1060,37 @@ sctp_path_state(int state)
}
}
+static const char *
+bblog_state(int state)
+{
+ switch (state) {
+ case TCP_LOG_STATE_OFF:
+ return "OFF";
+ break;
+ case TCP_LOG_STATE_TAIL:
+ return "TAIL";
+ break;
+ case TCP_LOG_STATE_HEAD:
+ return "HEAD";
+ break;
+ case TCP_LOG_STATE_HEAD_AUTO:
+ return "HEAD_AUTO";
+ break;
+ case TCP_LOG_STATE_CONTINUAL:
+ return "CONTINUAL";
+ break;
+ case TCP_LOG_STATE_TAIL_AUTO:
+ return "TAIL_AUTO";
+ break;
+ case TCP_LOG_VIA_BBPOINTS:
+ return "BBPOINTS";
+ break;
+ default:
+ return "UNKNOWN";
+ break;
+ }
+}
+
static int
format_unix_faddr(struct addr *faddr, char *buf, size_t bufsize) {
#define SAFEBUF (buf == NULL ? NULL : buf + pos)
@@ -1143,6 +1178,7 @@ struct col_widths {
int encaps;
int path_state;
int conn_state;
+ int bblog_state;
int stack;
int cc;
};
@@ -1485,6 +1521,15 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize)
xo_emit(" {:conn-state/%-*s}",
cw->conn_state, "??");
}
+ if (opt_b) {
+ if (s->proto == IPPROTO_TCP)
+ xo_emit(" {:bblog-state/%-*s}",
+ cw->bblog_state,
+ bblog_state(s->bblog_state));
+ else if (!is_xo_style_encoding)
+ xo_emit(" {:bblog-state/%-*s}",
+ cw->bblog_state, "??");
+ }
if (opt_S) {
if (s->proto == IPPROTO_TCP)
xo_emit(" {:stack/%-*s}",
@@ -1544,6 +1589,7 @@ display(void)
.encaps = strlen("ENCAPS"),
.path_state = strlen("PATH STATE"),
.conn_state = strlen("CONN STATE"),
+ .bblog_state = strlen("BBLOG STATE"),
.stack = strlen("STACK"),
.cc = strlen("CC"),
};
@@ -1576,6 +1622,8 @@ display(void)
xo_emit(" {T:/%-*s}", cw.path_state, "PATH STATE");
xo_emit(" {T:/%-*s}", cw.conn_state, "CONN STATE");
}
+ if (opt_b)
+ xo_emit(" {T:/%-*s}", cw.bblog_state, "BBLOG STATE");
if (opt_S)
xo_emit(" {T:/%-*s}", cw.stack, "STACK");
if (opt_C)
@@ -1706,7 +1754,7 @@ static void
usage(void)
{
xo_error(
-"usage: sockstat [--libxo ...] [-46ACcfIiLlnqSsUuvw] [-j jid] [-p ports]\n"
+"usage: sockstat [--libxo ...] [-46AbCcfIiLlnqSsUuvw] [-j jid] [-p ports]\n"
" [-P protocols]\n");
exit(1);
}
@@ -1728,7 +1776,7 @@ main(int argc, char *argv[])
xo_get_style(NULL) != XO_STYLE_HTML)
is_xo_style_encoding = true;
opt_j = -1;
- while ((o = getopt(argc, argv, "46ACcfIij:Llnp:P:qSsUuvw")) != -1)
+ while ((o = getopt(argc, argv, "46AbCcfIij:Llnp:P:qSsUuvw")) != -1)
switch (o) {
case '4':
opt_4 = true;
@@ -1739,6 +1787,9 @@ main(int argc, char *argv[])
case 'A':
opt_A = true;
break;
+ case 'b':
+ opt_b = true;
+ break;
case 'C':
opt_C = true;
break;
diff --git a/usr.bin/sockstat/sockstat.1 b/usr.bin/sockstat/sockstat.1
index 091911cd0879..dabb3042bfd4 100644
--- a/usr.bin/sockstat/sockstat.1
+++ b/usr.bin/sockstat/sockstat.1
@@ -25,7 +25,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd July 17, 2025
+.Dd October 7, 2025
.Dt SOCKSTAT 1
.Os
.Sh NAME
@@ -34,7 +34,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl -libxo
-.Op Fl 46ACcfIiLlnqSsUuvw
+.Op Fl 46AbCcfIiLlnqSsUuvw
.Op Fl j Ar jail
.Op Fl p Ar ports
.Op Fl P Ar protocols
@@ -65,6 +65,9 @@ Show
.It Fl A
Show the address of a protocol control block (PCB) associated with a socket;
used for debugging.
+.It Fl b
+Show the BBLog state of the socket.
+This is currently only implemented for TCP.
.It Fl C
Display the congestion control module, if applicable.
This is currently only implemented for TCP.
@@ -206,6 +209,10 @@ is specified (only for SCTP).
The connection state if
.Fl s
is specified (only for SCTP or TCP).
+.It Li BBLOG STATE
+The BBLog state if
+.Fl b
+is specified (only for TCP).
.It Li STACK
The protocol stack if
.Fl S
diff --git a/usr.bin/sockstat/tests/Makefile b/usr.bin/sockstat/tests/Makefile
index 9971bca2d474..5412e9d842aa 100644
--- a/usr.bin/sockstat/tests/Makefile
+++ b/usr.bin/sockstat/tests/Makefile
@@ -1,5 +1,6 @@
ATF_TESTS_C+= sockstat_test
-SRCS.sockstat_test= sockstat_test.c ../sockstat.c
+SRCS.sockstat_test= sockstat_test.c sockstat.c
+.PATH: ${.CURDIR:H}
LIBADD= xo
diff --git a/usr.bin/tail/tests/tail_test.sh b/usr.bin/tail/tests/tail_test.sh
index 74d6908f7568..82c74a0d4da4 100755
--- a/usr.bin/tail/tests/tail_test.sh
+++ b/usr.bin/tail/tests/tail_test.sh
@@ -341,6 +341,7 @@ follow_create_body()
rm -f infile
tail -F infile > outfile &
pid=$!
+ sleep 0.1
seq 1 5 >infile
sleep 2
atf_check cmp infile outfile
@@ -360,6 +361,7 @@ follow_rename_body()
seq 1 3 > infile
tail -F infile > outfile &
pid=$!
+ sleep 0.1
seq 4 5 > infile_new
atf_check mv infile infile_old
atf_check mv infile_new infile
diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8
index 527250d380d1..ee141e1d4296 100644
--- a/usr.sbin/bsdinstall/bsdinstall.8
+++ b/usr.sbin/bsdinstall/bsdinstall.8
@@ -1,4 +1,6 @@
-.\"-
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2011-2013 Nathan Whitehorn <nwhitehorn@FreeBSD.org> All rights reserved.
.\" Copyright (c) 2018 Roberto Fernandez Cueto <roberfern@gmail.com>
.\" Copyright (c) 2024 The FreeBSD Foundation
@@ -27,7 +29,7 @@
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd November 4, 2024
+.Dd October 3, 2025
.Dt BSDINSTALL 8
.Os
.Sh NAME
@@ -40,9 +42,10 @@
.Op Ar ...
.Sh DESCRIPTION
.Nm
-is used for installation of new systems, both for system setup from
-installation media, e.g., CD-ROMs, and for use on live systems to prepare
-VM images and jails.
+is used for installation of new systems,
+both for system setup from installation media,
+such as discs, USBs, or network boot environments,
+and for use on live systems to prepare jails and virtual machine images.
.Pp
Much like
.Xr make 1 , Nm
@@ -56,7 +59,7 @@ these subtargets can be invoked separately by an installation script.
.Sh OPTIONS
.Nm
supports the following options, global to all targets:
-.Bl -tag -width indent+
+.Bl -tag -width "-D file"
.It Fl D Ar file
Provide a path for the installation log file
.Pq overrides Ev BSDINSTALL_LOG .
@@ -73,7 +76,7 @@ For interactive use, most users will be interested only in the
and
.Cm script
targets.
-.Bl -tag -width "jail destination"
+.Bl -tag -width "-D file"
.It Cm auto
Run the standard interactive installation, including disk partitioning.
.It Cm jail Ar destination
@@ -244,7 +247,7 @@ Extracts the distributions listed in
.Ev DISTRIBUTIONS
into
.Ev BSDINSTALL_CHROOT .
-.It Cm pkgbase Op Fl --jail
+.It Cm pkgbase Op Fl -jail
Fetch and install base system packages to
.Ev BSDINSTALL_CHROOT .
Packages are fetched according to repository configuration in
@@ -253,7 +256,7 @@ if set, or
.Lk pkg.freebsd.org
otherwise.
If the
-.Fl --jail
+.Fl -jail
option is passed, no kernel is installed, and the
.Dq jail
variant of each package set will be selected where applicable.
@@ -295,7 +298,7 @@ Many are used internally during installation and have reasonable default values
for most installation scenarios.
Others are set by various interactive user prompts, and can be usefully
overridden when making scripted or customized installers.
-.Bl -tag -width "BSDINSTALL_DISTSITE"
+.Bl -tag -width "-D file"
.It Ev TMPDIR
The directory to use for temporary files.
Default:
diff --git a/usr.sbin/iovctl/iovctl.8 b/usr.sbin/iovctl/iovctl.8
index 5c7b01c249a0..2574503e5ae7 100644
--- a/usr.sbin/iovctl/iovctl.8
+++ b/usr.sbin/iovctl/iovctl.8
@@ -95,7 +95,7 @@ and
options, this file will only be used to specify the name of the PF device.
.Pp
See
-.Xr iovctl.conf
+.Xr iovctl.conf 5
for a description of the config file format and documentation of the
configuration parameters that apply to all PF drivers.
See the PF driver manual page for configuration parameters specific to
diff --git a/usr.sbin/nfsuserd/nfsuserd.c b/usr.sbin/nfsuserd/nfsuserd.c
index 29d816934600..058253beaf95 100644
--- a/usr.sbin/nfsuserd/nfsuserd.c
+++ b/usr.sbin/nfsuserd/nfsuserd.c
@@ -421,8 +421,12 @@ main(int argc, char *argv[])
/* Get the group list for this user. */
ngroup = NGROUPS;
if (getgrouplist(pwd->pw_name, pwd->pw_gid, grps,
- &ngroup) < 0)
- syslog(LOG_ERR, "Group list too small");
+ &ngroup) < 0) {
+ syslog(LOG_ERR,
+ "Group list of user '%s' too big",
+ pwd->pw_name);
+ ngroup = NGROUPS;
+ }
nid.nid_ngroup = ngroup;
nid.nid_grps = grps;
} else {
@@ -621,8 +625,12 @@ nfsuserdsrv(struct svc_req *rqstp, SVCXPRT *transp)
/* Get the group list for this user. */
ngroup = NGROUPS;
if (getgrouplist(pwd->pw_name, pwd->pw_gid,
- grps, &ngroup) < 0)
- syslog(LOG_ERR, "Group list too small");
+ grps, &ngroup) < 0) {
+ syslog(LOG_ERR,
+ "Group list of user '%s' too big",
+ pwd->pw_name);
+ ngroup = NGROUPS;
+ }
nid.nid_ngroup = ngroup;
nid.nid_grps = grps;
} else {