FreeBSD/src 6aaaf7bcddl/usr.sbin/zfsd case_file.cc

zfsd: Improve spare selection

Port OpenZFS PRs #18597 and #18578 from zed to zfsd.

When activating a spare, sort candidates before trying them:
 1. Distributed dRAID spare matching the failed vdev's group (fastest
    rebuild via sequential resilver)
 2. Regular spares
 3. Non-matching distributed spares (kernel will reject anyway)
 4. Within each tier: prefer rotational match, then smallest
    sufficient size

Also try all healthy spares in order rather than stopping at the
first one, and use sequential rebuild for distributed spares.
DeltaFile
+158-37cddl/usr.sbin/zfsd/case_file.cc
+158-371 files

FreeBSD/src efcc183sys/netpfil/pf if_pflog.c

pflog: remove unused argument from pflogattach()
DeltaFile
+3-3sys/netpfil/pf/if_pflog.c
+3-31 files

FreeBSD/src 4e57c2ausr.sbin/makefs/cd9660 iso9660_rrip.c

makefs: Fix build on systems without st_birthtime such as Linux

Reviewed by:    emaste
Fixes:          0a301f33306c ("makefs cd9660: Populate creation time stamps in RockRidge extensions")
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2297
DeltaFile
+5-0usr.sbin/makefs/cd9660/iso9660_rrip.c
+5-01 files

FreeBSD/src 777f67dusr.sbin/bhyve/slirp slirp-helper.c

bhyve: Use a blocking socket in the helper process

The send_packet callback does not handle EAGAIN, and on the recv side we
already use poll() and MSG_DONTWAIT to implement a non-blocking loop.

PR:             291616
Tested by:      novel
Fixes:          0e62ebd20172 ("bhyve: Move the slirp backend out into a separate process")
Differential Revision:  https://reviews.freebsd.org/D54340

(cherry picked from commit daef625cf884dea33d50ad7a0e2da0879a442495)
DeltaFile
+2-0usr.sbin/bhyve/slirp/slirp-helper.c
+2-01 files

FreeBSD/src eeff383sys/dev/vmm vmm_dev.c

vmm: Avoid clobbering errors from vmm_modinit()

Reported by:    novel
Reviewed by:    bnovkov
Fixes:          e758074458df ("vmm: Move the module load handler to vmm_dev.c")
Differential Revision:  https://reviews.freebsd.org/D54750

(cherry picked from commit 99afbc5cc7ae8ba7b112fbafbf24ea2575a65ba4)
DeltaFile
+5-3sys/dev/vmm/vmm_dev.c
+5-31 files

FreeBSD/src 95030a9usr.sbin/bhyve/slirp slirp-helper.c

bhyve/slirp: Drop privileges before entering capability mode

When in restricted mode, the slirp-helper process enters a capsicum
sandbox, after which we cannot look up the uid for the "nobody" user.
Reverse the order.

Reported by:    kp
Fixes:  0e62ebd20172 ("bhyve: Move the slirp backend out into a separate process")

(cherry picked from commit b0c7eaf83d21bbc333e247ab9e136965b3ca54ed)
DeltaFile
+5-5usr.sbin/bhyve/slirp/slirp-helper.c
+5-51 files

FreeBSD/src a642464sys/netinet ip_divert.c

divert: Avoid using atomic_(load|store)_(acq|rel)_16

It's not implemented on some arches.  Use a plain int to count the
number of sockets in a divert lbgroup.

Reported by:    Jenkins
Fixes:          895a0ae67fe2 ("divert: Define semantics for SO_REUSEPORT_LB on divert sockets")

(cherry picked from commit c564074c9aaa8a3f9273de3cb802edcb3e2e2a40)
DeltaFile
+7-5sys/netinet/ip_divert.c
+7-51 files

FreeBSD/src 2a809c7lib/libsys getsockopt.2, share/man/man4 divert.4

divert: Define semantics for SO_REUSEPORT_LB on divert sockets

Allow SO_REUSEPORT_LB to be set on divert sockets.  If set, then bind()
will add the socket to a "load-balancing group".  When a divert-to rule
matches a port with an associated group, the corresponding state ID is
used to select a specific socket from the group.  Packets without an
associated state are simply forwarded to the first socket in the group.
For now I only pass a state ID from pf, as I couldn't see a useful
identifier on the ipfw side.

This implementation is simple but has a caveat, that being that if
sockets are added to the group while flows are being processed, the size
of the group will change and this changes the mapping of state IDs to
sockets.  So, to get a consistent mapping, the divert socket application
must bind all of its sockets before any traffic is diverted by the
firewall.

Reviewed by:    glebius
MFC after:      1 month

    [5 lines not shown]
DeltaFile
+143-17sys/netinet/ip_divert.c
+21-3share/man/man4/divert.4
+5-1lib/libsys/getsockopt.2
+1-1sys/netinet/ip_var.h
+1-1sys/netinet/raw_ip.c
+1-1sys/netpfil/ipfw/ip_fw_pfil.c
+172-241 files not shown
+173-257 files

