Commit graph

292970 commits

Author SHA1 Message Date
Philip Paeps
a48dc9b03b zoneinfo: don't install version
The commit teaching the build to install tzdata.zi for libcxx also
instals version.  It turns out this makes at least one piece of third
party software cry: rubygem-tzinfo expects any file in zoneinfo to be at
least 44 bytes long.  Clearly this is a bug in rubygem-tzinfo but since
nothing actually uses version, we may as well not install it ... as we
did previously.

Reported by:	delphij
Fixes:		91506dba7f2e zoneinfo: also install tzdata.zi and version
MFC after:	1 day
Approved by:	re (cperciva)

(cherry picked from commit 23a0c88b037625745b88d1661b9552f1ebe97ebc)
(cherry picked from commit 16ad4d77121dd117513c6044c0f076df144fa368)
2025-05-24 11:33:02 +06:00
Colin Percival
c4c9907816 14.3: Update to BETA4
Approved by:	re (implicit)
Sponsored by:	Amazon
2025-05-22 17:04:19 -07:00
Lexi Winter
6e27b15e6a package: fix dependency generation
A bug in release/packages/generate-ucl.sh causes package dependencies
(other than shlib depends) to not be generated correctly, meaning
packages are missing their dependencies.

generate-ucl.sh creates the UCL file by:

1. copying ${uclsource} (template.ucl) to ${uclfile}
2. appending dependencies to ${uclfile}
3. calling generate-ucl.lua on ${uclsource} to create ${uclfile}

This breaks because the dependencies added in step 2 are overwritten in
step 3.

Fix this by calling generate-ucl.lua with ${uclfile} as both the input
and output file, so anything we added to ${uclfile} is preserved.

PR:	286551
Reviewed by:	des, imp
Approved by:	re (cperciva)
Approved by:	kevans (mentor, stable/14 mfc)
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1203

(cherry picked from commit e05b6502f9ca36860236644884f12eff8e3243c4)
(cherry picked from commit fb6b1a797349992d8f166a2724eab2caf59abe28)
2025-05-22 17:04:12 -07:00
Alexander Ziaee
5af0942052
mtkswitch.4: Initial manual page
Add a stub manual only saying what it is, how to include it, what is
supported, and since when. This plugs the mtkswitch driver into the
manual subsystem and the release hardware notes.

MFC to:			14.3
MFC after:		3 days
Reviewed by:		adrian, carlavilla
Approved by:		carlavilla (mentor)
Approved by:		re (cperciva)
Differential Revision:	https://reviews.freebsd.org/D50412

(cherry picked from commit 37f00bc257d0e785fad1d0ffbd7dcbf09e863417)
(cherry picked from commit f31ac06711e69aed7cb4b38d8eb2aba2d7149ed8)
2025-05-21 23:01:36 -04:00
Alexander Ziaee
dc8ade18cf
ip17x.4: Initial manual page
Add a stub manual only saying what it is, how to include it, what is
supported, and since when. This plugs the ip17x driver into the manual
subsystem and the release hardware notes.

MFC to:			14.3
MFC after:		3 days
Reviewed by:		adrian, carlavilla
Approved by:		carlavilla (mentor)
Approved by:		re (cperciva)
Differential Revision:	https://reviews.freebsd.org/D50411

(cherry picked from commit f750a114d2c50c4d25d304dbf1dabfd3ae3aa013)
(cherry picked from commit ded154a1df97e3340f129394cbcaa1a50439d1bf)
2025-05-21 23:01:22 -04:00
Alexander Ziaee
86b04d37f0
qat.4: Cleanup
+ copyright symbols do not belong in Nd's (apropos results)
+ move hardware to HARDWARE for inclusion in the hw release notes
+ improve sysctls
+ lines which say nothing removed
+ links moved to see also
+ spacing and markup corrections

MFC after:		3 days
Reviewed by:		markj, mhorne
Approved by:		mhorne (mentor)
Approved by:		re (cperciva)
Differential Revision:	https://reviews.freebsd.org/D50381

(cherry picked from commit c1d9b2c9b03cade19cb4f94d3e29fba7179ac11a)
(cherry picked from commit 802edf23079388447659136805d97b95b0f90899)
2025-05-21 23:00:56 -04:00
Alexander Ziaee
b7fc3fbe32
e6000sw.4: Add HISTORY
MFC after:		3 days
Reviewed by:		mhorne
Approved by:		mhorne (mentor)
Approved by:		re (cperciva)
Differential Revision:	https://reviews.freebsd.org/D50358

