Commit Graph

303661 Commits

Author SHA1 Message Date
Warner Losh 106951f09f Makefile.inc1: Add back missing if
The .if defined(_MKSHOWCONFIG) covered an unusually large area, so it
should have not been removed in the last commit. I must have tested in
the wrong tree before pushing...

FixeS: 28b858f505
Sponsored by:		Netflix
2025-10-05 09:11:29 -06:00
Warner Losh 28b858f505 Makefile.inc1: Remove svn support
We don't need this, and we don't use this. It's left over from the svn
days. We stopped supporting svn as a project entirely when 12.x went
EOL. And VCS_REVSION isn't in any current ucl file or anywhere else in
the tree.

Sponsored by:		Netflix
Reviewed by	:	kevans, brd
Differential Revision:	https://reviews.freebsd.org/D52912
2025-10-05 08:25:06 -06:00
Martin Matuska 36c970ed98 zfs: merge openzfs/zfs@5605a6d79
Notable upstream pull request merges:
 #16025 26b0f561b dnode_next_offset: backtrack if lower level does not match
 #17758 c722bf881 Add interface to interface spa_get_worst_case_min_alloc()
                  function
 #17765 8d4c3ee9e zvol: Fix blk-mq sync
 #17787 8869caae5 zinject: Introduce ready delay fault injection
 #17780 b2196fbed Fix 'zpool add' safety check corner cases
 #17783 5c38029f4 zdb: add ZFS_KEYFORMAT_RAW support for -K option
 #17786 f0a95e897 zpool iostat: refresh pool list every interval
 #17807 -multiple zpool iostat: fix regressions in "all pools" mode
                  after #17786
 #17793 -multiple ddt prune: Add SCL_ZIO deadlock workaround
 #17799 ac2d8c80b Make mount/share errors non-fatal for zfs create/clone

Obtained from:	OpenZFS
OpenZFS commit:	5605a6d79b
2025-10-05 09:04:02 +02:00
Lexi Winter 0242d4c3ae libc: Move NLS catalogues to the locales packages
We don't want to put these in clibs (where libc is) since they are not
critical to system operation.  Move them to locales, since anyone who
is interested in translated versions of strerror() is going to have
that installed anyway.

While here, add some more documentation to bsd.nls.mk, particularly
the NLSPACKAGE option.

MFC after:	3 seconds
Reviewed by:	manu, kib
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52898
2025-10-05 06:12:54 +01:00
Alexander Ziaee 6720975ba0 ice.4: Zap registered mark from document descr
Document descriptions for device drivers always contain registered
trademarks of the manufacturers, but this is not a place for the
registered mark symbol. While here, remove another useless symbol,
the hyphen in the first line comment.

MFC after:	3 days
2025-10-04 19:24:22 -04:00
Alexander Ziaee 81d9e08a4d bsdinstall.8: Minor maintenance
Replace CD-ROMs with "discs, USBs, or network boot environments"
to both modernize aesthetic and also nudge youths to think at scale.
Since I'm disrupting the flow of these lines anyway, expand the VM
acronym because I think this is one of the first manuals people will
be looking at.

Reset list alignment to seven characters. It was at 19 characters,
and that was not enough to align them all, wasting many extra lines
by crunching all the words over. Seven actually bought us some lines
from six due to avg item size. Tag SPDX.

MFC after:	3 days
Discussed with:	ivy, zi
2025-10-04 19:24:15 -04:00
Brad Davis 85531add28 ice.4: Avoid first person language
Approved by:	ziaee
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D52896
2025-10-04 14:45:57 -06:00
Eric van Gyzen 9dd865a59e apei_detach: fix swi_remove parameter
swi_remove expects a void *, but we were passing void **.

