FreeBSD/src 9d50245 — sys/amd64/include ieeefp.h, sys/arm/include ieeefp.h

machine/ieeefp.h: include <sys/cdefs.h>

The <machine/ieeefp.h> headers wrap their deprecated FPU control
prototypes in __BEGIN_DECLS/__END_DECLS but rely on the includer to
have pulled in <sys/cdefs.h>.  Including <floatingpoint.h> first on
arm, arm64, powerpc and riscv (or amd64 <machine/ieeefp.h> with
__IEEEFP_NOINLINES__) fails with "unknown type name '__BEGIN_DECLS'".
This breaks e.g. devel/py-pyinstaller.

Suggested by:   jhb
Reviewed by:    jhb
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59659
DeltaFile
+2-0sys/riscv/include/ieeefp.h
+2-0sys/powerpc/include/ieeefp.h
+2-0sys/arm64/include/ieeefp.h
+2-0sys/arm/include/ieeefp.h
+1-0sys/amd64/include/ieeefp.h
+9-05 files

FreeBSD/src 99a3150 — usr.sbin/bhyve pci_hda.c

bhyve: Improve HDA stream descriptor validation

The length of each block in the stream must be non-zero.  This is
assumed in hda_transfer(), otherwise an out-of-bounds read or write is
possible.

Use atomic loads to access stream descriptor fields, since they are
guest-controlled.  Make sure that the descriptor array is suitably
aligned so that we can drop the __packed annotation from the structure
definition; per section 3.3.42 of the HDA spec the BDL pointer is
supposed to be 128-byte aligned, in fact.

Approved by:    so
Security:       FreeBSD-SA-26:72.bhyve
Security:       CVE-2026-101310
Reported by:    Brian Delgado from Intel using Anthropic Opus 4.8
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60678
DeltaFile
+15-8usr.sbin/bhyve/pci_hda.c
+15-81 files

FreeBSD/src fa7fe70 — usr.sbin/bhyve bhyvegc.h rfb.c

bhyve: Fix handling of framebuffer resizing

The rfb code maintains an array of CRCs for 32x32 tiles in the
framebuffer.  This array is sized statically based on the rfb code's
notion of the maximum framebuffer size, which changed in commit
fb51ddb20d57 without updating the rfb code.

Morever, writes to the framebuffer BAR can modify the recorded height
and width of the framebuffer.  These values were not validated against
the maximum at all, unlike the parameters set via bhyve config.

Fix these problems:
- Define the maximum width and height in a shared header file so that
  they do not get out of sync again.
- In pci_fbuf_render(), don't resize the console if the new dimensions
  are too large.
- Add a mutex to synchronize framebuffer BAR I/O with the rfb thread.

Approved by:    so

    [5 lines not shown]
DeltaFile
+36-17usr.sbin/bhyve/pci_fbuf.c
+3-3usr.sbin/bhyve/rfb.c
+3-0usr.sbin/bhyve/bhyvegc.h
+42-203 files

FreeBSD/src d3b8957 — sys/dev/sound/pcm channel.c buffer.c, tests/sys/sound mmap.c

sound: Revalidate after reacquiring locks when resizing buffers

sndbuf_resize() and sndbuf_remalloc() drop the channel lock in order to
allocate the new buffer(s) with M_WAITOK.  Before doing that they verify
that the buffer is not mapped, but this could change while the lock is
dropped, as there is no higher-level synchronization which prevents
buffer resize (e.g., via the SNDCTL_DSP_SETBLKSIZE ioctl) from happening
concurrently with mmap.  Thus, these checks are insufficient.

Modify sndbuf_resize() and sndbuf_remalloc() to revalidate after
reacquiring the lock.  Extend them to check for a couple of channel
flags, mirroring the check in chn_resizebuf().  Modify chn_resizebuf()
to revalidate state after reacquiring the channel lock.

We could also allocate new buffers with M_NOWAIT and so avoid dropping
the lock.  Then, I think we could go even further and invoke
CHANNEL_SETBLOCKSIZE and CHANNEL_SETFRAGMENTS with the channel lock
held.  But really it would be better to ensure that dsp operations are
serialized; there is no reason for mmap and chn_resizebuf() to be able

    [10 lines not shown]