(cherry picked from commit c808bee35b1129abd9af137204ebd15559b90b5b)
(cherry picked from commit 6426b01310122c7563d982ec21c91b98f3f5bd3b)
2025-05-21 23:00:39 -04:00
Alexander Ziaee
ee743b40ac
e6060sw.4: Improve title and add HARDWARE
For visibility in apropos and inclusion in the hardware release notes.

MFC after:		3 days
Reviewed by:		adrian, mhorne
Approved by:		mhorne (mentor)
Approved by:		re (cperciva)
Differential Revision:	https://reviews.freebsd.org/D50321

(cherry picked from commit bef89c155e77dd471af596a43f3914b754cc5155)
(cherry picked from commit 5e0e046d95a92aab8bea856fe0008870ee11bfc9)
2025-05-21 23:00:26 -04:00
Alexander Ziaee
fddd2c4d37
ar40xx.4: Initial manual page
For inclusion in apropos and the hardware release notes. While here,
add xrefs to this page and the previous e6000sw in etherswitch.4.

MFC after:		3 days (but adjusted for 14.3)
Reported by:		adrian
Reviewed by:		adrian, mhorne
Approved by:		mhorne (mentor)
Approved by:		re (cperciva)
Differential Revision:	https://reviews.freebsd.org/D50324

(cherry picked from commit 91c9751c3913497db2fbad1fcf7491557bbd2a75)
(cherry picked from commit 17e9eb1e0eb721e2400232c71f20bc490c416c60)
2025-05-21 23:00:12 -04:00
Alexander Ziaee
5dbcb9bfd0
arswitch.4: Improve title and add HARDWARE
For visibility in apropos and inclusion in the hardware release notes.

MFC after:		3 days
Reviewed by:		adrian (previous), mhorne
Approved by:		mhorne (mentor)
Approved by:		re (cperciva)
Differential Revision:	https://reviews.freebsd.org/D50322

(cherry picked from commit 9692d5e15e9bd7e628b06d655522477ce8c5b6fe)
(cherry picked from commit 1343a5b616ec4e11047c5024bb844e7275f84ddd)
2025-05-21 22:58:47 -04:00
Alexander Ziaee
f50ca9a01b
stand/lua manuals: Describe better
The lua boot loader module manuals were getting pulled into search
results for FreeBSD, but not for "boot" or "loader". Reword them to
increase clarity for boot or loader searches, as well as the FreeBSD
search term which we've been scoping to system topic overview manuals.

MFC after:	3 days
Reviewed by:	imp, mhorne
Approved by:	mhorne (mentor)
Approved by:	re (cperciva)
Pull Request:	https://github.com/freebsd/freebsd-src/pulls/1628

(cherry picked from commit 5d59c1b4f14e2fa6388b1d75ee3243085f1c69f2)
(cherry picked from commit 651102873e96174e4e799d4e06538e1d841e182a)
2025-05-21 22:58:35 -04:00
Alexander Ziaee
5d9e62e1cd
cdboot.8: Initial manual page
Add cdboot to the reference manual, fixing an undocumented bug where it
is undocumented. There's almost nothing here, but that's better than
"only imp and jhb know what this is".

MFC after:		3 days
Reported by:		jhb, imp
Reviewed by:		mhorne
Approved by:		mhorne (mentor)
Approved by:		re (cperciva)
Differential Revision:	https://reviews.freebsd.org/D50274

(cherry picked from commit ecdb0b79bf93a2b8392694bd266c5930ca42bab5)
(cherry picked from commit d659366cc62a70b4863bddf226f6209d13ab65c0)
2025-05-21 22:58:21 -04:00
Alexander Ziaee
66a6607089
e6000sw.4: Initial manual page
For inclusion in the HW relnotes.

MFC after:		3 days, note removed entries which didn't mfc
Reviewed by:		adrian, ivy, mhorne
Approved by:		mhorne (mentor)
Approved by:		re (cperciva)
Differential Revision:	https://reviews.freebsd.org/D50293

(cherry picked from commit 6da793a8caa15ee2cbb984ea39ac87c6cd2fdf63)
(cherry picked from commit d0e29f92f7a252b382d76c1e6bac33d8424af5fa)
2025-05-21 22:56:59 -04:00
Tijl Coosemans
adf77cb48e snd_hda: Add shutdown method
Power down the device on shutdown similar to what is done in the case
of suspend. The device may fail to attach on next boot without this.

PR:		286385
Reviewed by:	christos, adrian
Differential Revision:	https://reviews.freebsd.org/D50306

(cherry picked from commit d9900b9ea2b27f7a0c2eda97841b9499e02e3ea7)
(cherry picked from commit 77521692f4c71213c5419268657e696532c28325)