FreeBSD/src c82aeeecontrib/expat Changes, contrib/expat/lib xmlparse.c memory_sanitizer.h

contrib/expat: import expat 2.8.2

Changes: https://github.com/libexpat/libexpat/blob/R_2_8_2/expat/Changes

Security:       CVE-2026-50219
Security:       CVE-2026-56131
Security:       CVE-2026-56132
Security:       CVE-2026-56403
Security:       CVE-2026-56404
Security:       CVE-2026-56405
Security:       CVE-2026-56406
Security:       CVE-2026-56407
Security:       CVE-2026-56408
Security:       CVE-2026-56409
Security:       CVE-2026-56410
Security:       CVE-2026-56411
Security:       CVE-2026-56412
MFC after:      1 week
DeltaFile
+660-550contrib/expat/lib/xmlparse.c
+76-31contrib/expat/xmlwf/xmlwf.c
+90-2contrib/expat/Changes
+51-2contrib/expat/tests/handlers.c
+51-0contrib/expat/lib/memory_sanitizer.h
+49-0contrib/expat/lib/fallthrough.h
+977-58529 files not shown
+1,235-66435 files

FreeBSD/src 28bb687. Changes, lib xmlparse.c memory_sanitizer.h

Vendor import of expat 2.8.2
DeltaFile
+660-550lib/xmlparse.c
+76-31xmlwf/xmlwf.c
+90-2Changes
+51-2tests/handlers.c
+51-0lib/memory_sanitizer.h
+49-0lib/fallthrough.h
+977-58527 files not shown
+1,230-65933 files

FreeBSD/src 00b0ea9share/man/man7 arch.7

arch.7: used title case for .Ss headings

Do capitalize "size".  Don't gratutiously capitalize "char" any more
than we do "make" further down.

Reviewed by:    emaste
Sponsored by:   DARPA, AFRL
Differential Revision:  https://reviews.freebsd.org/D57820
DeltaFile
+3-3share/man/man7/arch.7
+3-31 files

FreeBSD/src b94f438share/man/man9 bcopy.9 memcpy.9

Add kernel manpages for bcopy, memcpy, and memmove

We will add variants of memcpy and memmove to support CHERI so
bootstrap the manpages from section 3.

Mark bcopy as deprecated.

Reviewed by:    imp, kib, emaste
Effort:         CHERI upstreaming
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D57661
DeltaFile
+98-0share/man/man9/bcopy.9
+78-0share/man/man9/memcpy.9
+66-0share/man/man9/memmove.9
+3-0share/man/man9/Makefile
+245-04 files

FreeBSD/src 3584cdesys/kern kern_jail.c

jail: clean up locking around do_jail_attach

jail_attach_jd passed PD_DEREF to do_jail_attach, assuming it would take
care of freeing the held prison. This is not true, as do_jail_attach
immediately cleared that flag, leaving the jail stock in dying state
when it is later removed.

Reported by:    markj
Reviewed by:    markj
MFC after:      3 days
Differential Revision:  <https://reviews.freebsd.org/D57674>
DeltaFile
+43-33sys/kern/kern_jail.c
+43-331 files

FreeBSD/src 4ffa7e1sys/kern kern_osd.c

kern: osd: trash a slot's methods upon deregistration

This both lets us quickly identify a slot that's been deallocated while
debugging, and forces us to take a fault if something tries to call one
of the methods anyways somehow with osd_destructors[slot - 1] == NULL.

Reviewed by:    imp, jamie
Differential Revision:  https://reviews.freebsd.org/D48075
DeltaFile
+12-0sys/kern/kern_osd.c
+12-01 files

FreeBSD/src 72ebcfasys/kern kern_osd.c

kern: osd: abstract away the math for locating a slot method

It's relatively simple, but we'll do it a couple of times; pull it
out into a macro.

Reviewed by:    imp (previous version), jamie
Differential Revision:  https://reviews.freebsd.org/D48074
DeltaFile
+6-4sys/kern/kern_osd.c
+6-41 files

FreeBSD/src 65fba08usr.sbin/adduser adduser.sh

adduser: Normalize supplemental groups

Rather than insist on a space-separated list, normalize the input so
that any number of spaces, commas, colons, or semicolons are accepted.

Reviewed by:    bcr
Differential Revision:  https://reviews.freebsd.org/D57774
DeltaFile
+2-2usr.sbin/adduser/adduser.sh
+2-21 files

FreeBSD/src 4d299a7usr.sbin/iostat iostat.8

iostat.8: Expand -w description

PR:             194781
MFC after:      3 days
Reviewed by:    ziaee
Event:          Halifax Hackathon 202606
DeltaFile
+6-1usr.sbin/iostat/iostat.8
+6-11 files

FreeBSD/src 40e0547share/man/man4 fwcam.4 Makefile, sys/dev/firewire fwcam.c fwcam.h

fwcam: add IIDC 1394 FireWire camera driver

Add fwcam(4), a driver for IIDC v1.30 (TA Document 1999023) digital
cameras over IEEE 1394.