MFC after:	1 week
Sponsored by:	Dell Inc.
2025-10-04 11:20:01 -04:00
Eric van Gyzen 01b0690c49 if_vmx: fix panic during kldload
Just like vmxnet3_intr_disable_all, iflib may invoke this routine
before vmxnet3_attach_post() has run, which is before the top-level
shared data area is initialized and the device made aware of it.

MFC after:	1 week
Sponsored by:	Dell Inc.
2025-10-04 11:20:00 -04:00
Dag-Erling Smørgrav 64f8416afd fts: Document thread (un)safety
MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D52828
2025-10-04 20:42:19 +02:00
Bjoern A. Zeeb 4c0e53aced pci: add quirk to disable Function-Level Reset (FLR)
MediaTek mt76 WiFi cards are advertising FLR support but after issuing
a FLR the chipset is gone.  Add a quirk so we can disable FLR.  The
current reset code will automatically fall back to a power reset.

This makes the card show up under bhyve where before it would just not
be discovered at all. That should make wifibox work for it and will help
development for a LinuxKPI based mt76 driver as found in framework laptops
as no dedicated machine and constant reboots are needed anymore.
We will likely need to add more PCI vendor/device IDs once we can test
the other device IDs.

Event:			EuroBSDCon Devsummit 2025
After a lot of help from: jhb
Really implemented by:	jhb (I just typed and tested)
GH issue:		github.com/pgj/freebsd-wifibox/issues/73
MFC after:		3 days
Reviewed by:		imp, emaste
Differential Revision: https://reviews.freebsd.org/D52728
2025-10-04 18:28:39 +00:00
Lexi Winter b09dd58651 Makefile.inc1: Fix package-pkg with CROSS_TOOLCHAIN
CROSS_TOOLCHAIN is used to build src with a different toolchain than
the bundled one.  Ports also has a CROSS_TOOLCHAIN option, but it has
a different meaning.  When building ports-mgmt/pkg from ports for the
package-pkg target, unset CROSS_TOOLCHAIN to prevent ports from being
confused.

This fixes 'make CROSS_TOOLCHAIN=llvm19 package-pkg' for the native
target, but cross-building (e.g., targetting powerpc from amd64) is
still broken due to an issue in pkg itself.

MFC after:	3 seconds
Reviewed by:	emaste
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52902
2025-10-04 18:52:39 +01:00
Colin Percival 026707768f release: Don't publish pkgbase.repo for embedded
The embedded "SD card" images build very differently from regular
releases, and don't use pkgbase yet.

MFC after:	3 days
Sponsored by:	https://www.patreon.com/cperciva
2025-10-04 10:29:21 -07:00
Ed Maste cca9295dd6 Cirrus-CI: Bump to FreeBSD 14.3 image
Sponsored by:	The FreeBSD Foundation
2025-10-04 12:09:45 -04:00
Kyle Evans d505ef08ff flua: unbreak the build
Local tree pollution let this escape.  *sigh*.

Pointy hat:	kevans
Pointy hat:	kevans
Pointy hat:	kevans
Fixes:	9c7db0931d ("flua: move lposix back into flua for now")
2025-10-04 10:04:35 -05:00
Kyle Evans bb4167463a nuageinit: require lfs where it's needed
nuageinit largely already did this, but one spot was missed -- add the
necessary require() in to get the module loaded.

Fixes:	b11a5709ec ("flua: kick out the remaining builtin modules")
2025-10-04 08:58:00 -05:00
Kyle Evans 9c7db0931d flua: move lposix back into flua for now
The real luaposix is structured differently, and our builtin version
tends to model that in its own special way.  Build it back in until we
get the shlib model just right to unbreak nuageinit, among other things.

This is a partial revert of the below-referenced commit; the other two
modules are simple, though, and were accurately split out.

Reported by:	markj
Fixes:	b11a5709ec ("flua: kick out the remaining builtin modules")
2025-10-04 08:57:59 -05:00
Mark Johnston 02dfca2458 release: Complete NO_ROOTification of Vagrant builds
- Don't clean pkg files, they won't be recorded in the manifest anyway.
- Use pw's new metalog mode to create the vagrant user.  Note that we do
  not need to manually create the home directory, pw will do it, so just
  remove that.