Approved by:    re (cperciva)
2025-05-22 01:21:42 +02:00
Dag-Erling Smørgrav
747efc2aee namei: Update documentation.
This should have been done 2+ years ago when the td argument was dropped
from NDINIT() and the NDFREE() macro and the SAVENAME and SAVESTART
flags were retired.

Approved by:	re (cperciva)
MFC after:	3 days
Fixes:		7e1d3eefd4 ("vfs: remove the unused thread argument from NDINIT*")
Fixes:		269c564b90 ("vfs: retire NDFREE")
Sponsored by:	NetApp, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D50375

(cherry picked from commit ee84b4e2fdf09f9a6dfa43e0931d8671cc15ebf9)
(cherry picked from commit 68bc635cc9b099fb03cfcd519046c385af0c5355)
2025-05-21 19:37:10 +02:00
Dag-Erling Smørgrav
84b971c918 man: Exit cleanly on SIGPIPE.
The first attempt at addressing this simply suppressed SIGPIPE, which
resulted in mandoc printing out error messages instead.  This was then
reverted, but the pipefail was (correctly) left in, so man still
returned a nonzero exit code if you quit a page before the end.

Approved by:	re (cperciva)
PR:		223516, 279542
Fixes:		14a5c1068d37, a85d870007e7
MFC after:	1 week
Reviewed by:	ziaee, kevans
Differential Revision:	https://reviews.freebsd.org/D50302

(cherry picked from commit fbaba7aa432257a9b787edc6bfdbfbde94f2e0d5)
(cherry picked from commit 2f99190a9234b119bcec1e4645e87d4e6016e5a5)
2025-05-21 19:36:41 +02:00
Olivier Certner
6b6d6448fe
vfs: vntblinit(): Raise default 'kern.maxvnodes' higher than 'kern.maxfiles'
Having 'kern.maxvnodes' higher than 'kern.maxfiles' mitigates a scenario
where some processes can eat up all vnodes in the system, causing
a deadlock, as long as the kernel itself does not create too many vnodes
without creating some file descriptor in some process' FD table.  A very
small percentage (~0.6%) of excess vnodes at infinity, coupled with
a large difference near the origin, should cover basic cases more than
enough.  Note however that this measure can be defeated, e.g., by using
nullfs mounts with non-trivial file hierarchies.

MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D50314

(cherry picked from commit e9baf472a6d228a16be19a11150d41cff29affe8)
(cherry picked from commit a6b05a35ce3c516cadfca49c310dffaabbe40440)

Approved by:    re (cperciva)
2025-05-21 12:07:52 +02:00
Olivier Certner
0b4d5c560a
vfs: vntblinit(): Rework comments on the computation of 'kern.maxvnodes'
Remove the parts that describe what is already in the code formula.  Add
hints about which of 'physvnodes'/'virtvnodes' takes precedence, and
when 'desiredvnodes' becomes smaller than 'maxfiles'.  These were both
computed analytically and verified experimentally.

Reviewed by:    kib (older version)
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D50310

(cherry picked from commit bf8890c84bacd8b1acebb2cb9a0944b1bb102b68)
(cherry picked from commit 5b07152f3ec3eea78958796b45594c5bd96c0bfb)

Approved by:    re (cperciva)
2025-05-21 12:07:45 +02:00
Olivier Certner
fbc73f17ba
Compute 'maxproc'/'maxfiles' from memory amount; Expand/fix comments
Change the formulae so that 'maxproc' and 'maxfiles' are computed based
on the physical memory amount, and not the corresponding number of
pages.  Make sure that the practical results are unchanged for all
architectures (which is possible since all have 4096 as their
PAGE_SIZE).  Despite this, we do this change to make it clearer how many
units of these values are computed per MB, which is easier on readers.

Change the comments accordingly and expand them to indicate which parts
of the computations are actually not used by default.  In passing, fix the
comments about default values and limits for 'maxfiles' (they were off).

No functional change (intended).

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D50124

(cherry picked from commit 73f9251c0b52ac0bfb2f2baff27493d6bae216f6)
(cherry picked from commit e7d4e52eafb016707ef3dd3b778d76db280c06a4)

Approved by:    re (cperciva)
2025-05-21 12:07:36 +02:00
Olivier Certner
7a9ea03e4b
vfs: vn_alloc(): Stop always calling vn_alloc_hard() and direct reclaiming
Commit ab05a1cf321aca0f intended to revert commit 8733bc277a383cf5
("vfs: don't provoke recycling non-free vnodes without a good reason"),
but due to intervening changes in commit 054f45e026d898bd ("vfs: further
speed up continuous free vnode recycle"), it also had to revert part of
it.  In particular, while removing the whole 'if (vn_alloc_cyclecount !=
0)' block, it inadvertantly removed the code block resetting
'vn_alloc_cyclecount' to 0 and skipping direct vnode reclamation (done
further below through vnlru_free_locked_direct()), which had been
outside the 'if' before the intervening commit.

