FreeBSD/src ef083desys/dev/ahci ahci_pci.c, sys/dev/ichsmb ichsmb_pci.c

Add random Intel Elkhart Lake device IDs.
DeltaFile
+3-0sys/dev/ichsmb/ichsmb_pci.c
+2-0sys/dev/usb/controller/xhci_pci.c
+1-0sys/dev/ahci/ahci_pci.c
+1-0sys/dev/sound/pci/hda/hdac.c
+1-0sys/dev/sound/pci/hda/hdac.h
+8-05 files

FreeBSD/src 0cba688sys/tools makeobjops.awk

makeobjops.awk: Style nits in generated files

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D52407
DeltaFile
+2-2sys/tools/makeobjops.awk
+2-21 files

FreeBSD/src f865264sys/dev/random random_harvestq.c randomdev.h

random: Allow pure entropy sources to provide a min-entropy estimate

The current implementation of the NIST health tests assumes a
min-entropy estimate of one bit per sample, which is quite conservative.
For so-called "pure" sources (e.g., virtio-random, TPM) it might be nice
to support larger estimates so that the tests catch failed devices more
quickly.

Thus:
- let each pure random source provide an estimate, so that downstreams
  or driver implementors can override defaults if they want to;
- increase the default estimate for pure sources;
- for pure sources initialize the state machine at source registration
  time.

Reviewed by:    cem
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D52232
DeltaFile
+17-4sys/dev/random/random_harvestq.c
+1-0sys/dev/random/randomdev.h
+18-42 files

FreeBSD/src 8635f86sys/dev/random random_harvestq.c randomdev.h, sys/dev/tpm tpm20.c

random: Make the entropy source registration interface more uniform

Most pure sources work under a "pull" model wherein a dedicated thread
polls the source at regular intervals (every 100ms).  A couple of
sources, however, will instead call random_harvest_direct() to provide
entropy samples.  Such sources were not calling random_source_register()
and thus weren't in the global random source list.

Modify "push" sources to use random_source_register() like other sources
do.  Such sources omit an implementation of rs_read and are thus skipped
by the above-mentioned thread.  This makes it easier to allow pure
sources to provide a min-entropy estimate in a uniform way.

Reviewed by:    cem
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D52229
DeltaFile
+10-19sys/dev/random/random_harvestq.c
+10-3sys/dev/tpm/tpm20.c
+7-1sys/dev/vmgenc/vmgenc_acpi.c
+0-3sys/sys/random.h
+2-0sys/dev/random/randomdev.h
+29-265 files

FreeBSD/src 480928asys/dev/random random_harvestq.c

random: Exclude the timestamp from healthtest for pure sources

So-called pure sources provide entropy at regular intervals, so the
timestamp counter provides little entropy.  Exclude it from health
testing for such sources.

Reviewed by:    cem, emaste
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D52233
DeltaFile
+11-1sys/dev/random/random_harvestq.c
+11-11 files

FreeBSD/src 27e2afashare/man/man4 random.4

random.4: Document the kern.random.nist_healthtest_enabled tunable

Reviewed by:    cem, emaste
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D52231
DeltaFile
+12-1share/man/man4/random.4
+12-11 files

FreeBSD/src c942d9esys/dev/random random_harvestq.c

random: Fix synchronization of hc_source_mask

This variable provides a mask of all registered entropy sources and is
updated when drivers attach and detach (or by sysctl).  However, nothing
was synchronizing accesses to it.  Use the harvest lock to provide
mutual exclusion for updates, and use atomic_load_int() to mark unlocked
reads.

Reviewed by:    cem
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D52230
DeltaFile
+30-14sys/dev/random/random_harvestq.c
+30-141 files

FreeBSD/src 228302esys/dev/random random_harvestq.c

random: Make the min-entropy estimate configurable

Right now the cutoff values for the RCT and APT tests are computed with
a fixed min-entropy estimate of 1.  In preparation for permitting
alternative estimates for "pure" sources (i.e., hardware noise sources),
extend the code to handle alternative estimates of an integer number of
bits.

For the RCT test, the cutoff is simply the formula from section 4.4.1 of
NIST SP 800-90B.  For the APT test, I used Excel to compute a lookup
table using the formula provided in section 4.4.2.

Reviewed by:    cem
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D52228
DeltaFile
+42-10sys/dev/random/random_harvestq.c
+42-101 files