- Write metalog entries for the vagrant user's ssh key dir and
  authorized keys file

Note, this depends on an updated pw being installed on the host.

Reviewed by:	emaste
MFC after:	1 day
Sponsored by:	Klara, Inc.
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D52631
2025-10-04 12:43:14 +00:00
Robert Clausecker d518f64cef libc/resolv: get rid of MD5
MD5 is used by libc/resolv to generate a random sequence id from a
current time stamp.  Replace this convoluted mechanism with a call
to arc4random().  This permits us to entirely drop MD5 from libc,
simplifying the MD5 rework proposed in D45670.

Approved by:	markj
Reviewed by:	kevans, markj
See also:	D45670
Event:		EuroBSDcon 2025
Differential Revision:	https://reviews.freebsd.org/D52784
2025-10-04 10:50:02 +02:00
Peter Holm c16f53782c stress2: Do not try to open a fifo 2025-10-04 10:21:02 +02:00
Peter Holm 257a750c60 stress2: Add syzkaller reproducers 2025-10-04 10:20:37 +02:00
Enji Cooper 046c625e93 crypto/openssl: update to 3.5.4
This change includes all necessary changes required to update to OpenSSL
3.5.4.

More information about the 3.5.4 release can be found in the relevant
release notes (see 8e12a5c4eb for more details).

Merge commit '8e12a5c4eb3507846b507d0afe87d115af41df40'
2025-10-03 20:26:18 -07:00
Adrian Chadd 4a5a884c4a iwx: rewrite iwx_rs_update() to be VHT aware, refactor it a bit
The current iwx_rs_update() code doesn't handle setting VHT rates
at all.

So:

* write a routine - iwx_rs_update_node_txrate() - which will update
  the given node txrate info with the given notification
* .. which is based on the print_ratenflags() logic and decoding
* migrate iwx_rs_update() to use this routine, only on the STA BSS node.

This only handles decoding the version 2 rate_n_flags format response -
same as print_ratenflags() - so print if someone somehow sees a version
1 response.

It's shown a few things that deserve some later follow-up work:

* I really should have net80211 APIs that operate on the txrate struct
  itself, not on the ieee80211_node, but I'll use what I have.
  Changing it later is easy.

* the current net80211 txrate API doesn't include channel width,
  LDPC/STBC and such.  I didn't need it for the earlier tx rate
  representation migration, but it would be nice to add it.
  (The reason is that those choices are currently made in the drivers
  using rate control, rather than the rate control module, which is
  again what the older code did as well.)

  This means that the displayed rate isn't EXACTLY what the NIC has
  chosen - eg the NIC could quite happily decide to transmit a 20MHz
  or 40MHz frame to an 80MHz STA if that actually works out better.
  So just add TODOs for those.

Locally tested:

* AX210, STA mode

Differential Revision:	https://reviews.freebsd.org/D52767
Reviewed by:	thj
2025-10-03 19:56:39 -07:00
Adrian Chadd 88f467bd1a iwx: don't log VHT rate lookups in iwx_tx_fill_cmd() for data frames
iwx is now logging a lot of stuff to the kernel when associated at VHT
rates.  It's my fault; the replacement tx rate APIs print out a warning
when you're handing the legacy rate /HT rate APIs a VHT rate.

However all of the supported chipsets in iwx will be pushing the
rate control entirely into firmware.  We don't need to do per-frame
TX rate control like in previous chips.

So for now, just put in an if (rate == VHT) into the path and
a TODO comment.  A few lines later the function will just skip the
rate assignment stuff for data frames, thus saving us the logging.
The other paths (control traffic, multicast traffic) uses legacy
rates / HT rates by default and won't trigger a warning log.