DeltaFile
+58-0tests/sys/sound/mmap.c
+35-10sys/dev/sound/pcm/buffer.c
+9-2sys/dev/sound/pcm/channel.c
+102-123 files

FreeBSD/src 9596b25 — usr.sbin/bhyve pci_xhci.c

bhyve: Fix handling of the xhci event ring

rts->erst_p and rts->erstba_p are pointers to guest-controlled memory
which describe the event rings and pending event array, respectively.
The device model was not validating the size nor saving the value.
As a result, the bounds checks in pci_xhci_insert_event() were
susceptible to TOCTOU races.

Fix pci_xhci_rtsregs_write() to save the ring size in a softc field.
Validate that the size isn't larger than the maximum allowed by the XHCI
specification (64KB, or 4096 TRBs).

When processing TRBs, make sure we don't load fields more than once.
Make sure that pci_xhci_trb_next() doesn't return a pointer to host
memory.  When handling ERDP writes, make sure that the guest-supplied
address is actually a pointer into the TRB array, and ignore the write
if not.

Approved by:    so

    [4 lines not shown]
DeltaFile
+99-65usr.sbin/bhyve/pci_xhci.c
+99-651 files

FreeBSD/src 44d74b1 — sys/dev/sound/pci es137x.c envy24ht.c, sys/dev/sound/pcm channel.c

sound: Check for errors from sndbuf_resize()

Most implementations of CHANNEL_SETBLOCKSIZE and CHANNEL_SETFRAGMENTS
were not checking this.  This is probably not a big problem: it's
unlikely for sndbuf_resize() to fail due to the refcount check in this
case since it's operating on the hardware buffer, which doesn't get
mmaped.  But, I will add more reasons for it to fail in the next patch,
so let's be more careful.

This change modifies various CHANNEL_SETBLOCKSIZE implementations to
check for errors.  In some cases I reordered things to avoid updating
driver state until after sndbuf_resize() succeeds.

Return 0 from CHANNEL_SETBLOCKSIZE to indicate an error, as it otherwise
returns the new block size.  We could change the interface to return
both an error number and a block size, but that would break at least one
out-of-tree driver and I wish to avoid that here.  Make sure that errors
from CHANNEL_SETFRAGMENTS are returned to userspace.


    [4 lines not shown]
DeltaFile
+28-9sys/dev/sound/pcm/channel.c
+12-9sys/dev/sound/pci/ich.c
+9-7sys/dev/sound/pci/envy24ht.c
+9-7sys/dev/sound/pci/envy24.c
+5-9sys/dev/sound/usb/uaudio.c
+8-4sys/dev/sound/pci/es137x.c
+71-4514 files not shown
+117-7620 files

FreeBSD/src 6f22ca1 — usr.sbin/bhyve pci_hda.c

bhyve: Improve HDA stream descriptor validation

The length of each block in the stream must be non-zero.  This is
assumed in hda_transfer(), otherwise an out-of-bounds read or write is
possible.

Use atomic loads to access stream descriptor fields, since they are
guest-controlled.  Make sure that the descriptor array is suitably
aligned so that we can drop the __packed annotation from the structure
definition; per section 3.3.42 of the HDA spec the BDL pointer is
supposed to be 128-byte aligned, in fact.

Approved by:    so
Security:       FreeBSD-SA-26:72.bhyve
Security:       CVE-2026-101310
Reported by:    Brian Delgado from Intel using Anthropic Opus 4.8
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60678
DeltaFile
+12-8usr.sbin/bhyve/pci_hda.c
+12-81 files

FreeBSD/src 820fb57 — sys/dev/sound/pci envy24ht.c envy24.c, sys/dev/sound/pci/hda hdaa.c

sound: Check for errors from sndbuf_resize()

Most implementations of CHANNEL_SETBLOCKSIZE and CHANNEL_SETFRAGMENTS
were not checking this.  This is probably not a big problem: it's
unlikely for sndbuf_resize() to fail due to the refcount check in this
case since it's operating on the hardware buffer, which doesn't get
mmaped.  But, I will add more reasons for it to fail in the next patch,
so let's be more careful.