Removing this block instead of reinstating it in practice causes
'vn_alloc_cyclecount' to (almost) never be 0, making vn_alloc() always
call vn_alloc_hard(), which takes the 'vnode_list_mtx' mutex.  In other
words, this disables the fast path.  [The reverted commit, which
introduced the 'if (vn_alloc_cyclecount != 0)' guarding this block,
actually never executed it because it also had the bug that
'vn_alloc_cyclecount' would always stay at 0, hiding its usefulness.]

Additionally, not skipping direct vnode reclamation even when there are
less vnodes than 'kern.maxvnodes' not only causes unnecessary contention
but also plain livelocks as vnlru_free_locked_direct() does not itself
check whether there are actually "free" (not referenced) vnodes to be
deallocated, and will blindly browse all the vnode list until it finds
one (which it may not, or only a few ones at the end).  As the fast path
was disabled, all threads in the system would soon be competing for the
vnode list lock, outpacing the vnlru process that could never actually
recycle vnodes in a more agressive manner (i.e., even if they have
a non-zero hold count).  And we could more easily get into this
situation, as each vnode allocation was reducing the count of "free"
vnodes, even if entirely new vnodes could be allocated instead.  This
part was mitigated by the vnlru process (before the tipping point
described above), which explains why the mechanism would not always
livelock.

Not skipping direct vnode reclamation was arguably a bug introduced by
the intervening commit (054f45e026d898bd), but was mitigated by
vn_alloc_hard() not being called in the fast path.  The revert commit,
by disabling the fast path, made it significantly annoying (to the point
of getting a few livelocks a week in some of my workloads).

Restore the reset of 'vn_alloc_cyclecount' to 0 and skip direct
reclamation when the current number of vnodes is below the
'kern.maxvnodes' limit, indicating we can start allocating a new 'struct
vnode' right away.  While here, fix the comparison with the limit when
'bumped' is true.

Reviewed by:    kib (older version), avg
Tested by:      avg, olce
Fixes:          ab05a1cf321aca0f (revert of "vfs: don't provoke recycling non-free vnodes without a good reason")
Fixes:          054f45e026d898bd ("vfs: further speed up continuous free vnode recycle")
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D50338

(cherry picked from commit d90c9c24e2c3701949c47061b5ad198eedeebfb9)
(cherry picked from commit ce6b7a5919da518715d6163baa42035d6d2c1bd0)

Approved by:    re (cperciva)
2025-05-21 12:07:15 +02:00
Bjoern A. Zeeb
361a8fdefa iwlwifi.4: Update modes for recent 802.11ac
By:			ziaee
Reported by:		Pat Maddox <pat@patmaddox.com>
Reviewed by:		bz (previous version), emaste, mhorne
Differential Revision:	https://reviews.freebsd.org/D49937

iwlwifi: update man pages for generations, firmware. and 11n/11ac

Put Intel's iwlwifi better in context to iwm, iwx and iwn.
Document the important tunables so users know where to go.
Document the port/package for firmware where firmware is now
maintained.
Adjust wording and table for the firmware and a flavor column.
Update History sections for 11n/11ac support as well as firmware
module removal from base.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	ziaee, emaste (comments)
Differential Revision: https://reviews.freebsd.org/D50319

Approved by:	re (cperciva)

(cherry picked from commit c33945a112c84795c7bd87a8e94d0cf322ef5000)
(cherry picked from commit a7e183c0c9a5579cdaa3e2ff9597e5e3d41dbdb4)
(cherry picked from commit 4ae64bd33f24cff90ff75efe67176a6df1c3af62)
2025-05-19 19:28:40 +00:00
Roger Pau Monné
a7277b98b8 xen: improve man (4) page
Update the xen(4) man page to reflect the current support status.

Approved by: re (cperciva)
Reported by: kevans
Reviewed by: bcr kevans imp
Differential revision: https://reviews.freebsd.org/D43373

(cherry picked from commit 82126ef92fdb3c13a67ad44d33c0fe6ea479c01a)
(cherry picked from commit 7dc0a9fa76a8df6dfaf26ff36a11aa9fe060a201)
2025-05-19 10:01:30 -07:00
Colin Percival
a2ebf641da 14.3: Update to BETA3
Approved by:	re (implicit)
Sponsored by:	Amazon
2025-05-16 00:00:00 +00:00
Colin Percival
29d6968fd3 EC2: Remove old broken_txfifo workaround
Early versions of Xen, including those used in the early days of EC2,
had a bug in their UART emulation whereby the TX FIFO wouldn't send the
expected interrupt when emptying; as a result, FreeBSD would write 16
characters to the serial console and then stop because we thought the
FIFO was forever full.