Yes, iwx_tx_fill_cmd() really does deserve a rate control logic
rewrite, but I want to fix this particular issue first.

Locally tested:

* AX210, STA mode, HT and VHT associations

Differential Revision:	https://reviews.freebsd.org/D52766
Reviewed by:	thj
2025-10-03 19:55:40 -07:00
Adrian Chadd 262172de95 iwx: add some lock assertions in the TX start path
The locking paths into these routines LOOK correct, but I figured
it'd be good to at least enforce we're not doing concurrent entry
into iwx_start() / iwx_tx() without the lock held.

Differential Revision:	https://reviews.freebsd.org/D52655
Reviewed by:	thj
2025-10-03 19:55:14 -07:00
Adrian Chadd f531375560 iwx: add some missed beacon debugging
I'm seeing random disconnects in iwx without any useful information
as to why.  I'll start by adding missed beacon debugging here; hopefully
they're generally useful.

Differential Revision:	 https://reviews.freebsd.org/D52524
Reviewed by:	bz
2025-10-03 19:54:30 -07:00
Mateusz Guzik 6cc493c79d mtx: remove stale commentary about inlined spinlock ops
While both locking and unlocking a spinlock used to be inline, this
changed when spinlock_enter/spinlock_exit got introduced, defeating the
point of inlining them.

This either needs to have inlined spinlock enter/exit in place or have
mtx lock/unlock as function calls with the irq flags inlined in there.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-10-04 02:20:37 +00:00
Kyle Evans b11a5709ec flua: kick out the remaining builtin modules
Bootstrap flua has some magic now to handle modules by building them in
and discovering them via linker sets.  This is slightly cleaner than
always building them in and baking them into loadedlibs for both
bootstrap and system flua.

Adjust the stand build now that these three libs have their own new
homes.

Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D51891
2025-10-03 21:16:51 -05:00
Kyle Evans 151bd3516b flua: support our flua modules in the bootstrap flua
This version builds every module into the flua binary itself, since all
of the bootstrap tools are built -DNO_SHARED.  As a result, we also
cannot dlsym(), so we can't really discover the names of our newly
builtin modules.  Instead, just build out a linker set with all of our
luaopen_*() functions to register everything up-front.

Building in all of the modules isn't strictly necessary, but it means
that we have an example of how to add a bootstrap module everywhere you
go and one doesn't need to consider whether bootstrap flua can use a
module when writing scripts.  On my build machine, the consequence on
our binary size is an increase from around 1.6M -> 1.9M, which isn't
really that bad.

.lua modules can install into their usual path below $WORLDTMP/legacy
and we'll pick them up automagically by way of the ctor that sets up
LUA_PATH early on.

This re-lands bootstrap module support with a more sensible subset, and
after having verified that it cross-builds fine on macOS and Linux -- we
cannot do libfreebsd on !FreeBSD because it's more system header
dependant.  We also need to bootstrap libmd to bring in libhash, and
libucl + libyaml.

Reviewed by:	bapt, emaste (both previous version)
Differential Revision:	https://reviews.freebsd.org/D51890
2025-10-03 21:16:51 -05:00
Kyle Evans bbef1c72b4 Revert "flua: support our flua modules in the bootstrap flua"
This reverts commit 1953a12ee2, because it
cannot work at all on macOS without more work, at a minimum.  We use
linker sets for module discovery, but we don't have a version of this
that works for mach-o at the moment.
2025-10-03 19:53:28 -05:00
Kyle Evans d4c973fa14 Revert "flua: kick out the remaining builtin modules"
This reverts commit 80ada95900, because
bootstrap flua is about to get backed out.
2025-10-03 19:53:28 -05:00
Kyle Evans 981cf36d64 Revert "flua: don't build libjail into the bootstrap flua"
This reverts commit 3132040247, because
bootstrap flua is about to get backed out.
2025-10-03 19:53:27 -05:00
Colin Percival d0ff67db29 release: Publish pkgbase-repo.tar
This is a tarball containing the pkgbase repository for the release.