FreeBSD/src 3860afesys/compat/linuxkpi/common/src linux_pci.c

Revert "LinuxKPI: pci: allocate entire pci_dev hiereachy up to root port on attach"

It turns out this breaks the nvidia-drm drviers.
We'll try to rework things and put it back later.

This reverts commit bbeeb585315645db20118ef349a4e3dc83b148cc.
DeltaFile
+7-40sys/compat/linuxkpi/common/src/linux_pci.c
+7-401 files

FreeBSD/src dc38cf1usr.bin/man man.sh

man: Fix usage message

PR:             289245
Fixes:          14b61b2e9317 ("man: Add -l option")
DeltaFile
+1-1usr.bin/man/man.sh
+1-11 files

FreeBSD/src c9467d0usr.sbin/freebsd-update freebsd-update.sh

freebsd-update: Fix the pkgbase check

Even on a pkgbase system, it should be possible to use freebsd-update -j
to upgrade a non-pkgbase jail, at least for the time being.  However,
the check_pkgbase() call came before get_params, so BASEDIR was always
set to /.

Make check_pkgbase() a pure function and call it after get_params().
While here, use pkg -r ${BASEDIR} instead of pkg -c ${BASEDIR} since the
latter requires root privileges.  freebsd-update is supposed to be run
as root, but it doesn't actually check this that I can see, so let's not
make that assumption here since it affects the result of the function
(i.e., pkg -c ${BASEDIR} always fails as a non-root user).

Reviewed by:    des
Fixes:          856e158dc4aa ("freebsd-update: improve pkgbase check")
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D51770

(cherry picked from commit 66c75fa63aff40e9c587345b2cc6b8148e396de8)
DeltaFile
+17-14usr.sbin/freebsd-update/freebsd-update.sh
+17-141 files

FreeBSD/src d779cb9lib/libc/amd64/string memrchr.S

libc/amd64: rewrite memrchr() baseline impl. to read the string from the back

This ensures O(1) behaviour if the character is a constant offset
from the end of the string, regardless of how long the string is.

Reported by:    Mikael Simonsson <m at mikaelsimonsson.com>
Reviewed by:    benni
PR:             288321
MFC after:      1 month

(cherry picked from commit 4b15965daa99044daf184221b7c283bf7f2d7e66)
DeltaFile
+71-75lib/libc/amd64/string/memrchr.S
+71-751 files

FreeBSD/src 7caa8fblib/libc/amd64/string memrchr.S

libc/amd64: rewrite memrchr() scalar impl. to read the string from the back

A very simple implementation as I don't have the patience right now
to write a full SWAR kernel.  Should still do the trick if you wish
to opt out of SSE for some reason.

Reported by:    Mikael Simonsson <m at mikaelsimonsson.com>
Reviewed by:    strajabot
PR:             288321
MFC after:      1 month

(cherry picked from commit 30acc84270266e41f66cf572f67c3290d923da2f)
DeltaFile
+34-38lib/libc/amd64/string/memrchr.S
+34-381 files

FreeBSD/src fd9e09csys/kern sys_procdesc.c kern_event.c

kern: replace several EBADF with EINVAL

EBADF semantic is that the passed fd is invalid, not that it is of wrong
type.  Using EBADF in these places in kern_event.c and sys_procdesc.c
give bad examples to copy from.

Note that places in kern_event.c that checks KQ_CLOSING and return EBADF
are kept, since KQ_CLOSING is the transient state before the fd is
finally closed and become eligible for EBADF.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D52410
DeltaFile
+2-2sys/kern/sys_procdesc.c
+1-1sys/kern/kern_event.c
+3-32 files

FreeBSD/src fdb3b69secure/lib/libcrypto/man/man3 Makefile, secure/lib/libcrypto/man/man7 Makefile

Update the installed manpages to match OpenSSL 3.5.1

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D52008
DeltaFile
+2,901-2,082secure/lib/libcrypto/man/man3/Makefile
+2-36secure/lib/libcrypto/man/man7/Makefile
+2,903-2,1182 files

FreeBSD/src d661670sys/net80211 ieee80211_ht.c

[net80211] Quieten the logging from ieee80211_vht_get_vhtflags()

The commit in Fixes: introduced logging the output bits from
ieee80211_vht_get_vhtflags().  This ends up causing quite a lot
of logging when net80211 is doing things like processing
received beacons.