This change modifies various CHANNEL_SETBLOCKSIZE implementations to
check for errors.  In some cases I reordered things to avoid updating
driver state until after sndbuf_resize() succeeds.

Return 0 from CHANNEL_SETBLOCKSIZE to indicate an error, as it otherwise
returns the new block size.  We could change the interface to return
both an error number and a block size, but that would break at least one
out-of-tree driver and I wish to avoid that here.  Make sure that errors
from CHANNEL_SETFRAGMENTS are returned to userspace.


    [4 lines not shown]
DeltaFile
+28-9sys/dev/sound/pcm/channel.c
+13-10sys/dev/sound/pci/ich.c
+9-7sys/dev/sound/pci/envy24ht.c
+9-7sys/dev/sound/pci/envy24.c
+5-9sys/dev/sound/usb/uaudio.c
+8-4sys/dev/sound/pci/hda/hdaa.c
+72-4616 files not shown
+124-8322 files

FreeBSD/src 07eacba — sys/dev/sound/pcm channel.c buffer.c, tests/sys/sound mmap.c

sound: Revalidate after reacquiring locks when resizing buffers

sndbuf_resize() and sndbuf_remalloc() drop the channel lock in order to
allocate the new buffer(s) with M_WAITOK.  Before doing that they verify
that the buffer is not mapped, but this could change while the lock is
dropped, as there is no higher-level synchronization which prevents
buffer resize (e.g., via the SNDCTL_DSP_SETBLKSIZE ioctl) from happening
concurrently with mmap.  Thus, these checks are insufficient.

Modify sndbuf_resize() and sndbuf_remalloc() to revalidate after
reacquiring the lock.  Extend them to check for a couple of channel
flags, mirroring the check in chn_resizebuf().  Modify chn_resizebuf()
to revalidate state after reacquiring the channel lock.

We could also allocate new buffers with M_NOWAIT and so avoid dropping
the lock.  Then, I think we could go even further and invoke
CHANNEL_SETBLOCKSIZE and CHANNEL_SETFRAGMENTS with the channel lock
held.  But really it would be better to ensure that dsp operations are
serialized; there is no reason for mmap and chn_resizebuf() to be able

    [10 lines not shown]
DeltaFile
+58-0tests/sys/sound/mmap.c
+31-4sys/dev/sound/pcm/buffer.c
+9-2sys/dev/sound/pcm/channel.c
+98-63 files

FreeBSD/src 3545fc6 — sys/dev/sound/pci envy24ht.c envy24.c, sys/dev/sound/pci/hda hdaa.c

sound: Check for errors from sndbuf_resize()

Most implementations of CHANNEL_SETBLOCKSIZE and CHANNEL_SETFRAGMENTS
were not checking this.  This is probably not a big problem: it's
unlikely for sndbuf_resize() to fail due to the refcount check in this
case since it's operating on the hardware buffer, which doesn't get
mmaped.  But, I will add more reasons for it to fail in the next patch,
so let's be more careful.

This change modifies various CHANNEL_SETBLOCKSIZE implementations to
check for errors.  In some cases I reordered things to avoid updating
driver state until after sndbuf_resize() succeeds.

Return 0 from CHANNEL_SETBLOCKSIZE to indicate an error, as it otherwise
returns the new block size.  We could change the interface to return
both an error number and a block size, but that would break at least one
out-of-tree driver and I wish to avoid that here.  Make sure that errors
from CHANNEL_SETFRAGMENTS and CHANNEL_SETBLOCKSIZE are returned to
userspace.

    [6 lines not shown]
DeltaFile
+28-9sys/dev/sound/pcm/channel.c
+13-10sys/dev/sound/pci/ich.c
+9-7sys/dev/sound/pci/envy24ht.c
+9-7sys/dev/sound/pci/envy24.c
+5-9sys/dev/sound/usb/uaudio.c
+8-4sys/dev/sound/pci/hda/hdaa.c
+72-4617 files not shown
+124-8223 files

FreeBSD/src 81b9fcf — usr.sbin/bhyve pci_hda.c

bhyve: Improve HDA stream descriptor validation

The length of each block in the stream must be non-zero.  This is
assumed in hda_transfer(), otherwise an out-of-bounds read or write is
possible.

