HardenedBSD/src 49b4137bin/chflags chflags.1, lib/libc/gen strtofflags.c

chflags: Alias nocache to noucache for consistency

Event:                  EuroBSDcon 2026
Requested by:           fuz
Reviewed by:            fuz, rmacklem
Differential Revision:  https://reviews.freebsd.org/D59588
DeltaFile
+2-3lib/libc/gen/strtofflags.c
+2-2bin/chflags/chflags.1
+4-52 files

HardenedBSD/src 116c727share/man/man4 aq.4

aq.4: Canonicalize SYNOPSIS

Event:          EuroBSDcon 2026
MFC after:      3 days
DeltaFile
+14-10share/man/man4/aq.4
+14-101 files

HardenedBSD/src b0a216alib/geom/label glabel.8

glabel.8: Fix description, improve table, tag spdx

- restore missing search keyword "disk", GEOM provider is a lgoical disk
- editorial nits on file system table to improve search and rendering
- correct msdosfs terminology, they are FAT filesystems
- use consistent spelling of filesystem

Fixes:          05a2d40ac240
Event:          EuroBSDcon 2026
MFC after:      3 days
Discussed with: bcr, vishwin
DeltaFile
+28-25lib/geom/label/glabel.8
+28-251 files

HardenedBSD/src 11ad849sys/dev/evdev evdev_utils.c

evdev: map ChromeOS "Vivaldi" top-row action keys

Chromebook keyboards driven by the ChromeOS EC emit the top-row action
keys as scancode set 1 codes 0xE0 0x11 - 0xE0 0x1E (see the codeset 1
comments on the SCANCODE_* enum in chrome-ec
include/keyboard_8042_sharedlib.h).  The e0 half of the
evdev_scancode2key() translation table leaves eleven of those at NONE,
so on FreeBSD those keys emit no evdev event at all and userspace
remappers such as keyd have nothing to bind to:

  e0 11  fullscreen             KEY_ZOOM
  e0 12  overview               KEY_SCALE
  e0 13  screenshot             KEY_SYSRQ
  e0 14  brightness down        KEY_BRIGHTNESSDOWN
  e0 15  brightness up          KEY_BRIGHTNESSUP
  e0 16  privacy screen toggle  KEY_PRIVACY_SCREEN_TOGGLE
  e0 17  kbd backlight down     KEY_KBDILLUMDOWN
  e0 18  kbd backlight up       KEY_KBDILLUMUP
  e0 1a  play/pause             KEY_PLAYPAUSE

    [13 lines not shown]
DeltaFile
+9-4sys/dev/evdev/evdev_utils.c
+9-41 files

HardenedBSD/src 5de4183share/man/man3 pthread_atfork.3, share/man/man4 ixl.4 iavf.4

manpages: Convert links from http to https when valid

Many of our man pages contain links to websites that are still using
http. Convert them to use https. I skipped those that:
- were not available anymore,
- did not provide an SSL page,
- had caused an SSL validation error,
- were not the original link anymore (i.e. aquisition)
- where the site structure had changed, causing 404s on the new site

Event:                  EuroBSDcon 2026
Reviewed by:            carlavilla (very fast, thanks for that)
Differential Revision:  https://reviews.freebsd.org/D59629
DeltaFile
+4-4share/man/man4/dc.4
+3-3share/man/man4/pcm.4
+2-2share/man/man4/ixl.4
+2-2share/man/man4/iavf.4
+2-2share/man/man4/cxgbe.4
+1-1share/man/man3/pthread_atfork.3
+14-1425 files not shown
+39-3931 files

HardenedBSD/src 05a2d40lib/geom/label glabel.8

glabel.8: clarify volume labels, metadata identifiers, and generic GEOM labels

Change description of manual page to add precision. Split out
filesystem, GPT and GEOM labels.  Give an example for each filesystem
for the program to show how to set a label. Clarify examples and use ada
device names consistently.

PR:                         262207
Differential Revision:      https://reviews.freebsd.org/D51030
DeltaFile
+73-56lib/geom/label/glabel.8
+73-561 files

HardenedBSD/src c1e7332sys/compat/freebsd32 freebsd32_misc.c, sys/kern kern_sendfile.c

sendfile(2): rework compat implementation

Rename the sendfile() function to kern_sendfile(), expand the arguments
previously passed in struct sendfile_args, and extend with two function
pointer arguments to copy in the header/trailer structure and the
create uio's for the header and trailer as required.  Use this to allow
the removal of freebsd32_do_sendfile() which was a nearly identical
duplicate of sendfile() with attendant maintenance cost.