In 2013 (1c60b24baa) I added a loader tunable "hw.broken_txfifo"
which spinwaits for the FIFO TX rather than relying on the interrupt,
and enabled this in loader.conf in EC2 images.

A decade later, this workaround is almost certainly no longer needed in
EC2 -- most instances don't run Xen, and the bug was long since fixed
in Xen anyway -- but we've been holding on to the workaround "just in
case".  Unfortunately, the spinwait behaviour is causing latency spikes
and triggering warnings from the ena(4) driver.

This commit removes the hw.broken_txfifo setting from loader.conf in
EC2 images, but leaves the loader tunable and associated code, since it
has been necessary in some other environments.  (It seems that the TX
FIFO missing-interrupts bug has been independently written at least
three times!)

Approved by:	re (cperciva)
MFC after:	1 minute
Sponsored by:	Amazon

(cherry picked from commit 9a685c09f06a55b18589d75f9307563d84a17fa9)
(cherry picked from commit eadda156a50d3487ec1e6fc78f6cfe2df42448fa)
2025-05-15 15:22:44 -07:00
Bjoern A. Zeeb
36174c38f9 LinuxKPI: 802.11: make sure AUTH frames are not being sent if BSS changed
iwlwifi keeps logging 'Invalid TXQ id' even after previous changes to
catch the BSS changed.  The reason for this is that we do not error in
the SCAN -> AUTH path as otherwise we would not have the state machine
get us back to SCAN to clear up firmware state before auth/assoc to the
new BSS.

If we are not in synch as net80211 just swapped the iv_bss from under us,
disable the TX queue for the (old) lsta to prevent the AUTH frame sent
from sta_newstate() reaching the driver.  After all we are not trying to
authenticate to that node (sta) anymore.

Sponsored by:	The FreeBSD Foundation
PR:		274382
Approved by:	re (cperciva)

(cherry picked from commit 16d987fe781780100a31df30b9edd79ebb54f957)
(cherry picked from commit e0692e7bb6e8abcc55a2510dceea5f83e823a827)
2025-05-15 19:13:58 +00:00
Justin Hibbits
ac1943f97c powerpc: Always use BE tag in nexus_map_resource
7b5a5e4e replaced nexus_activate_resource() with the bus generic
equivalent, which uses bus_map_resource().  However, though not intended
to have a functional change, nexus_map_resource() uses the bus tag of
the build (BE vs LE), while nexus_activate_resource() always explicitly
set a big-endian tag, leading to failures on powerpc64le now.  Using BE
unless otherwise explicitly specified with the RF_LITTLEENDIAN fixes LE
on bare metal, and doesn't hurt in a VM, which nexus_map_resource() was
added for.

Reported by:	pkubaj
Tested by:	pkubaj
Fixes:		7b5a5e4e("powerpc nexus: Use bus_generic_rman_*")
MFC after:	1 day
Approved by:	re(cperciva)

(cherry picked from commit c4921a0faaf1683f39347dd066000d929c39c8b9)
(cherry picked from commit 45d585ab7f222ca36988c406df528128a17f9884)
2025-05-15 09:06:51 -04:00
Dag-Erling Smørgrav
95223d920a bsdinstall: Use a login shell for final configuration.
If the user accepts our offer of a shell to perform final configuration
tasks before rebooting, start a login shell.  This ensures it will have
the correct PATH and be able to install packages without issues.

Approved by:	re (cperciva)
PR:		286722
MFC after:	3 days
Reviewed by:	jrtc27, allanjude, emaste
Differential Revision:	https://reviews.freebsd.org/D50297

(cherry picked from commit 5870d6a1ef4ec5d6fc91d0f1635bca59e09a040d)
(cherry picked from commit 242b52ba3c38108f2c2af4194a031ed495b95dbc)
2025-05-14 20:08:15 +02:00
Christos Margiolis
aff92a9f3c sound: Call PCM_RELEASE() if pcm_addchan() fails
Fixes:		fd906e47b18f ("sound: Simplify locking during device creation")
Sponsored by:	The FreeBSD Foundation
MFC after:	1 day
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D50337

(cherry picked from commit dbfe79bbe5d5ebe296fbff2d101e0994d7881d0d)
(cherry picked from commit 3de66f369c1e8db46ae938d446a72f6ff3493356)

