FreeBSD/src 3cf8333sys/dev/sound/pcm vchan.c vchan.h

sound: Remove vchan_passthrough() and hw.snd.passthrough_verbose

Unused and confusing.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit 3612ef642f511a1bd9f759da87abeafe7d6ff110)
DeltaFile
+0-18sys/dev/sound/pcm/vchan.c
+0-5sys/dev/sound/pcm/vchan.h
+0-232 files

FreeBSD/src 068b20esys/dev/sound/pcm channel.c

sound: Fix KASSERT panics in chn_read() and chn_write()

INVARIANTS kernels may trigger a KASSERT panic from sndbuf_acquire(),
when fuzzing write(2) using stress2, because of a race in chn_write().

In the case of chn_write(), what sndbuf_acquire() does is extend the
ready-to-read area of the buffer by a specified amount of bytes. The
KASSERT in question makes sure the number of bytes we want to extend the
ready area by, is less than or equal to the number of free bytes in the
buffer. This makes sense, because we cannot extend the ready area to
something larger than what is available (i.e., free) in the first place.

What chn_write() currently does for every write is; calculate the
appropriate write size, let's say X, unlock the channel, uiomove() X
bytes to the channel's buffer, lock the channel, and call
sndbuf_acquire() to extend the ready area by X bytes. The problem with
this approach, however, is the following.

Suppose an empty channel buffer with a length of 1024 bytes, and 2

    [45 lines not shown]
DeltaFile
+22-48sys/dev/sound/pcm/channel.c
+22-481 files

FreeBSD/src 35232d8share/doc/papers/malloc implementation.ms performance.ms

papers: Retire phkmalloc paper