Reviewed by:    kib, markj
Effort:         CHERI upstreaming
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D59034
DeltaFile
+17-76sys/compat/freebsd32/freebsd32_misc.c
+29-28sys/kern/kern_sendfile.c
+18-0sys/sys/syscallsubr.h
+64-1043 files

HardenedBSD/src 79e290dsys/compat/linuxkpi/common/src linux_work.c

linuxkpi: Fix cancel_delayed_work_sync() return value

Align behavior between the Linux cancel_delayed_work_sync()
function return value and the LinuxKPI equivalent.

Linux cancel_delayed_work_sync() returns whether delayed
work was pending, even if canceled before executing. This
includes the case where the timer fired and work was queued
but the callback had not yet started.

The LinuxKPI version used the return value from taskqueue_cancel()
as the return value of the public facing API, which inverted the
behavior of two cases, violating the Linux API contract.
Queued work which was removed before running would return false, and
work whose callback was already executing would return true.

Track the taskqueue pending count separately from the
taskqueue_cancel() return value.
Use the pending count for the public return value.

    [11 lines not shown]
DeltaFile
+24-13sys/compat/linuxkpi/common/src/linux_work.c
+24-131 files

HardenedBSD/src f125cd2share/man/man4 igc.4, share/man/man9 pci.9

Merge remote-tracking branch 'rad/hardened/15-stable/main' into hardened/15-stable/pledge
DeltaFile
+153-54sys/dev/igc/if_igc.c
+21-3share/man/man4/igc.4
+2-18sys/compat/linuxkpi/common/include/linux/pci.h
+20-0sys/dev/igc/igc_mac.c
+18-1share/man/man9/pci.9
+19-0sys/dev/pci/pci.c
+233-767 files not shown
+244-8813 files

HardenedBSD/src 28f8e27share/man/man4 igc.4, share/man/man9 pci.9

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+153-54sys/dev/igc/if_igc.c
+21-3share/man/man4/igc.4
+2-18sys/compat/linuxkpi/common/include/linux/pci.h
+20-0sys/dev/igc/igc_mac.c
+18-1share/man/man9/pci.9
+19-0sys/dev/pci/pci.c
+233-767 files not shown
+244-8813 files

HardenedBSD/src 5fe1964tools/test/stress2/misc unionfs23.sh unionfs22.sh

stress2: add two new unionfs test scenarios

These exercise lookup traversal from tmpfs into unionfs, which is
useful because, unlike UFS, tmpfs does not allow recursion on its vnode
locks by default.

unionfs22.sh exercises these lookups with a normal unionfs mount, while
unionfs23.sh uses '-o below' for the unionfs mount and reproduces the
panic described in PR 298201.

Reviewed by:    kib, markj, pho
Tested by:      pho
Differential Revision:  https://reviews.freebsd.org/D59494
DeltaFile
+77-0tools/test/stress2/misc/unionfs23.sh
+77-0tools/test/stress2/misc/unionfs22.sh
+154-02 files

HardenedBSD/src f57ce26sys/kern vfs_lookup.c

vfs_lookup_cross_mount(): fix missing LK_CANRECURSE

This was a rather dumb miss on my part in commit 42442d7a6e.
LK_CANRECURSE is clearly needed in any case in which the covered vnode
is held exclusive across the call to VFS_ROOT(), regardless of whether
it was initially held exclusive or upgraded.  The commit message for
that change also noted that unionfs lookup only worked without
LK_CANRECURSE due to a coincidence of the then-current unionfs
implementation.  As it happens, said coincidence was recently removed
in commit b952606b4f ("unionfs_lock(): eliminate LK_CANRECURSE special-
case").

PR:             298201
Reported by:    olivier
Fixes:          42442d7a6e "Generalize the VV_CROSSLOCK logic in
vfs_lookup"
Reviewed by:    kib, markj, pho
Tested by:      pho
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59494
DeltaFile
+8-4sys/kern/vfs_lookup.c
+8-41 files

HardenedBSD/src f616f8asys/dev/iwx if_iwx.c

iwx: fix kernel panic on module unload with assertions enabled

When interface is up and running 'kldunload if_iwx' stops the device and executes RUN -> INIT state transition.
Since the device is already stopped iwx_run_stop fails to stop the device again and returns non-zero exit code from iv_newstate callback which triggers 'INIT state change failed' assertion.

I reused IWX_FLAG_SHUTDOWN flag to:
a) set it in iwx_detach
b) check it in iwx_newstate_sub - when it is set all custom state transition logic is skipped

