stdio: Add test cases for scansets
Add test cases that exercise scanf() / wscanf() scansets, including
hyphenated ranges and the missing closing bracket bug we recently fixed.
MFC after: 1 week
Reviewed by: kevans, emaste
Differential Revision: https://reviews.freebsd.org/D62201
stdio: Handle unterminated scansets
In both vfscanf() and vfwscanf(), if the end of the format string was
reached before the closing bracket of a scanset, we treated the NUL as
the closing bracket and continued to read beyond the end of the format
string. Add an error check to catch this case.
MFC after: 1 week
Reported by: Nick L. Leppelmeier <nicklpmr at gmail.com>
Reviewed by: kevans, emaste
Differential Revision: https://reviews.freebsd.org/D62199
stdio: Implement ranges for wchar scansets
The C and POSIX standards allow but do not require hyphenated ranges to
be supported in scanf() / wscanf() scansets. We implemented them for
scanf() but not for wscanf(). Do so using similar logic as for scanf().
This is hard to do efficiently for wide characters, which can in theory
span the full 32-bit range (and even the actual range of about 1 million
Unicode codepoints is difficult to handle), so we don't try to be
efficient, but just focus on producing the same results for wscanf() as
for scanf().
MFC after: 1 week
Reviewed by: kevans, emaste
Differential Revision: https://reviews.freebsd.org/D62200
loader.efi: Measure boot policy and loaded contents with a TPM
Use the EFI TCG2 protocol, or the legacy TCG protocol on TPM 1.2
firmware, to extend the loader PCRs and record EV_IPL events in the
firmware event log.
Extend PCR 8 with the final kernel environment and the type, name, and
arguments of each loaded boot input. Prefix both record types with
versioned, NUL-terminated domain strings. These make the records
self-identifying and define an explicit measured policy encoding. Store
the complete measured pre-images in the event data so attestation and
diagnostic tools can audit the values without an out of band copy.
Extend PCR 9 with the initialized contents of kernels, modules, and raw
boot inputs, but record only descriptive labels rather than copying file
contents into the event log.
The Lua module table has no defined traversal order. Retain content
ranges as loader-private metadata, then sort the final file list before
[32 lines not shown]
net/netcat: Switch to proxied github repo
Upstream's sourceforge repo is inaccessible through FreeBSD's ports
plumbing. Therefore we must proxy through my github account.
The reason for this is I no longer need to host the tarball on my own
server. We use github instead.
edk2: Import Loadfile2.h and TcgService.h from edk2-stable202502
Verbatim import of these files, with unix line endings.
Sponsored by: Netflix
(cherry picked from commit e960cb4c033c8f65af1e8b09310c1bd5414f21ac)
tpm20: Bring in the edk2 includes for TPM 2.0 support
Bring these in from edk2-stable202502. They will be used in a
forthcoming TPM 2.0 support code.
Sponsored by: Netflix
(cherry picked from commit 1aa241b4ee657b8a62a0d86b91f82cf792f08dca)
snd_hda: Enable the headset microphone on Framework ALC295 laptops
The ALC295's jack is configured in headphone-only mode by default. Set
it to CTIA headset mode so that the headset microphone can work,
otherwise the pin configuration patches alone are not enough.
One caveat, as a result of jack presence detection not working properly,
is that a user has to switch between internal and headset microphones
using mixer(8). The "monitor" knob corresponds to the internal mic, and
"mic" to the headset one.
This patch currently covers the Framework 11th Gen (0x0001), AMD Ryzen
7040 13in (0x0006), and AMD Ryzen AI 300 (0x000b).
Linux commit 5a36767 used as a reference.
See also: https://github.com/torvalds/linux/commit/5a36767a41650518f35ea0bae9a2d6e775f1aed1
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60527
x11/nvidia-driver{-devel}, x11/nvidia-kmod{-devel}, x11/linux-nvidia-libs{-devel}, graphics/nvidia-drm*-kmod{-devel}, x11/nvidia-settings, x11/nvidia-xconfig: Update to 620.85.02
Update to latest Production Branch of drivers 620.85.02:
https://www.nvidia.com/en-us/drivers/details/289117/
Linux counterparts for x11/linux-nvidia-libs:
https://www.nvidia.com/en-us/drivers/details/289118/
As this version is newer than exisitng New Feature Branch (NFB)
of drivers, update -devel variants to the same version, too.
PR: 301403
Differential Revision: https://reviews.freebsd.org/D62318
iflib: Expose locked datapath quiescence for driver resets
Provide iflib_quiesce() for driver-managed resets which must stop the
framework datapath before dismantling device resources. Require the
context lock, preserve administrative flags, and reject detach, power
transitions, and recursive lifecycle calls without requesting a restart.
Make the stop path wait for queue tasks, callouts, and inline hardware
users before invoking IFDI_STOP and releasing packet mappings. Mask
interrupts again after draining task tails which may have reenabled them.
Drain mp_ring under its existing consumer ownership. When the ring is
empty, reserve all producer space so late transmitters take the existing
ring-full path and return ENETDOWN. Reopen the ring after successful
initialization. Keep completion polling inside consumer ownership.
Simple TX uses its existing producer count, mutex, and deferred-free
slot. Check ALTQ admission under the send queue lock so stop can purge
pending packets before a restart.
[10 lines not shown]
audio/playmidi: Deprecate and mark broken on FreeBSD 16
It needs /dev/sequencer, retired from the base system in 2025, and no
longer builds on 16, which removed the sequencer API from soundcard.h.
Use audio/timidity++, audio/fluidsynth or audio/wildmidi instead.
MFH: 2026Q4
Sponsored by: The FreeBSD Foundation
Reviewed by: arrowd, jrm
Differential Revision: https://reviews.freebsd.org/D62134
(cherry picked from commit 30f6e70b7ae5631d0f6d1bb3a3f9c3408c03f2dc)
audio/playmidi: Deprecate and mark broken on FreeBSD 16
It needs /dev/sequencer, retired from the base system in 2025, and no
longer builds on 16, which removed the sequencer API from soundcard.h.
Use audio/timidity++, audio/fluidsynth or audio/wildmidi instead.
MFH: 2026Q4
Sponsored by: The FreeBSD Foundation
Reviewed by: arrowd, jrm
Differential Revision: https://reviews.freebsd.org/D62134