Use atomic loads to access stream descriptor fields, since they are
guest-controlled.  Make sure that the descriptor array is suitably
aligned so that we can drop the __packed annotation from the structure
definition; per section 3.3.42 of the HDA spec the BDL pointer is
supposed to be 128-byte aligned, in fact.

Approved by:    so
Security:       FreeBSD-SA-26:72.bhyve
Security:       CVE-2026-101310
Reported by:    Brian Delgado from Intel using Anthropic Opus 4.8
Reviewed by:    christos
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60678
DeltaFile
+12-8usr.sbin/bhyve/pci_hda.c
+12-81 files

FreeBSD/src 9a406a9 — sys/netinet/tcp_stacks tcp_rack.h rack_pcm.c

tcp/rack: Fix a potential overflow in rack_update_pcm_ack()

The RACK stack's path capacity measurement module maintains an array of
samples, updated when the stack receives an ACK.  The array grows as
needed, but code which handles the expansion is susceptible to remotely
triggerable overflow.  This could lead to underallocation and a ~512KB
out-of-bounds write.

Fix this by bounding the sample array size.

Approved by:    so
Security:       FreeBSD-SA-26:70.tcp
Security:       CVE-2026-101307
Reviewed by:    glebius, markj
Reported by:    Nozomi Networks Security Research
DeltaFile
+11-6sys/netinet/tcp_stacks/rack_pcm.c
+4-2sys/netinet/tcp_stacks/tcp_rack.h
+15-82 files

FreeBSD/src ac6f951 — usr.sbin/bhyve bhyvegc.h rfb.c

bhyve: Fix handling of framebuffer resizing

The rfb code maintains an array of CRCs for 32x32 tiles in the
framebuffer.  This array is sized statically based on the rfb code's
notion of the maximum framebuffer size, which changed in commit
fb51ddb20d57 without updating the rfb code.

Morever, writes to the framebuffer BAR can modify the recorded height
and width of the framebuffer.  These values were not validated against
the maximum at all, unlike the parameters set via bhyve config.

Fix these problems:
- Define the maximum width and height in a shared header file so that
  they do not get out of sync again.
- In pci_fbuf_render(), don't resize the console if the new dimensions
  are too large.
- Add a mutex to synchronize framebuffer BAR I/O with the rfb thread.

Approved by:    so

    [5 lines not shown]
DeltaFile
+40-19usr.sbin/bhyve/pci_fbuf.c
+3-3usr.sbin/bhyve/rfb.c
+3-0usr.sbin/bhyve/bhyvegc.h
+46-223 files

FreeBSD/src 47d2d50 — sys/dev/sound/pcm channel.c buffer.c, tests/sys/sound mmap.c

sound: Revalidate after reacquiring locks when resizing buffers

sndbuf_resize() and sndbuf_remalloc() drop the channel lock in order to
allocate the new buffer(s) with M_WAITOK.  Before doing that they verify
that the buffer is not mapped, but this could change while the lock is
dropped, as there is no higher-level synchronization which prevents
buffer resize (e.g., via the SNDCTL_DSP_SETBLKSIZE ioctl) from happening
concurrently with mmap.  Thus, these checks are insufficient.

Modify sndbuf_resize() and sndbuf_remalloc() to revalidate after
reacquiring the lock.  Extend them to check for a couple of channel
flags, mirroring the check in chn_resizebuf().  Modify chn_resizebuf()
to revalidate state after reacquiring the channel lock.

We could also allocate new buffers with M_NOWAIT and so avoid dropping
the lock.  Then, I think we could go even further and invoke
CHANNEL_SETBLOCKSIZE and CHANNEL_SETFRAGMENTS with the channel lock
held.  But really it would be better to ensure that dsp operations are
serialized; there is no reason for mmap and chn_resizebuf() to be able

    [11 lines not shown]
DeltaFile
+58-0tests/sys/sound/mmap.c
+31-4sys/dev/sound/pcm/buffer.c
+9-2sys/dev/sound/pcm/channel.c
+98-63 files

FreeBSD/src 07c15b7 — usr.sbin/bhyve bhyvegc.h rfb.c

bhyve: Fix handling of framebuffer resizing