Accidentally found while experimenting with iwlwifi / iwx drivers

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59624
DeltaFile
+4-0sys/dev/iwx/if_iwx.c
+4-01 files

HardenedBSD/src a243aecshare/man/man4 igc.4, sys/dev/igc if_igc.h igc_defines.h

igc: Correct Wake-on-LAN filter programming

The attach path translated WUC.APME into a saved link-change filter,
then advertised magic-packet wake.  Suspend removed unselected magic,
unicast, and multicast bits from that saved value, commonly leaving no
hardware wake filter at all.  The destructive masking also made later
capability changes ineffective.

Advertise the I225/I226 wake filters whenever PCI power management is
available and enable magic-packet wake by default.  Build a fresh WUFC
mask for every suspend, and explicitly clear WUC, WUFC, and PCI PME when
wake is disabled.

Require the PCI power-management capability to report D3hot PME support
before advertising or arming wake.  A PM capability alone does not mean
the function can signal PME from the state used during system sleep.

Reconstruct RAR0, the multicast table, and the receive filter after the
stop-time reset so unicast and multicast wake use the current interface

    [48 lines not shown]
DeltaFile
+153-54sys/dev/igc/if_igc.c
+21-3share/man/man4/igc.4
+20-0sys/dev/igc/igc_mac.c
+3-4sys/dev/igc/igc_defines.h
+3-4sys/dev/igc/igc_base.c
+1-3sys/dev/igc/if_igc.h
+201-682 files not shown
+203-698 files

HardenedBSD/src 7101170share/man/man9 Makefile pci.9, sys/compat/linuxkpi/common/include/linux pci.h

pci: Expose PME support by power state

The presence of the PCI power management capability does not imply that
a function can signal PME# from every power state.  Drivers which
advertise wake based only on pci_has_pm() can consequently expose wake
modes that cannot work.

Add pci_has_pme() to query the PME_Support bitmap for a specific state.
Use it to implement LinuxKPI pci_pme_capable(), removing its duplicate
PME_Support decoder.

Validated the helper against PCI PMC capability values from 82571EB,
82573L, 82579LM, I210, I225, and I226-V controllers.  The 82571 and
82573 reported PMC 0xc822, while the I226-V reported 0xc823.  In both
values, bits 15, 14, and 11 advertise PME from D3cold, D3hot, and D0;
the low-bit difference is only the PM capability version.

Sponsored by:   BBOX.io

(cherry picked from commit c4e24e95c3f905b817d4bfc6e93457eb297bfa4b)
DeltaFile
+2-18sys/compat/linuxkpi/common/include/linux/pci.h
+18-1share/man/man9/pci.9
+19-0sys/dev/pci/pci.c
+1-0sys/dev/pci/pcivar.h
+1-0share/man/man9/Makefile
+41-195 files

HardenedBSD/src 741cd29sys/fs/nfs nfs_commonkrpc.c, sys/fs/nfsclient nfs_clrpcops.c

nfscl: Yet more fixes for the NFS over RDMA client glue

This should be it for a while, but there will be another cycle
of "glue" updates.  I just found out that I'll need to create
an alternate code path that uses a contigmalloc() blob instead
of scatter/gather of pages, since some NICs cannot do the
scatter/gather of pages well.

This commit should not affect non-RDMA behaviour.

MFC after:      3 months
Fixes:  884ee8d6c9b4 ("nfscl: Add some glue for client side NFS over RDMA")
DeltaFile
+20-2sys/rpc/clntrdma.h
+21-0sys/rpc/rpc_generic.c
+4-2sys/fs/nfsclient/nfs_clrpcops.c
+1-1sys/rpc/clnt_rc.c
+2-0sys/fs/nfs/nfs_commonkrpc.c
+48-55 files

HardenedBSD/src 75a1939share/man/man4 aq.4, sys/dev/aq aq_fw.h aq_fw2x.c

aq(4): arm PHY thermal shutdown from the admin poll

move thermal shutdown arming to the admin poll

this gives a more reasonable delay prior to the first attempt, and also
allows us to retry and make the option runtime-tuneable via a new
disable_thermal_arm sysctl

Approved by:    adrian (mentor)
Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59593