Approved by:    re (cperciva)
2025-05-14 16:23:53 +02:00
Olivier Certner
10944406be
queue(3): Install *_SPLIT_AFTER() links to the main manual page
Completes commit "queue(3): New *_SPLIT_AFTER(), *_ASSERT_EMPTY(),
*_ASSERT_NONEMPTY()" (c02880233949b01f).

MFC after:      1 day
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit c071616b06aa0f51ac4314f989c472d0268c2ddb)
(cherry picked from commit eca0ce8afb15ef9f01703c4d15273eaf66eb63f5)

Approved by:    re (cperciva)
2025-05-13 14:41:33 +02:00
Olivier Certner
d156cabc0f
sysctl.9: Constant integer example: Do not promote 'debug.sizeof'
Replace it with another one, selected from current in-tree uses.

MFC after:      1 day
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 129a6cf886e108b67f637a271f003519c99b9abd)
(cherry picked from commit 1ca993dd454445ad766f8b8b39103e09c1dccce9)

Approved by:    re (implicit)
2025-05-13 14:41:33 +02:00
Olivier Certner
de6a4418ee
sysctl(9): Ease exporting struct sizes; Discourage doing that
Introduce two helpers, the more general SYSCTL_SIZEOF() and
a struct-specific one SYSCTL_SIZEOF_STRUCT() which prepends 'struct' in
the description and in the use of sizeof() but uses the raw structure
name as the knob's name.  The size of the object/structure is exported
under 'debug.sizeof'.

Existing knobs under 'debug.sizeof' were all converted to use the
helpers.

Add a note before the helpers discouraging the introduction of new
leaves for ad-hoc reasons.  List alternative means for developers to
obtain the size of arbitrary kernel structures easily (thanks to markj@
for providing these).

No functional change (intended).

Reviewed by:    kib, markj
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D50121

(cherry picked from commit 713abc9880aabe0ff924ff644bceb6ff404ed3cd)
(cherry picked from commit efce9f8a510b60736994e50288b78fc7b32b5d90)

Approved by:    re (cperciva)
2025-05-13 14:41:33 +02:00
Olivier Certner
f7fa53cead
stress2: exlock2.sh: Fix impact of previous '-U' removal
In commit "stress2: exlock2.sh: Preserve behavior after ps(1)'s '-U'
change" (1265d3b07eaa), I forgot that '-U' also has the side-effect of
implying '-x' by default.  Now that '-U' has been removed, make '-x'
explicit.

Fixes:          1265d3b07eaa ("stress2: exlock2.sh: Preserve behavior after ps(1)'s '-U' change")
MFC after:      1 hour
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit f6e826891760a34ef69e1122da0ee378f7caf454)
(cherry picked from commit da6b04cd404341d494e2c89e3058ccaea5ca8a79)

Approved by:    re (implicit)
2025-05-13 14:41:33 +02:00
Olivier Certner
10e6bac460
stress2: exlock2.sh: Preserve behavior after ps(1)'s '-U' change
Remove '-Uroot', as now '-U' selects processes based on their real user
IDs, and since the program using them was launched as 'root', the
equivalent now is just to remove it, as now ps(1) by default selects
processes based on its effective UID (root) and their effective UIDs.

It seems that matching on effective or real UID does not really matter
in this test, but at least this change simplifies the command-line.

MFC after:      1 day
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D50200

(cherry picked from commit 1265d3b07eaa418e9c60800db93f3482ddbb6ae2)
(cherry picked from commit 5af18707c155dca74071aa3bfb61160814f03bc3)

Approved by:    re (cperciva)
2025-05-13 14:41:32 +02:00
Olivier Certner
2d5e13c86a
rc/tests: Fix process flags checks using ps(1)
These checks use ps(1) with both the '-p' and '-a' flags, which worked
so far as ps(1)'s '-a' option was buggy.  Since the fix in commit
"ps(1): Make '-a' and '-A' always show all processes"
(93a94ce731a89b56), such a command-line always selects all processes,
making the specified '-p' useless and the test wrong.  Remove the
useless '-a'.

While here, remove the redundant '-x', as '-p' implies '-x' by default.

MFC after:      1 day
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D50201

(cherry picked from commit 646375408742dd5ed9abb174a621a3f8f65a56ef)
(cherry picked from commit a69fe62604021f120206e4064ca7463195aeb3a0)

Approved by:    re (cperciva)
2025-05-13 14:41:32 +02:00
Olivier Certner
d5fff1aad5
ps.1: Remove ambiguity in description of option '-J'
As stated in the previous commit, option '-J' was introduced by commit
"Add -J to filter by matching jail IDs and names."
(13767130c7, r265229), which unfortunately talked about '-J'
being a filter while actually implementing it as a regular selection
option which adds to the processes to display.