So just remove the logging; if it's needed again then a developer
can add it back to that location, or just use dtrace to capture
the return value.

Fixes:  4bf049bfeefd9
Differential Revision: https://reviews.freebsd.org/D52142
Reviewed by:    bz
DeltaFile
+1-1sys/net80211/ieee80211_ht.c
+1-11 files

FreeBSD/src 14b61b2usr.bin/man man.sh man.1

man: Add -l option

Add a -l option which causes man to interpret all arguments as paths to
open directly rather than man pages to search for in MANPATH.  See the
PR for a detailed rationale.

PR:             289245
MFC after:      1 week
Reviewed by:    ziaee, emaste
Differential Revision:  https://reviews.freebsd.org/D52385
DeltaFile
+24-9usr.bin/man/man.sh
+18-6usr.bin/man/man.1
+42-152 files

FreeBSD/src 5a01194contrib/unbound configure ltmain.sh, contrib/unbound/doc unbound.conf.5 unbound-control.8

unbound: Update to 1.23.1

Release notes at
        https://nlnetlabs.nl/news/2025/Jul/16/unbound-1.23.1-released/

Since we don't enable ECS, this is mostly a nop for us.

Merge commit 'c8864f6ba46ff3271d97b4ae1c3cc6ce01eaf18a'

MFC after:      3 days
DeltaFile
+2,626-1,865contrib/unbound/configure
+967-592contrib/unbound/ltmain.sh
+620-121contrib/unbound/doc/unbound.conf.5
+306-215lib/libunbound/config.h
+185-175contrib/unbound/config.h.in
+313-30contrib/unbound/doc/unbound-control.8
+5,017-2,99822 files not shown
+5,644-3,18928 files

FreeBSD/src c8864f6. config.sub configure, edns-subnet subnetmod.c

Vendor import of Unbound 1.23.1
DeltaFile
+138-14edns-subnet/subnetmod.c
+19-9config.sub
+13-12configure
+13-12configure~
+10-7config.guess
+3-2configure.ac
+196-5610 files not shown
+211-6716 files

FreeBSD/src 11ace56contrib/libxo/libxo xo.h xo_encoder.h

contrib/libxo: fix API header files inclusions in C++ source files

C++ source files need `extern "C"` to disable C++ name mangling.

MFC after:      1 week
Reviewed by:    aokblast (previous version), phil, imp (previous version)
Differential Revision:  https://reviews.freebsd.org/D47930
DeltaFile
+8-0contrib/libxo/libxo/xo.h
+8-0contrib/libxo/libxo/xo_encoder.h
+16-02 files

FreeBSD/src 6d62463usr.sbin/newsyslog newsyslog.conf.5

newsyslog.conf(5): Don't suppress space after <compress> directive

Because newsyslog(8) actually _requires_ a space after the <compress>
directive.

Reviewed by:    bcr
Differential Revision: https://reviews.freebsd.org/D52414
DeltaFile
+1-1usr.sbin/newsyslog/newsyslog.conf.5
+1-11 files

FreeBSD/src 4341f92share/mk bsd.cpu.mk

share/mk: Fix a heuristic in bsd.cpu.mk

When cross-building from MacOS we have MACHINE=arm64 MACHINE_ARCH=arm,
so bsd.cpu.mk infers that sizeof(long) == 4, but of course it isn't.
This breaks the bootstrap build of openssl, which tests
MACHINE_ABI:Mlong64 to decide whether to build ecp_nistp224.c.  It
doesn't, and crypto/openssl/freebsd/include/openssl/configuration.h
undefines OPENSSL_NO_EC_NISTP_64_GCC_128, so we end up with a link
error.

Reviewed by:    ngie, emaste
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D52340
DeltaFile
+5-2share/mk/bsd.cpu.mk
+5-21 files

FreeBSD/src ac2f284etc/mtree BSD.usr.dist

BSD.usr.dist: remove obsolete usr/share/examples/drivers entry

In base 8f0a6a9aadb1f, usr/share/examples/drivers was cleaned up,
because it contained unmaintained scripts. The directory itself is
cleaned up by ObsoleteFiles.inc, but there was still an entry in
BSD.usr.dist that re-created the directory. Remove it.

Fixes:          8f0a6a9aadb1
MFC after:      3 days
DeltaFile
+0-2etc/mtree/BSD.usr.dist
+0-21 files