Signed-off-by: Nick Price <nprice at FreeBSD.org>
DeltaFile
+34-1sys/dev/aq/aq2_fw.c
+30-0sys/dev/aq/aq_irq.c
+14-10sys/dev/aq/aq_main.c
+16-6sys/dev/aq/aq_fw2x.c
+20-1share/man/man4/aq.4
+2-2sys/dev/aq/aq_fw.h
+116-201 files not shown
+118-207 files

HardenedBSD/src b3f7a43etc/mtree BSD.tests.dist, share/man/man4 fdescfs.4

fdescfs: descend through /dev/fd/N when mounted linrdlnk

Linux resolves a path below /proc/self/fd/N in the directory the
descriptor names, and linprocfs makes /proc/<pid>/fd a symlink to
/dev/fd.  Under linrdlnk the fdescfs node carries only VV_READLINK,
which namei will not walk through, so such a path fails with ENOTDIR.

Return the underlying vnode from fdesc_lookup for a non-final component,
or a trailing slash, reusing the machinery the nodup option already
uses.  The last component is untouched, so open("/dev/fd/N") keeps its
dup(2) semantic; a descriptor with no vnode behind it, such as a pipe,
yields ENOTDIR.

Add ATF coverage for traversal, descriptor reuse, and preservation of
last-component and mount-option semantics.

Approved by:    adrian (mentor)
Reviewed by:    kib, adrian
Differential Revision:  https://reviews.freebsd.org/D59393

    [2 lines not shown]
DeltaFile
+373-0tests/sys/fs/fdescfs/fdescfs_test.c
+15-1sys/fs/fdescfs/fdesc_vnops.c
+9-0tests/sys/fs/fdescfs/Makefile
+6-1share/man/man4/fdescfs.4
+2-0etc/mtree/BSD.tests.dist
+1-0tests/sys/fs/Makefile
+406-26 files

HardenedBSD/src cb2964fsys/amd64/conf MINIMAL GENERIC, sys/powerpc/conf QORIQ64 MPC85XX

amd64, powerpc: Enable tpm(4) in supported kernels

tpm(4) was removed from amd64 GENERIC because it broke suspend and
resume.  The preceding lifecycle, state-save, interrupt, locality, and
teardown fixes address those failures for both TPM 1.2 and TPM 2.0.

Restore the driver to amd64 GENERIC and MINIMAL, where TPM entropy
harvesting remained enabled.  Enable the driver and entropy harvesting
in the MPC85XX and QORIQ64 configurations, which already provide FDT,
spibus, and the platform SPI controller required by FDT-attached TPMs.
Leave the generic AIM and POWER configurations unchanged because they
have no TPM attachment bus.

The TPM 1.2 path completed repeated S3 cycles and command tests on
ThinkPad T430 and T440p systems.  The TPM 2.0 path completed repeated
device and full-system suspend/resume cycles on a ThinkPad P51.  The
PowerPC configuration matrix was checked to retain tpm(4) only where its
FDT SPI attachment path is present.


    [8 lines not shown]
DeltaFile
+2-3sys/amd64/conf/MINIMAL
+2-3sys/amd64/conf/GENERIC
+2-0sys/powerpc/conf/QORIQ64
+2-0sys/powerpc/conf/MPC85XX
+8-64 files

HardenedBSD/src 9ed5901sys/dev/puc pucdata.c

puc: add the WCH CH382 2S dual serial card

Two 16850 UARTs in the first I/O BAR at offset 0xc0, 8 bytes apart.

Approved by:    adrian (mentor)
Reviewed by:    imp, adrian
Differential Revision:  https://reviews.freebsd.org/D59512

Signed-off-by: Nick Price <nprice at FreeBSD.org>
DeltaFile
+20-0sys/dev/puc/pucdata.c
+20-01 files

HardenedBSD/src 8228171sys/dev/puc puc_pci.c puc_cfg.h

puc: be more careful about using MSI

puc has preferred MSI for every card since MSI support was added, with
only a global tunable to opt out.  uart(4) makes the same decision for
the serial devices it attaches directly, and has since grown two
defences: it skips MSI unless the device advertises exactly one vector,
because attaching a single instance to a device offering many has caused
problems (PR 235016), and it lets individual devices be flagged when
they claim MSI support that does not work.

Adopt both.

Approved by:    adrian (mentor)
Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59623

Signed-off-by: Nick Price <nprice at FreeBSD.org>
DeltaFile
+3-1sys/dev/puc/puc_pci.c
+4-0sys/dev/puc/puc_cfg.h
+7-12 files