The manual page's formulation hinted more at '-J' being a filter, which
it is not, or could be just considered ambiguous, because of the
presence of the "only" word.  Consequently, remove it and reformulate.

Reviewed by:    ziaee, dch
MFC after:      1 day
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D50194

(cherry picked from commit cbda1aea6532697247bcca6e59d45775857c35e2)
(cherry picked from commit 1586fd84fbdab2e2ec205ca717c69946805f2ba0)

Approved by:    re (cperciva)
2025-05-13 14:41:32 +02:00
Olivier Certner
eed005b578
RELNOTES: ps(1): Document change in behavior for '-a'/'-A'
Document the practical consequence of change "ps(1): Make '-a' and '-A'
always show all processes" (93a94ce731a8) that specifying '-a'/'-A'
leads to printing all processes regardless of the presence of other
process selection options (except for '-x'/'-X', which command
a filter).

While here, mention a possible practical issue with '-J', as reported by
dch@.  This option was introduced by commit "Add -J to filter by
matching jail IDs and names." (13767130c7, r265229), which
unfortunately talked about '-J' being a filter while actually
implementing it as a regular selection option which adds to the
processes to display.

Reviewed by:    dch
MFC after:      1 day
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D50193

(cherry picked from commit 428200d2f0689aa801f5cab15d3066e2c77825f5)

Commit hash edited on MFC.

(cherry picked from commit f18a49a747f7641e93c24d50207d54e7e612f97d)

Approved by:    re (cperciva)
2025-05-13 14:41:26 +02:00
Warner Losh
e79a3515c2 mpi3mr: Remove -g
This -g was introduce when I didn't review all the cahnges to mpi3mr I
was MFCing. Remove it. This is a direct commit.

PR: 249068
Fixes: 80b069913d
Sponsored by:		Netflix
Approved by:  re (cperciva)
(cherry picked from commit 22ebbdea3f33fdeae5ee83077ea9c25979705f2f)
2025-05-12 16:45:35 -06:00
Colin Percival
0e771ca261 release: Don't put drm-kmod package onto DVD
The X.Y-RELEASE DVDs use a quarterly package set which was built on
X.(Y-1)-RELEASE, and those kernel modules are never going to be
useful.

Approved by:	re (cperciva)
MFC after:	30 seconds
Sponsored by:	Amazon

(cherry picked from commit 94e44a074e5212cc3459e360a9de55500f7c41d0)
(cherry picked from commit 1ecfdc009172491a133d596332a9aaf6851a49c1)
2025-05-11 15:23:21 -07:00
Colin Percival
a1874e9adf pkg-stage.sh: kde5 -> kde
The "kde5" package no longer exists; KDE goes to 6.

Note: Depending on the size of 13.5-BETA3 DVD images, KDE might end
up being removed from this list in the near future.

Approved by:	re (cperciva)
With hat:	re@
MFC after:	30 seconds
Sponsored by:	Amazon

(cherry picked from commit 0d7b98c06c5ec9638020844ee460af075cfc6e54)
(cherry picked from commit 1c2e947d272ea42dbf7416d867101fe5164ffc6d)
2025-05-11 15:23:14 -07:00
Colin Percival
0e80651662 14.3: Update to BETA2
Approved by:	re (implicit)
Sponsored by:	Amazon
2025-05-09 00:00:00 +00:00
Bjoern A. Zeeb
8d6b758199 net80211: fix a race between ieee80211_sta_join and scan entries
We were seeing panics during ieee80211_sta_join() which seemed that
the ni->ni_chan was not valid anymore, which was true.
We also saw errors indicating data put into ni_ies became inalid.

The problem was that the ieee80211_scan_entry passed into
ieee80211_sta_join() (in the observed case from setmlme_assoc_sta())
became invalid during ieee80211_alloc_node().
As a result for the ni_chan case the the rateset and len in rates[1]
became invalid.  Similarly for the IEs.

Make a (deep)copy of the scan entry in setmlme_assoc_sta() and return
the copy as once we leave ieee80211_scan_iterate() we can no longer
rely on the scan entry to be valid.

Sponsored by:	The FreeBSD Foundation
Reported by:	rm, ziaee, bz
Tested by:	rm, ziaee, bz
PR:		286063
Approved by:	re (cperciva)
Reviewed by:	adrian (,emaste)
Differential Revision: https://reviews.freebsd.org/D49865

(cherry picked from commit aff56b4f0b25c44c9c2cae9a3f816c4277057a71)
(cherry picked from commit 34cd36918652f07ea8a36a62115349781e457fc6)
2025-05-08 21:22:59 +00:00
Bjoern A. Zeeb
873c0ea648 LinuxKPI: 802.11: header updates for mt76
Add more structs, fields, flags, defines.