The rfb code maintains an array of CRCs for 32x32 tiles in the
framebuffer.  This array is sized statically based on the rfb code's
notion of the maximum framebuffer size, which changed in commit
fb51ddb20d57 without updating the rfb code.

Morever, writes to the framebuffer BAR can modify the recorded height
and width of the framebuffer.  These values were not validated against
the maximum at all, unlike the parameters set via bhyve config.

Fix these problems:
- Define the maximum width and height in a shared header file so that
  they do not get out of sync again.
- In pci_fbuf_render(), don't resize the console if the new dimensions
  are too large.
- Add a mutex to synchronize framebuffer BAR I/O with the rfb thread.

Approved by:    so

    [5 lines not shown]
DeltaFile
+40-19usr.sbin/bhyve/pci_fbuf.c
+3-3usr.sbin/bhyve/rfb.c
+3-0usr.sbin/bhyve/bhyvegc.h
+46-223 files

FreeBSD/src 1d14ab1 — usr.sbin/bhyve pci_xhci.c

bhyve: Fix handling of the xhci event ring

rts->erst_p and rts->erstba_p are pointers to guest-controlled memory
which describe the event rings and pending event array, respectively.
The device model was not validating the size nor saving the value.
As a result, the bounds checks in pci_xhci_insert_event() were
susceptible to TOCTOU races.

Fix pci_xhci_rtsregs_write() to save the ring size in a softc field.
Validate that the size isn't larger than the maximum allowed by the XHCI
specification (64KB, or 4096 TRBs).

When processing TRBs, make sure we don't load fields more than once.
Make sure that pci_xhci_trb_next() doesn't return a pointer to host
memory.  When handling ERDP writes, make sure that the guest-supplied
address is actually a pointer into the TRB array, and ignore the write
if not.

Approved by:    so

    [4 lines not shown]
DeltaFile
+99-65usr.sbin/bhyve/pci_xhci.c
+99-651 files

FreeBSD/src 57818a2 — sys/netinet/tcp_stacks tcp_rack.h rack_pcm.c

tcp/rack: Fix a potential overflow in rack_update_pcm_ack()

The RACK stack's path capacity measurement module maintains an array of
samples, updated when the stack receives an ACK.  The array grows as
needed, but code which handles the expansion is susceptible to remotely
triggerable overflow.  This could lead to underallocation and a ~512KB
out-of-bounds write.

Fix this by bounding the sample array size.

Approved by:    so
Security:       FreeBSD-SA-26:70.tcp
Security:       CVE-2026-101307
Reviewed by:    glebius, markj
Reported by:    Nozomi Networks Security Research
DeltaFile
+11-6sys/netinet/tcp_stacks/rack_pcm.c
+4-2sys/netinet/tcp_stacks/tcp_rack.h
+15-82 files

FreeBSD/src 719b159 — usr.sbin/bhyve pci_xhci.c

bhyve: Fix handling of the xhci event ring

rts->erst_p and rts->erstba_p are pointers to guest-controlled memory
which describe the event rings and pending event array, respectively.
The device model was not validating the size nor saving the value.
As a result, the bounds checks in pci_xhci_insert_event() were
susceptible to TOCTOU races.

Fix pci_xhci_rtsregs_write() to save the ring size in a softc field.
Validate that the size isn't larger than the maximum allowed by the XHCI
specification (64KB, or 4096 TRBs).

When processing TRBs, make sure we don't load fields more than once.
Make sure that pci_xhci_trb_next() doesn't return a pointer to host
memory.  When handling ERDP writes, make sure that the guest-supplied
address is actually a pointer into the TRB array, and ignore the write
if not.

Approved by:    so

    [4 lines not shown]
DeltaFile
+99-65usr.sbin/bhyve/pci_xhci.c
+99-651 files

FreeBSD/src c83e075 — sys/amd64/vmm x86.c

amd64/vmm: Don't advertise support for performance counters

vmm doesn't implement them, and after commit 2272fac218a8
("hwpmc: Add support for AMD-only IRPERF in hwpmc PERF class"), FreeBSD
guests fail to boot since they access the unimplemented IRPERF MSR.

MFC after:      1 week
DeltaFile
+1-2sys/amd64/vmm/x86.c
+1-21 files

FreeBSD/src 29449b3 — sys/dev/sound/pci/hda hdaa.c