HardenedBSD/src 9c650fbsys/dev/ncthwm ncthwm.c, sys/dev/superio superio.c

superio, ncthwm: add support for the Nuvoton NCT6798D

The ASUS PRIME X570-P carries a Nuvoton NCT6798D, Super I/O device ID 0xd42b. Add an exact-match entry to both. Exact rather than masked: the neighboring 0xd42a entries are deliberately exact with an extid because that ID is claimed by both NCT6796D-E and NCT5585D, and widening the family would make them collide.

The NCT6798D has seven tachometers, so raise NCTHWM_FAN_MAX to seven and describe the two extra ones; existing entries keep fan_count = 5 and are unaffected. Fan names follow the NCT6779 convention and do not map to any board's physical headers.

Tested on: ASUS PRIME X570-P, Ryzen 9 5950X, FreeBSD 16.0-CURRENT.

Approved by:    adrian
Reviewed by:    stephane.rochoy_stormshield.eu, adrian
Differential Revision:  https://reviews.freebsd.org/D58291

Signed-off-by: Nick Price <nprice at FreeBSD.org>
DeltaFile
+16-1sys/dev/ncthwm/ncthwm.c
+5-0sys/dev/superio/superio.c
+21-12 files

HardenedBSD/src 877294ausr.sbin/bsdinstall/partedit partedit_x86.c

bsdinstall: allow ZFS root on GPT under UEFI (amd64)

GPT+ZFS+UEFI boots fine, but the manual guided
wizard prevented it.

MFC after: 3 days

Reviewed by:    imp, adrian
Differential Revision:  https://reviews.freebsd.org/D59603
DeltaFile
+1-2usr.sbin/bsdinstall/partedit/partedit_x86.c
+1-21 files

HardenedBSD/src 243bdaflib/googletest/tests Makefile.inc

lib/googletest: also use -O0 for internal tests with GCC

This fixes the build with gcc 16's aggressive inlining.

Reviewed by:    ngie
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59538
DeltaFile
+3-3lib/googletest/tests/Makefile.inc
+3-31 files

HardenedBSD/src 06488d2sys/compat/linux linux_misc.c

linux: LINUX_PR_SET_THP_DISABLE all non-zero values are disable

Linux treats any nonzero value as "disable", so accept them all.

Fixes: a8a6eac57091
Sponsored by:           Netflix
DeltaFile
+2-3sys/compat/linux/linux_misc.c
+2-31 files

HardenedBSD/src 577ea37stand/efi/include efilib.h, stand/efi/libefi efinet.c

loader.efi: Expose efi_devpath_get_mac to get mac

This is a convenient way to test if a device path is a nic or not, so
expose it to the world.

Sponsored by:           Netflix
DeltaFile
+3-6stand/efi/libefi/efinet.c
+1-0stand/efi/include/efilib.h
+4-62 files

HardenedBSD/src 772c658stand/common md.c

loader: Use %u to print unsigned value

Fixes: 7055aa7a070f
Sponsored by:           Netflix
DeltaFile
+1-1stand/common/md.c
+1-11 files

HardenedBSD/src 6413a87stand loader.mk defs.mk, stand/efi/libefi efipart.c Makefile

loader: Move some support things around, maybe lame?

Sponsored by:           Netflix
DeltaFile
+7-0stand/efi/loader/memdisk.c
+1-5stand/loader.mk
+6-0stand/efi/libefi/efinet.c
+6-0stand/defs.mk
+3-0stand/efi/libefi/Makefile
+2-0stand/efi/libefi/efipart.c
+25-56 files

HardenedBSD/src 197df29stand/efi/loader main.c

loader.efi: Only try to download md if we're netbooting

The only possible time we could download the initmd that the dhcp server
told us about is if we're netbooting. So only attempt to do that if the
load device for loader.efi is a network. IF you are booting off disk and
then need to snag an initmd off the network, that's a different path,
and wouldn't need to necessarily do a dhcp exchange, except to get the
IP address.

Sponsored by:           Netflix
DeltaFile
+16-1stand/efi/loader/main.c
+16-11 files

HardenedBSD/src bbee544stand/efi/libefi efihttp.c

loader.efi: Fix memory leak in efihttp_dev_close

Save enough context to free the host we allocated in open on close.

Fixes: 6788e42d53c6
Noticed by: claude + Sonet 5
Sponsored by: Netflix
DeltaFile
+6-4stand/efi/libefi/efihttp.c
+6-41 files