FreeBSD/src b84156esys/fs/nfsserver nfs_nfsdport.c

nfsd: Fix the NFSv4 Readdir operation for an empty ZFS dir

Commit 9a3edc8 modified the behaviour of ZFS's
VOP_READDIR() such that it will reply EINVAL for
an offset past EOF on the directory.

This exposed a latent bug in the NFSv4 Readdir
code, which would attempt a Readdir with an
offset beyond EOF for a directory that consists
of only "." and "..". This happened because NFSv4
does not reply "." or ".." to the client and, after
skipping over them, attempted another VOP_READDIR().

This patch fixes the problem by checking the eofflag
for the case where all entries have been skipped over.

Reviewed by:    kib
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D52370

    [2 lines not shown]
DeltaFile
+3-0sys/fs/nfsserver/nfs_nfsdport.c
+3-01 files

FreeBSD/src 7b4562e. .git-blame-ignore-revs

git-blame-ignore-revs: sys/cpu.h style(9) fixes

MFC after:      3 days
DeltaFile
+2-0.git-blame-ignore-revs
+2-01 files

FreeBSD/src 0737e2asys/sys cpu.h

sys/cpu.h: Some style(9) fixes

MFC after:      3 days
DeltaFile
+14-8sys/sys/cpu.h
+14-81 files

FreeBSD/src dff11c4sys/dev/rtwn if_rtwn_tx.c if_rtwn.c, sys/dev/rtwn/rtl8192c r92c_tx.c

rtwn: enable seqno offload; migrate to use ieee80211_output_seqno_assign()

This should both enable the sequence number offloading and disable
the net80211 TX lock from being acquired/released/checked.

Locally tested:

* RTL8812AU, STA mode

Reviewed by: bz
Differential Revision:  https://reviews.freebsd.org/D52301
Differential Revision:  https://reviews.freebsd.org/D50693
DeltaFile
+4-8sys/dev/rtwn/rtl8812a/r12a_tx.c
+5-6sys/dev/rtwn/rtl8192c/r92c_tx.c
+8-0sys/dev/rtwn/if_rtwn_tx.c
+3-0sys/dev/rtwn/if_rtwn.c
+20-144 files

FreeBSD/src 7c448f5sys/dev/virtio/network if_vtnet.c

vtnet: fix compilation for NOIP configs

Reported by:    bz
Fixes:          1c23d8f9f398 ("vtnet: improve checksum offloading")
MFC after:      3 days
Sponsored by:   Netflix, Inc.
DeltaFile
+9-0sys/dev/virtio/network/if_vtnet.c
+9-01 files

FreeBSD/src 5e82eecstand/fonts INDEX.fonts

stand: Remove Spleen 32x64 fonts from INDEX

The Spleen 32x64 fonts cause some systems such as the AMD Framework 16
to boot extremely slowly.  Adding screen.font="16x32" to
/boot/loader.conf is a partial workaround, but text displayed before the
boot menu still takes ~30 seconds to render on that laptop.  With this
change, the same text renders immediately.

By leaving the font files in place but removing them from the INDEX,
users who want to use them can still load them manually.  Once pending
work is committed to allow normal booting with these fonts, they can be
added back to the INDEX.

PR:             289007
Reviewed by:    emaste, kevans, tsoome, ziaee
Fixes:          1ec2c8b2f364 (stand: Enable Spleen 32x64 font in the bootloader)
Sponsored by:   The FreeBSD Foundation
DeltaFile
+0-3stand/fonts/INDEX.fonts
+0-31 files

FreeBSD/src 4ab64e3sys/compat/linuxkpi/common/include/linux device.h, sys/compat/linuxkpi/common/src linux_devres.c

LinuxKPI: devres: divorce dem_kfree from lkpi_devm_kmalloc_release

dem_kfree() is called from all over the place and should actually
do something;  contrary to lkpi_devm_kmalloc_release() it can also
take a const void *.  We have to __DECONST() that though as the
entire devres framework does otherwise not take a const argument.

This was discovered during the rtw89 upadte to 6.16.

Sponsored by:   The FreeBSD Foundation (initially)
MFC after:      3 days
Reviewed by:    dumbbell
Differential Revision:  https://reviews.freebsd.org/D52082
DeltaFile
+25-1sys/compat/linuxkpi/common/src/linux_devres.c
+3-2sys/compat/linuxkpi/common/include/linux/device.h
+28-32 files