It has not been installed since commit cdc37953165c ("In preparation for
the removal of the roff toolchain, disconnect the") and turned up in
a search for outdated MALLOC_OPTIONS settings.

The rendered paper is available at
https://papers.freebsd.org/1998/phk-malloc

PR:             287357
Reviewed by:    bapt
Event:          Kitchener-Waterloo Hackathon 202506
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50908
DeltaFile
+0-223share/doc/papers/malloc/implementation.ms
+0-111share/doc/papers/malloc/performance.ms
+0-72share/doc/papers/malloc/intro.ms
+0-70share/doc/papers/malloc/malloc.ms
+0-54share/doc/papers/malloc/kernel.ms
+0-52share/doc/papers/malloc/problems.ms
+0-5825 files not shown
+0-71211 files

FreeBSD/src 5198c32sys/dev/vt vt_core.c

vt: Allow VT_SETMODE with frsig=0

Linux does not check that any of the signals in vt_mode VT_SETMODE ioctl
(relsig, acqsig, frsig) are valid, but FreeBSD required that all three
are valid.  frsig is unusued in both Linux and FreeBSD, and software
typically leaves it unset.  To improve portability, allow frsig to be
set to zero.

PR:             289812
Reported by:    Dušan Gvozdenović
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52835
DeltaFile
+3-3sys/dev/vt/vt_core.c
+3-31 files

FreeBSD/src ddec420sys/netpfil/ipfilter/netinet fil.c ip_nat.c

ipfilter: fix broken build

Every commit earns me a dozen emails that LINT is broken. This should
stop that.

Fixes: eda1756d0454f ipfilter: Verify frentry on entry into kernel
Sponsored by: Netflix
DeltaFile
+1-3sys/netpfil/ipfilter/netinet/fil.c
+0-3sys/netpfil/ipfilter/netinet/ip_nat.c
+1-62 files

FreeBSD/src eb90470sys/modules/mqueue Makefile

mqueuefs: Export another symbol required by linux.ko

Fixes: e00a781c216c ("mqueue: Export kern_kmq_* symbols from kernel module")
Sponsored by:   The FreeBSD Foundation
DeltaFile
+2-1sys/modules/mqueue/Makefile
+2-11 files

FreeBSD/src 78c6cfdsys/netpfil/ipfilter/netinet fil.c

ipfilter: Restore used variable

One of the "unused" i variables is actually used.

Fixes:          20c48f090b27
DeltaFile
+1-1sys/netpfil/ipfilter/netinet/fil.c
+1-11 files

FreeBSD/src 20c48f0sys/netpfil/ipfilter/netinet fil.c ip_nat.c

ipfilter: Remove unused variable

Reported by:    jlduran
Fixes:          eda1756d0454, 821774dfbdaa
MFC after:      1 week
X-MFC with:     eda1756d0454, 821774dfbdaa
DeltaFile
+1-1sys/netpfil/ipfilter/netinet/fil.c
+1-1sys/netpfil/ipfilter/netinet/ip_nat.c
+2-22 files

FreeBSD/src d5d005elibexec/rc/rc.d ippool

ipfilter: Load optionlist prior to ippool invocation

As a safety precaution df381bec2d2b limits ippool hash table size to 1K.
This causes any legitimely large hash table to fail to load. The
htable_size_max ipf tuneable adjusts this but the adjustment is made
in the ipfilter rc script, invoked after the ippool script (because it
depends on ippool). Let's load the ipfilter_optionlist in ippool as well.
ipfilter_optionlist load will also occur in the ipfilter rc script in case
the user uses ipfilter without ippool.

Fixes:          df381bec2d2b
MFC after:      3 days
DeltaFile
+3-0libexec/rc/rc.d/ippool
+3-01 files

FreeBSD/src 3e69618sys/contrib/openzfs/lib/libzpool/include/sys zfs_bootenv_os.h

openzfs: We are FreeBSD, not posix.

Partially revert:
https://github.com/openzfs/zfs/commit/99d7453b43dc0ef04a35e461ef14db72e1326c7c
which introduced this file upstream. This causes this definition to be
preferred for all builds. Make the smallest change possible to this file
to change the default to FreeBSD. We're talking to the upstraem folks
about the right fix. Feel free to revert this in the future, so long as
`bectl activate -t` still works properly afterwards.

Sponsored by:           Netflix
DeltaFile
+1-1sys/contrib/openzfs/lib/libzpool/include/sys/zfs_bootenv_os.h
+1-11 files

FreeBSD/src cf85e70lib/libc/stdlib strfmon.c, lib/libc/tests/stdlib strfmon_test.c

strfmon: Fix negative sign handling for C locale

If the locale's positive_sign and negative_sign values would both be
returned by localeconv() as empty strings, strfmon() shall behave as if
the negative_sign value was the string "-".

This occurs with the C locale.  The implementation previously assigned
"0" to sign_posn (parentheses around the entire string); now it assigns
it to "1" (sign before the string) when it is undefined (CHAR_MAX).

Austin Group Defect 1199[1] is applied, changing the requirements for
the '+' and '(' flags.

[1]: https://www.austingroupbugs.net/view.php?id=1199

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53913
DeltaFile
+3-3lib/libc/tests/stdlib/strfmon_test.c
+1-1lib/libc/stdlib/strfmon.c
+4-42 files

FreeBSD/src 19e1530lib/libc/tests/stdlib strfmon_test.c

strfmon: Add tests for Austin Group Defect 1199

Add tests for The Open Group Base Specifications Issue 8[1], Austin
Group Defect 1199[2].

Items marked with XXX represent an invalid output.  These items will be
fixed in subsequent commits.

Notice that an existing test is now considered invalid.

Our locale definitions do not include int_p_sep_by_space nor
int_n_sep_by_space[3].  Those will be addressed in a subsequent commit.
However, the CLDR project defines them as "0", which causes the output
to appear as "USD123.45".  If our locale definitions were to set the
international {n,p}_sep_by_space to "1", the output would display as the
expected "USD 123.45".

While here, use the SPDX license identifier and add my name to the
file.

    [8 lines not shown]
DeltaFile
+57-23lib/libc/tests/stdlib/strfmon_test.c
+57-231 files

FreeBSD/src 1fd0189lib/libc/stdlib strfmon.3 strfmon.c, lib/libc/tests/stdlib strfmon_test.c

strfmon: EINVAL if the '+' flag and both signs are empty

According to the Open Group Base Specifications Issue 8[1], strfmon(3)
should return EINVAL when the '+' flag was included in a conversion
specification and the locale's positive_sign and negative_sign values
would both be returned by localeconv(3) as empty strings.

Austin Group Defect 1199[2] is applied, adding the [EINVAL] error.

[1]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/strfmon.html
[2]: https://www.austingroupbugs.net/view.php?id=1199

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53912
DeltaFile
+11-1lib/libc/stdlib/strfmon.3
+4-4lib/libc/tests/stdlib/strfmon_test.c
+3-1lib/libc/stdlib/strfmon.c
+18-63 files

FreeBSD/src dc75034usr.bin/mdo mdo.1

mdo.1: Document group-related and fine-grained control functionalities

This is a manual page update describing the functionality that was added
to mdo(1) in commit 3ca1e69028ac ("mdo(1): Add support and shortcuts for
fully specifying users and groups").  Please either refer to that commit
or the new manual page's content for more information.

While here:
- Add to the introduction a description of process credentials and some
  specific vocabulary that is used throughout the page, as well as the
  relationship between mdo(1) and mac_do(4).
- Update the HISTORY section.
- Add AUTHORS and SECURITY CONSIDERATIONS sections.

Reviewed by:    ziaee
MFC after:      1 minute
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Google LLC (GSoC 2025)
Co-authored-by: Kushagra Srivastava <kushagra1403 at gmail.com>

    [3 lines not shown]
DeltaFile
+245-24usr.bin/mdo/mdo.1
+245-241 files

FreeBSD/src 73dd00fusr.bin/mdo mdo.1

mdo.1: Document group-related and fine-grained control functionalities

This is a manual page update describing the functionality that was added
to mdo(1) in commit 3ca1e69028ac ("mdo(1): Add support and shortcuts for
fully specifying users and groups").  Please either refer to that commit
or the new manual page's content for more information.

While here:
- Add to the introduction a description of process credentials and some
  specific vocabulary that is used throughout the page, as well as the
  relationship between mdo(1) and mac_do(4).
- Update the HISTORY section.
- Add AUTHORS and SECURITY CONSIDERATIONS sections.

Reviewed by:    ziaee
MFC after:      1 minute
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Google LLC (GSoC 2025)
Co-authored-by: Kushagra Srivastava <kushagra1403 at gmail.com>
Differential Revision:  https://reviews.freebsd.org/D53905
DeltaFile
+245-24usr.bin/mdo/mdo.1
+245-241 files

FreeBSD/src ebf1d98share/examples/sound oss.h

sound examples: Fix buffer mapping/allocation

The buffer in struct config should be allocated or mmap'ed. The code
without this patch allocates the buffer unconditionally, even for mmap
configs.

MFC after:      1 week
Reviewed by:    christos
Differential Revision:  https://reviews.freebsd.org/D53939
DeltaFile
+18-3share/examples/sound/oss.h
+18-31 files

FreeBSD/src aa1cf24sys/fs/nfsserver nfs_nfsdstate.c

nfs_nfsdstate.c: Add sanity checks for lock stateids

Bugzilla PR reported a crash caused by a synthetic client
doing a Lock operation request with a delegation stateid.

This patch fixes the problem by adding sanity checks
for the type of stateid provided as an argument to the
Lock and LockU operations.

It has been tested with the FreeBSD, Linux and Solaris 11.4
clients.  Hopefully, other NFSv4 clients will work ok
as well.

PR:     291080
Tested by:      Robert Morris <rtm at lcs.mit.edu>
MFC after:      2 weeks
DeltaFile
+14-0sys/fs/nfsserver/nfs_nfsdstate.c
+14-01 files

FreeBSD/src d45816fusr.sbin/bsdinstall Makefile

bsdinstall: Ignore -p[0-9]+ in determining BRANCH

The patch level is not part of the branch per se and should not be
used in constructing the FreeBSD-base.conf file used by bsdinstall.

MFC after:      1 day
DeltaFile
+1-1usr.sbin/bsdinstall/Makefile
+1-11 files

FreeBSD/src 5af240clib/libc/locale xlocale_private.h

libc: Simplify __get_locale()

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    fuz
Differential Revision:  https://reviews.freebsd.org/D53908
DeltaFile
+2-4lib/libc/locale/xlocale_private.h
+2-41 files

FreeBSD/src 974ecf6sys/conf files.riscv, sys/dev/xilinx if_xae.c axidma.c

xae(4), axidma(4): rewrite DMA operation.

Due to performance constraints on a synthesized CHERI RISC-V core,
remove usage of xdma(4) scatter-gather framework.  Instead, provide
a minimalistic interface between two drivers.

This increases performance ~4-5 times.
Tested using scp(1) and nc(1) on Codasip Prime.

Sponsored by:   CHERI Research Centre
Differential Revision:  https://reviews.freebsd.org/D53932
DeltaFile
+669-446sys/dev/xilinx/if_xae.c
+60-498sys/dev/xilinx/axidma.c
+37-16sys/dev/xilinx/if_xaevar.h
+53-0sys/dev/xilinx/axidma_if.m
+1-10sys/dev/xilinx/axidma.h
+2-1sys/conf/files.riscv
+822-9716 files

FreeBSD/src c7ccd5b. UPDATING, sys/conf newvers.sh

Add UPDATING entry and bump version number.

Approved by:    so
Approved by:    re (cperciva)
DeltaFile
+6-0UPDATING
+1-1sys/conf/newvers.sh
+7-12 files

FreeBSD/src 476b209. UPDATING, sys/conf newvers.sh

Add UPDATING entries and bump version.

Approved by:    so
DeltaFile
+5-0UPDATING
+1-1sys/conf/newvers.sh
+6-12 files

FreeBSD/src 4fc1786. UPDATING, sys/conf newvers.sh

Add UPDATING entries and bump version.

Approved by:    so
DeltaFile
+5-0UPDATING
+1-1sys/conf/newvers.sh
+6-12 files

FreeBSD/src 9b08082contrib/unbound/iterator iter_scrub.c

Add a fix to scrub unsolicited NS RRSets to prevent cache poisoning.

Approved by:    so
Obtained from:  NLnet Labs
Security:       FreeBSD-SA-25:10.unbound
Security:       CVE-2025-11411
DeltaFile
+51-4contrib/unbound/iterator/iter_scrub.c
+51-41 files

FreeBSD/src 18c4eb2contrib/unbound/iterator iter_scrub.c

Add a fix to scrub unsolicited NS RRSets to prevent cache poisoning.

Approved by:    so
Obtained from:  NLnet Labs
Security:       FreeBSD-SA-25:10.unbound
Security:       CVE-2025-11411
DeltaFile
+51-4contrib/unbound/iterator/iter_scrub.c
+51-41 files

FreeBSD/src dabd406contrib/unbound/iterator iter_scrub.c

Mitigate YXDOMAIN and nodata non-referral answer poisoning.

Add a fix to apply scrubbing of unsolicited NS RRSets (and their
respective address records) for YXDOMAIN and nodata non-referral
answers. This prevents a malicious actor from exploiting a possible
cache poison attack.

Approved by:    so
Approved by:    re (cperciva)
Obtained from:  NLnet Labs
Security:       FreeBSD-SA-25:10.unbound
Security:       CVE-2025-11411
DeltaFile
+35-4contrib/unbound/iterator/iter_scrub.c
+35-41 files

FreeBSD/src 2aed524contrib/unbound/iterator iter_scrub.c

Mitigate YXDOMAIN and nodata non-referral answer poisoning.

Add a fix to apply scrubbing of unsolicited NS RRSets (and their
respective address records) for YXDOMAIN and nodata non-referral
answers. This prevents a malicious actor from exploiting a possible
cache poison attack.

Obtained from:  NLnet Labs
Security:       FreeBSD-SA-25:10.unbound
Security:       CVE-2025-11411

(cherry picked from commit 2a3a6a1771148a709c2d9694c1d66c41ce8dee79)
DeltaFile
+35-4contrib/unbound/iterator/iter_scrub.c
+35-41 files

FreeBSD/src cd40a23contrib/unbound/iterator iter_scrub.c

Mitigate YXDOMAIN and nodata non-referral answer poisoning.

Add a fix to apply scrubbing of unsolicited NS RRSets (and their
respective address records) for YXDOMAIN and nodata non-referral
answers. This prevents a malicious actor from exploiting a possible
cache poison attack.

Obtained from:  NLnet Labs
Security:       FreeBSD-SA-25:10.unbound
Security:       CVE-2025-11411

(cherry picked from commit 2a3a6a1771148a709c2d9694c1d66c41ce8dee79)
DeltaFile
+35-4contrib/unbound/iterator/iter_scrub.c
+35-41 files

FreeBSD/src b01f35acontrib/unbound/iterator iter_scrub.c

Mitigate YXDOMAIN and nodata non-referral answer poisoning.

Add a fix to apply scrubbing of unsolicited NS RRSets (and their
respective address records) for YXDOMAIN and nodata non-referral
answers. This prevents a malicious actor from exploiting a possible
cache poison attack.

Obtained from:  NLnet Labs
Security:       FreeBSD-SA-25:10.unbound
Security:       CVE-2025-11411

(cherry picked from commit 2a3a6a1771148a709c2d9694c1d66c41ce8dee79)
DeltaFile
+35-4contrib/unbound/iterator/iter_scrub.c
+35-41 files

FreeBSD/src 2a3a6a1contrib/unbound/iterator iter_scrub.c

Mitigate YXDOMAIN and nodata non-referral answer poisoning.

Add a fix to apply scrubbing of unsolicited NS RRSets (and their
respective address records) for YXDOMAIN and nodata non-referral
answers. This prevents a malicious actor from exploiting a possible
cache poison attack.

Obtained from:  NLnet Labs
Security:       CVE-2025-11411
DeltaFile
+35-4contrib/unbound/iterator/iter_scrub.c
+35-41 files