snd_hda: use the pin ELD to select DisplayPort audio framing

hdaa_audio_setup() reads the converter widget's ELD when choosing
between HDMI and DisplayPort audio infoframes. ELD is stored on the
output pin, so the converter has no ELD and the driver selects HDMI
framing even when the connected display uses DisplayPort.

Read the ELD from the output pin to select the correct audio framing.

The equivalent change was tested on DragonFly BSD with an Intel Kaby
Lake display-audio codec and an LG HDR 4K monitor connected over
DisplayPort. Before the change, converter node 2 had no ELD, while
output pin 5 had an 83-byte ELD identifying DisplayPort. Captured driver
commands programmed HDMI audio infoframe bytes (84 01 0a 70 01 00 00
00). After applying the change and rebooting, the commands used the
existing DisplayPort form (84 1b 44 01 00 00 00), and console tones and
desktop audio were audible.

PR:             299094

    [4 lines not shown]
DeltaFile
+2-2sys/dev/sound/pci/hda/hdaa.c
+2-21 files

FreeBSD/src fa4f5cc — share/man/man4 pcm.4, sys/dev/sound/pcm channel.c

pcm.4: Remove DIAGNOSTICS section

These diagnostics do not exist anymore.

MFC after:      1 week

(cherry picked from commit 25faf861089ca119528ea4da39fe594b1c5ca55a)
DeltaFile
+1-9share/man/man4/pcm.4
+1-1sys/dev/sound/pcm/channel.c
+2-102 files

FreeBSD/src 680957e — libexec/rc/rc.d mountd

rc.d/mountd: Do not require /etc/exports

mountd exits if it cannot read any exports files. Requiring
/etc/exports, however, unconditionally stops mountd from starting on a
server that exports ZFS datasets only (/etc/zfs/exports).

Let sbin/mountd handle requirements itself, instead of hardcoding
/etc/exports, which is also wrong, because different files can be
specified in mountd_flags.

This patch also works with nfsv4_server_enable="YES", by preserving the
behavior of failing to start if there is no "V4:" line in the exports
file, which is missing by default on ZFS-only exports.

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Reviewed by:    rmacklem, markj, emaste
Differential Revision:  https://reviews.freebsd.org/D60044

(cherry picked from commit 26203cca52621c215f60640bf59128dcd9780be7)
DeltaFile
+0-1libexec/rc/rc.d/mountd
+0-11 files

FreeBSD/src 4b3c29b — sys/kern vfs_vnops.c

kern/coredump_vnode.c: avoid dumping to the mount point we suspended

PR:     299095

(cherry picked from commit bea382f25b16fec0e9a1c2be130935e739075287)
DeltaFile
+45-1sys/kern/vfs_vnops.c
+45-11 files

FreeBSD/src d123138 — sys/kern vfs_vnops.c coredump_vnode.c, sys/sys vnode.h

vn_open_cred(): rename VN_OPEN_NAMECACHE flag to VN_OPEN_COREDUMP

(cherry picked from commit ccd44c5e4881ece004fa23d3b479d4ee57b2a58e)
DeltaFile
+2-2sys/kern/coredump_vnode.c
+1-1sys/sys/vnode.h
+1-1sys/kern/vfs_vnops.c
+4-43 files

FreeBSD/src c556f4e — sys/fs/nfs nfs_var.h, sys/fs/nfsclient nfs_clrpcops.c nfs_clcomsubs.c

nfscl: Fix oddball cases for session slot release

We have identified some cases where silent slot loss can occur
when operations on NFS mounts are aborted. We experience this
when using NFSv4.2, but it likely also occurs with NFSv4.1.

A slot is acquired for compound operations by nfsv4_setsequence()
and freed by newnfs_request(). Any call path that abandons the
compound before reaching newnfs_request() loses the slot permanently.

We identified four call sites where this happens, one of
which where it actually does happen for us in a semi-reproducible
way, which allowed us to develop a candidate patch, attached.

The patch adds one function, nfsv4_freeunsentslot(), to
nfs_clcomsubs.c. It is called from each of the four call
sites: nfsrpc_writerpc(), nfsrpc_writeds(), and two in
nfsrpc_setextattr().


    [11 lines not shown]