Supports Format_0 (VGA) video modes with isochronous receive DMA,
feature control (brightness, exposure, gain, shutter, white balance,
focus, etc.), poll/kqueue, and hot-plug via bus reset handling.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D57685
DeltaFile
+1,051-0sys/dev/firewire/fwcam.c
+263-0sys/dev/firewire/fwcam.h
+116-0share/man/man4/fwcam.4
+11-0sys/modules/firewire/fwcam/Makefile
+1-0sys/modules/firewire/Makefile
+1-0share/man/man4/Makefile
+1,443-02 files not shown
+1,445-08 files

FreeBSD/src af20f01sys/dev/firewire fw_helpers.h

firewire: add shared helpers for ISO receive drivers

Add fw_helpers.h with common static inline helpers for FireWire ISO
receive drivers: async xfer wait with timeout and tlabel cleanup,
quadlet read/write, and ISO mbuf management.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D57684
DeltaFile
+290-0sys/dev/firewire/fw_helpers.h
+290-01 files

FreeBSD/src 104b311sys/dev/asmc asmc.c

asmc: Refactor sensor detection and sysctl registration

Replace repeated per-sensor-type blocks for voltage, current, power,
and ambient light sensors with table-driven loops.

Reviewed by:    ngie, adrian
Differential Revision:  https://reviews.freebsd.org/D57595
DeltaFile
+65-78sys/dev/asmc/asmc.c
+65-781 files

FreeBSD/src f6cb220sys/x86/cpufreq hwpstate_intel.c

hwpstate_intel(4): Fix error tests

How I failed to notice this during the review will remain a mistery.

Fixes:          29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind")
Event:          Halifax Hackathon 202606
Location:       jrm@'s bathroom
Sponsored by:   The FreeBSD Foundation
DeltaFile
+19-13sys/x86/cpufreq/hwpstate_intel.c
+19-131 files

FreeBSD/src e4fdaaacrypto/heimdal/appl/login login.1, crypto/heimdal/appl/telnet/telnet telnet.1

heimdal: Fix some manpage typos

Reviewed by:    hrs
Event:          Halifax Hackathon 202606
Location:       jrm@'s couch
DeltaFile
+1-1crypto/heimdal/appl/login/login.1
+1-1crypto/heimdal/appl/telnet/telnet/telnet.1
+2-22 files

FreeBSD/src 5f43a84. .git-blame-ignore-revs

.git-blame-ignore-revs: sys/kern/kern_cpu.c whitespace changes

Event:          Halifax Hackathon 202606
Location:       jrm@'s kitchen
Sponsored by:   The FreeBSD Foundation
DeltaFile
+2-0.git-blame-ignore-revs
+2-01 files

FreeBSD/src 3525528sys/kern kern_cpu.c

cpufreq: Fix the incorrect format

Event:          Halifax Hackathon 202606
Location:       jrm@'s dining room
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57275
DeltaFile
+3-3sys/kern/kern_cpu.c
+3-31 files

FreeBSD/src 7b10734sys/x86/cpufreq hwpstate_amd.c

hwpstate_amd(4): Rename remaining 'struct set_autonomous_hwp_data'

For consistency.

No functional change (intended).

Fixes:          c6a0eb7ada62 ("hwpstate_amd(4): Rename '*set_autonomous_hwp*()' => 'enable_cppc*()'")
Event:          Halifax Hackathon 202606
Location:       jrm@'s living room
Sponsored by:   The FreeBSD Foundation
DeltaFile
+3-3sys/x86/cpufreq/hwpstate_amd.c
+3-31 files

FreeBSD/src d082115lib/libsys kqueue.2

kqueue.2: knote is activated as the first action of tdsendsignal()

(cherry picked from commit df8ca3f89aa2b2c374886cc39b24c76796d7db9a)
DeltaFile
+1-1lib/libsys/kqueue.2
+1-11 files

FreeBSD/src b4bbe15sys/amd64/amd64 exception.S

amd64: do not restore fsbase/gsbase for 32bit processes

(cherry picked from commit c7e5802ab6e6230a5782a09c914585d055eb5223)
DeltaFile
+31-0sys/amd64/amd64/exception.S
+31-01 files

FreeBSD/src 41e974asys/x86/x86 ucode.c

x86/ucode.c: supposedly fix i386 compilation

PR:     295926

(cherry picked from commit f4cd99131c70e8be2a793d939b644e20bbbd3374)
DeltaFile
+1-1sys/x86/x86/ucode.c
+1-11 files

FreeBSD/src b94b531sys/dev/efidev efirt.c

efirt(9): carefully destroy efi_lock

(cherry picked from commit 8edcb37dd0753dc7e50044d9ccf0e991392a3d84)
DeltaFile
+7-5sys/dev/efidev/efirt.c
+7-51 files

FreeBSD/src 9817261sys/dev/efidev efirt.c

efirt(9): in verbose mode, announce the attachment and fw spec version

(cherry picked from commit 43fb5b33b00f3b66ec03ab3e0ea002afd16cb7b3)
DeltaFile
+8-1sys/dev/efidev/efirt.c
+8-11 files