Sponsored by:	The FreeBSD Foundation
Approved by:	re (cperciva)

(cherry picked from commit 675e6b1c68ba71af1853952f7df4d84399340009)
(cherry picked from commit 6a0dbc0a1246c9825f0892bb6dd957f5d081057a)
2025-05-08 21:22:53 +00:00
Bjoern A. Zeeb
71946313d4 LinuxKPI: 802.11: fix wiphy_info[_once]
The dev field in wiphy is a pointer already; no need for &.

Sponsored by:	The FreeBSD Foundation
Fixes:		ac1d519c01ca8
Approved by:	re (cperciva)

(cherry picked from commit 845b81cf908002b14ac08ce8c42246720a5b30d9)
(cherry picked from commit a21addc7a0137c5938414df322dbf5f929729834)
2025-05-08 21:22:35 +00:00
Xin LI
9679eedea9 MFV: xz 5.8.1.
PR:		bin/286252
Approved by:	re (cperciva)

(cherry picked from commit 128836d304d93f2d00eb14069c27089ab46c38d4)
(cherry picked from commit 5cf27a49a2de91ae1f369912a7bf3859fbc79355)
2025-05-08 09:24:51 -07:00
Baptiste Daroussin
b64d3fc884 nuageinit: implement chpasswd
Add support for chpasswd, with all possible syntaxes, including
deprecated one: chpasswd.list as a list or as a multiline string
as some providers are still only providing this deprecated form

Approved by:	 re (cperciva)
Sponsored by:	OVHCloud
MFC After:	1 week
Reviewed by:	kevans, jlduran
Differential Revision: 	https://reviews.freebsd.org/D50021

(cherry picked from commit c201a1198ad70e7d096ee32c364d539eed2dfec4)
(cherry picked from commit 6c912470030ba958f2e41a00b44f6430919b1389)
2025-05-08 15:08:55 +02:00
Mark Johnston
f30669ba97 bpf: Make bpf.h self-contained
PR:		286539
MFC after:	3 days
Approved by:	re (cperciva)

(cherry picked from commit 981af1192cfa5ecd7bee9fe47386ed9d45397828)
(cherry picked from commit 48881a2680ab42ea1b06d1c9685df9d295991d16)
2025-05-07 12:05:08 +00:00
Mark Johnston
399bc0c182 netinet: Make in_systm.h self-contained
PR:		286539
MFC after:	3 days
Approved by:	re (cperciva)

(cherry picked from commit 75d173a84836d14b12a0f747ffed7d37766dd274)
(cherry picked from commit 02dde7c43fe76a5dcdc170de1c2740a31629e106)
2025-05-07 12:04:59 +00:00
Michael Tuexen
976aa65e3e tcp: improve KASSERT in limited retransmit
When doing a limited retransmit, allow up to 2 * MSS - 1 if the
Nagle algorithm has been disabled.

PR:			282605
Approved by:		re (cperciva)
Reviewed by:		cc, Peter Lei
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D49922

(cherry picked from commit 934caaec3afc43638c2a1da8fbe3b672566db4fe)
(cherry picked from commit 0906658c3409996b26518e67df48c01052ef934c)
2025-05-06 21:18:24 +02:00
Michal Meloun
c3ecee5b38 arm: remove accidentally added -Map switch to linker
Approved by:	re (cperciva)
Fixes:	ba045ba49ded

(cherry picked from commit 0283eebb4a54c7270f9ac03bb4ed2742cb959c28)
(cherry picked from commit 0aca1d4e7c766fea577129fdae5796244998b7d6)
2025-05-05 00:02:29 -07:00
Michal Meloun
95d87d5f56 arm: Improve the creation of kernel.bin
Instead of relinking the kernel without elf headers, replace them with
a binary blob of the same length starting with a jump to the kernel's start
address. This ensures that all symbols stay at the same offsets as in
the original kernel, so kernel.debug remains valid also for kernel.bin.

Also ensure that the awk script used runs with  the neutral locale defined.
Awk 'write' is a locale compilant, and  script is used to write binary data
to a file, so it needs to ensure that  bytes > 127 are written unchanged.

While I'm on, set the neutral locale also for arm64, where the same script is
used to generate the kernel booti image.

Reviewed by:	emaste, imp
Approved by:	re (cperciva)
Differential Revision:	https://reviews.freebsd.org/D47488

(cherry picked from commit ba045ba49dedb068ba2f0e13fbb1c1a91fde8333)
(cherry picked from commit bec5167645b5d157a1c980099162362f115ccbfe)
2025-05-05 00:01:44 -07:00