DeltaFile
+18-0sys/fs/nfsclient/nfs_clcomsubs.c
+4-0sys/fs/nfsclient/nfs_clrpcops.c
+2-0sys/fs/nfs/nfs_var.h
+24-03 files

FreeBSD/src cfd0d2c — sys/fs/nfs nfs_var.h, sys/fs/nfsclient nfs_clrpcops.c nfs_clcomsubs.c

nfscl: Fix oddball cases for session slot release

We have identified some cases where silent slot loss can occur
when operations on NFS mounts are aborted. We experience this
when using NFSv4.2, but it likely also occurs with NFSv4.1.

A slot is acquired for compound operations by nfsv4_setsequence()
and freed by newnfs_request(). Any call path that abandons the
compound before reaching newnfs_request() loses the slot permanently.

We identified four call sites where this happens, one of
which where it actually does happen for us in a semi-reproducible
way, which allowed us to develop a candidate patch, attached.

The patch adds one function, nfsv4_freeunsentslot(), to
nfs_clcomsubs.c. It is called from each of the four call
sites: nfsrpc_writerpc(), nfsrpc_writeds(), and two in
nfsrpc_setextattr().


    [11 lines not shown]
DeltaFile
+18-0sys/fs/nfsclient/nfs_clcomsubs.c
+4-0sys/fs/nfsclient/nfs_clrpcops.c
+2-0sys/fs/nfs/nfs_var.h
+24-03 files

FreeBSD/src fe90f18 — sys/kern subr_epoch.c

epoch: Queue drain callbacks from each CPU's callback task

epoch_drain_callbacks() bound the calling thread to each CPU in turn
to queue a callback on that CPU's record.  Callers are often user
threads, such as kldunload or ifconfig destroy, and ULE does not
preempt a CPU-bound thread for a migrating thread of no better
priority, so each bind could wait out a time slice.  On an 8-CPU VM
with six busy loops running, destroying an epair interface took 1.5 s
and kldunload pflow 0.8 s.

Instead, set a request flag on each record and enqueue that CPU's
callback task, which queues the callback before it polls the record.
The task runs on the CPU's softirq gtaskqueue thread at PI_SOFT, which
preempts a busy user thread, so the request is served at once; the
caller no longer migrates.  Both operations now take under 10 ms, idle
or under load.

Reviewed by:            markj
Sponsored by:           Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D60646
DeltaFile
+19-42sys/kern/subr_epoch.c
+19-421 files

FreeBSD/src 34e92fb — libexec/rc hooks.sh

hooks.sh allow running DebugO{n,ff} from hooks_run

We need to watch out for _debugO{n,ff}_hooks.

Also add add_list (hook lists are just lists).

Fix bug in hooks_has() - should look for $2 in list.
DeltaFile
+32-3libexec/rc/hooks.sh
+32-31 files

FreeBSD/src 4a65e12 — share/dict web2

dict: Add "macho"

Macho is a perfectly cromulent word, in both Merriam-Webster and OED.

Reviewed by:    imp
Differential Revision: https://reviews.freebsd.org/D60713
DeltaFile
+1-0share/dict/web2
+1-01 files

FreeBSD/src 9fd9039 — tests/sys/netinet6 ra.py ndp.sh

tests: Add SLAAC interface identifier cases to ndp.sh

Cover the interface identifier selection in in6_ifadd(): a /64
link-local address provides the identifier, while a /128 link-local
address or no link-local address at all yields the EUI-64 identifier
derived from the MAC address.  Each case asserts the exact
autoconfigured address.  ndp_prefix_len_mismatch reaches the same
fallback with a /127 link-local address, but only checks that some
address was configured.

Stable addresses (RFC 7217) are the default and bypass both paths, so
the host disables them.  The advertisement goes to all nodes, and an
interface only joins that group with its first address, so the case
without a link-local address gives the host a static address from
another prefix.

ra.py now takes the Ethernet source address from --sendif rather than
from a route lookup; for ff02::1 that lookup fails in scapy 2.7.0.


    [4 lines not shown]
DeltaFile
+159-0tests/sys/netinet6/ndp.sh
+1-1tests/sys/netinet6/ra.py
+160-12 files