Note: This is an uncompressed tarball, because all of its constituent
.pkg files are already compressed; there's no point adding another
layer of compression.

Reviewed by:	ivy
MFC after:	1 minute
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D52899
2025-10-03 17:26:32 -07:00
Colin Percival e64eb9ea0f release: Respect NODISTSETS
In addition to not putting distribution sets onto ISO images, if
NODISTSETS is set then we should not build the distribution sets
or put them onto the "FTP" site (aka download.freebsd.org).

MFC after:	3 days
Sponsored by:	https://www.patreon.com/cperciva
2025-10-03 16:56:53 -07:00
Colin Percival 4b8b4c7dbf release: Check for empty NODISTSETS
Treat an empty NODISTSETS the same as if it is not defined; this avoids
problems if a script calls 'make release NODISTSETS=${NODISTSETS}'.

MFC after:	3 days
Sponsored by:	https://www.patreon.com/cperciva
2025-10-03 16:55:44 -07:00
Ryan Libby daf4da4d09 acpidump: quiet GCC -Wmaybe-uninitialized
Reviewed by:	kib
2025-10-03 15:48:28 -07:00
Lexi Winter 8d0a90512e bsdinstall: Improve pkgbase handling for jails
Add a new --jail option to the pkgbase script which installs
jail-specific set variants if they exist:

* "minimal" is replaced with "minimal-jail"

* A kernel is not installed.

* For sets shown in the component selection dialogue, only show the
  appropriate variant (jail or non-jail) for the target.

Modify the jail script to pass --jail to the pkgbase script.

Remove the redundant --no-kernel option, which was added in 15.0 and
was only used to install jails.

MFC after:	3000ms
Reviewed by:	ifreund_freebsdfoundation.org
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52829
2025-10-03 22:51:48 +01:00
Rob Norris 5605a6d79b pool_iter_refresh: don't refresh pools twice
In "all pools" mode, pool_iter_refresh() will call zpool_iter(), which
will call zpool_refresh_stats() before calling add_pool(). If we already
have the pool, this is a different handle, so we just release it and
return. Back in pool_iter_refresh(), we then call zpool_stats_refresh()
again for our handle on the same pool.

All together, this means we're doing two ZFS_IOC_POOL_STATS calls into
the kernel for every pool in the system. This isn't wrong, but it does
double the pressure on global locks.

Instead, we add a new function zpool_refresh_stats_from_handle() that
simply copies the pool config and state from one handle to another, and
use it to update our handle before we release it in add_pool(), so we
only have one call per pool per interval.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #17807
2025-10-03 14:39:09 -07:00
Rob Norris 5f09781cca pool_iter_refresh: don't flag existing pools as refreshed
zpool_iter() passes the callback a new instance of zpool_handle_t each
time, so the existing handle in the pool_list AVL never actually gets a
refresh. Internally, that means its zpool_config is never updated, and
the old config is never moved to zpool_old_config. As a result,
print_iostat() never sees any updated config, and so repeats the first
line forever.

This is the simplest workaround: just don't mark existing pools as
refreshed. pool_list_refresh() will see this and refresh them.
The downside is a second call to ZFS_IOC_POOL_STATS for existing pools,
because zpool_iter() just called it for the handle we threw away.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #17807
2025-10-03 14:39:00 -07:00
Rob Norris 1a32adca0f zpool iostat: update pool counter when skipping boot row
When skipping the boot row (with -y), the early loop meant we weren't
updating the "last_npools" count. That means the count never advanced
past zero, so cb_iteration was always reset to 0, leading to it being
"stuck" on the boot line, printing the header and nothing else forever.

