rc.subr: Fix premature return from wait_for_pids
Use pwait's new -r option to wait until the target processes have not
only terminated, but also been reaped.
PR: 293183
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D58391
pwait: Test the new -r option
Test that pwait without -r reports a process as soon as it terminates,
while pwait with -r does not report it until it has been reaped.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D58385
pwait: Add a SIGINFO handler
On SIGINFO, print a space-separated list or remaining processes to
standard error.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D58386
pwait: Optionally wait until process is reaped
If the new -r option is specified, wait until the target process not
only terminates but is reaped.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D58314
kqueue: Add NOTE_REAP
Add a NOTE_REAP event for EVFILTER_PROC which provides a notification
when the process is reaped.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D58313
rc.d: fix lockd and statd flags processing after scvj
The documented flags are named differently than the script name, this
requires special handling of the flags.
The Service Jails feature requires the handling of the variable to be
differently than it was initially. The change back then did not work,
which resulted in the flags to be ignored.
This commit fixes the issue in head. This affects 15.0 and 15.1 too.
PR: 296233
Reported by: Robert Blayzor <rblayzor at inoc.net>
Tested by: Robert Blayzor <rblayzor at inoc.net>
Fixes: f99f0ee14e3af81c2 - rc.d: add a service jails config to all base system services
MFC after: 1 month
MFC to: 15-stable
(cherry picked from commit d05d60e958bca778ea193932facb026c48d7ca0b)
libsysdecode: decode combined Netlink message flags
Change sysdecode_nlm_flag() to decode Netlink message flags as a
bitmask instead of looking up a single flag value. This correctly
prints combinations of NLM_F_* flags while preserving any unknown
bits in hexadecimal.
Reported by: androvonx95 <androvonx95 at tutamail.com>
Reviewed by: kp
Signed-off-by: Ishan Agrawal <iagrawal9990 at gmail.com>
Sponsored-by: Google LLC (GSoC 2026)
libsysdecode: use local sysdecode.h
Replace <sysdecode.h> with "sysdecode.h" so local builds use the in-tree header
in lib/libsysdecode instead of a stale installed copy in /usr/include, avoiding
build failures after updating sysdecode.h.
Signed-off-by: Ishan Agrawal <iagrawal9990 at gmail.com>
Sponsored-by: Google LLC (GSoC 2026)
Reviewed by: kp
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2338
xhci: Fix packet xfer larger than 64kb
Previously, multiple frames of xfers are split into many tds. In the
refactor process, we forget to consider this. The td builder is already
allocate with enough numbers of tds. What we need to do is to fill the
normal trbs for muiltiple tds when building trbs.
PR: 297053
Tested by: phk, oleglelchuk at gmail.com
Fixes: e0b235ecd4fa ("xhci: Refactor xhci_generic_setup code")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58465
mkimg: Add ms-basic-data alias for GPT
While preparing GPT-schemed RaspberryPi images for the NanoBSD
Reimagined GSoC 2026 project, a discrepancy was identified between
mkimg(1) and gpart(8) regarding Microsoft Basic Data partitions (GUID
!ebd0a0a2-b9e5-4433-87c0-68b6b72699c7).
Currently, mkimg(1) relies on the MBR-centric name "ntfs" to identify
this partition type under the GPT scheme. Conversely, gpart(8)
identifies this type as "ms-basic-data".
To allow automation scripts (such as those consuming from gpart backup)
to use a common partition type across tools, add ALIAS_MS_BASIC_DATA as
a valid alias.
This is part of a larger effort to avoid a custom, MBR-based image
generation logic for embedded SoCs like the Raspberry Pi, standardizing
on GPT layouts across all supported FreeBSD embedded devices.
[5 lines not shown]
mkimg: Add ms-basic-data alias for GPT
While preparing GPT-schemed RaspberryPi images for the NanoBSD
Reimagined GSoC 2026 project, a discrepancy was identified between
mkimg(1) and gpart(8) regarding Microsoft Basic Data partitions (GUID
!ebd0a0a2-b9e5-4433-87c0-68b6b72699c7).
Currently, mkimg(1) relies on the MBR-centric name "ntfs" to identify
this partition type under the GPT scheme. Conversely, gpart(8)
identifies this type as "ms-basic-data".
To allow automation scripts (such as those consuming from gpart backup)
to use a common partition type across tools, add ALIAS_MS_BASIC_DATA as
a valid alias.
This is part of a larger effort to avoid a custom, MBR-based image
generation logic for embedded SoCs like the Raspberry Pi, standardizing
on GPT layouts across all supported FreeBSD embedded devices.
[5 lines not shown]
cam/cd: avoid integer divide fault in cdstart()
If something goes very badly (e.g. forcibly removing a medium while
the OS tries to start it), this could end up in params.blksize being 0
(and params.disksize 1). Avoid an integer divide fault, panicking the
kernel, by bailing out before.
MFC after: 3 days
mt76: disable debugfs due to missing piece still in review
Until D57524 is not reviewed and committed we will have a missing
function declaration which prevents us to compile (in) debugfs for
mt76 core and mt7921. Temporary disable debugfs again.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit c589dc4ef77d8e165e449a861c3705002ca4a762)
mt76: further adjust debugfs compile time options
The debugfs options between the various modules (core and chipsets)
are not 100% de-coupled. This means we may run into unresolveable
symbols at load time of the modules if we enable certain options
generally or for core but not for the chipset.
For now: always build the core module with debugfs support.
Migrate the CONFIG_MAC80211_DEBUGFS flag into the Makefile of each
chipset so we can individually turn it on.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit ec17c2454bf03f954e460bfe3c95e35f638ba71e)