Updating the pool counter on every loop sorts that out: it advances,
cb_iteration moves properly, and normal rows are printed.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #17807
2025-10-03 14:38:35 -07:00
Jason W. Bacon aa9e4fe3c9 getconf: Report value of _SC_PHYS_PAGES
PR:		289717
Reviewed by:	jhb
2025-10-03 16:43:47 -04:00
Kyle Evans 3132040247 flua: don't build libjail into the bootstrap flua
Other systems don't have jail support, and we won't be using it anyways.
2025-10-03 15:16:30 -05:00
Mateusz Guzik 641a582395 nullfs: avoid the interlock in null_lock with smr
This largely eliminates contention on the vnode interlock.

Note this still does not scale, to be fixed(tm).

Reviewed by:		kib
Tested by:		pho (previous version)
Differential Revision:	https://reviews.freebsd.org/D38761
2025-10-03 19:16:21 +00:00
Mateusz Guzik 249ec85352 nullfs: smr-protected hash lookup
Vast majority of real-world contention on the hash comes from lookups,
notably seen during highly parallel poudriere runs.

Lockless lookup largely alleviates the problem.

Reviewed by:		kib
Tested by:		pho (previous version)
Differential Revision:	https://reviews.freebsd.org/D38761
2025-10-03 19:16:04 +00:00
Mateusz Guzik 72347d7346 nullfs: assert the vnode is not doomed in null_hashget_locked
While here some style touch ups and fixing a stale name in an assert.

Reviewed by:		kib
Tested by:		pho (previous version)
Differential Revision:	https://reviews.freebsd.org/D38761
2025-10-03 19:15:34 +00:00
Mateusz Guzik 94aae05138 nullfs: remove the vhold/vdrop cycle around unlock
Both lower vnode and null data are safe while the lock is held,
at the same time neither is touched after unlock.

While here remove stale comment about interlock handling. It is no
longer legal to pass to unlock.

Reviewed by:		kib
Tested by:		pho (previous version)
Differential Revision:	https://reviews.freebsd.org/D38761
2025-10-03 19:14:30 +00:00
Kyle Evans 80ada95900 flua: kick out the remaining builtin modules
Bootstrap flua has some magic now to handle modules by building them in
and discovering them via linker sets.  This is slightly cleaner than
always building them in and baking them into loadedlibs for both
bootstrap and system flua.

Adjust the stand build now that these three libs have their own new
homes.

Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D51891
2025-10-03 13:09:25 -05:00
Kyle Evans 1953a12ee2 flua: support our flua modules in the bootstrap flua
This version builds every module into the flua binary itself, since all
of the bootstrap tools are built -DNO_SHARED.  As a result, we also
cannot dlsym(), so we can't really discover the names of our newly
builtin modules.  Instead, just build out a linker set with all of our
luaopen_*() functions to register everything up-front.

Building in all of the modules isn't strictly necessary, but it means
that we have an example of how to add a bootstrap module everywhere you
go and one doesn't need to consider whether bootstrap flua can use a
module when writing scripts.  On my build machine, the consequence on
our binary size is an increase from around 1.6M -> 1.9M, which isn't
really that bad.

.lua modules can install into their usual path below $WORLDTMP/legacy
and we'll pick them up automagically by way of the ctor that sets up
LUA_PATH early on.

Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D51890
2025-10-03 13:09:14 -05:00
Robert Clausecker acd546f01e */*: remove recallocarray() compat shims following import into libc
libopenbsd retains recallocarray() during bootstrapping for now
as it is needed for mandoc.

Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D52864
2025-10-03 19:47:52 +02:00
Robert Clausecker 4266461079 lib/libc: add recallocarray()
This function from OpenBSD is a hybrid of reallocarray() and calloc().
It reallocates an array, clearing any newly allocated items.
reallocarray() ultimately originates from OpenBSD.

The source is taken from lib/libopenbsd, which now no longer has the
function unless when bootstrapping (needed for mandoc).

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D52863
2025-10-03 19:46:55 +02:00