FreeBSD/src 71979d8 — usr.sbin/bsnmpd/modules/snmp_hostres snmp_hostres.3

snmp_hostres.3: fix .Fx macro in the middle of a line

Reported by: bjk
DeltaFile
+3-1usr.sbin/bsnmpd/modules/snmp_hostres/snmp_hostres.3
+3-11 files

FreeBSD/src 8c9be10 — tests/sys/netpfil/pf return.py

pf tests: make return.py more robust

Sometimes ICMP echo packets get lost, so send more than one during
the sanity check. This should resolve the intermittent failure of the
return.py:TestReturn::test_tcp test.

PR:             300511
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+3-3tests/sys/netpfil/pf/return.py
+3-31 files

FreeBSD/src fdf948e — share/man/man4 intel_pmc.4, sys/conf files.x86

intel/intel_pmc: Add support for Cannon Lake through Meteor Lake

Match the platform by CPU model and attach on acpi with PWRM at
0xfe000000; the PMC is not PCI-enumerable on these platforms.
SLP_S0_RES offsets and granularities follow each generation's PCH
Family Datasheet Volume 2.  A mismatch between the LPIT residency
counter address and SLP_S0_RES is reported on attach.

Reviewed by:    olce, adrian
Differential Revision:  https://reviews.freebsd.org/D59596
DeltaFile
+309-70sys/dev/intel/intel_pmc.c
+36-29share/man/man4/intel_pmc.4
+1-1sys/modules/intel_pmc/Makefile
+1-1sys/conf/files.x86
+347-1014 files

FreeBSD/src 05465dd — sys/amd64/amd64 machdep.c

amd64: make hw.splitlock_force adjustable at runtime

Approved by:    re (cperciva)

(cherry picked from commit 57bc1e1c2f4c01953336bdf03743e30f4ba12cdc)
(cherry picked from commit 91bcaea97cc6da847bb4edf5b9822b461c5a43fe)
DeltaFile
+22-3sys/amd64/amd64/machdep.c
+22-31 files

FreeBSD/src 9b35d2e — usr.sbin/bhyve pci_emul.h pci_emul.c

bhyve: Treat BAR registration failures as non-fatal

Some guest operating systems (at least 9front) will leave device I/O
space decoding enabled while probing BAR sizes.  In this case, a
sufficiently large 32-bit BAR can overlap with the HPET MMIO region
fixed at 0xfed00000.  This results in an assertion failure in
modify_bar_registration(), even though the collision is transient, i.e.,
the guest will promptly map the BAR elsewhere.

Tolerate such overlaps.  Keep track of a BAR's registration state and
make sure that modify_bar_registration() doesn't try to unregister an
I/O space if registration failed.

This fixes a problem where a 32MB framebuffer ends up overlapping with
the HPET MMIO region, causing some guests to crash with an assertion
failure when probing BARs during boot.

Approved by:    re (cperciva)
PR:             290098

    [7 lines not shown]
DeltaFile
+31-15usr.sbin/bhyve/pci_emul.c
+2-0usr.sbin/bhyve/pci_emul.h
+33-152 files

FreeBSD/src b7b9b68 — sys/kern vfs_inotify.c

inotify: Open target the directory when adding a watch

When an application uses inotify to watch a directory,
vn_inotify_add_watch() reads the directory entries and does a name
lookup so as to induce the filesystem to create namecache entries.
Some filesystems expect the directory to be opened before VOP_READDIR
can be called, so do that.

Approved by:    re (cperciva)
PR:             299239
Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D60782

(cherry picked from commit de80428118101624aaeaae02d59665d1027ff10e)
(cherry picked from commit d4f4bd11adf266b926400b4725682d39187a489d)
DeltaFile
+9-0sys/kern/vfs_inotify.c
+9-01 files

FreeBSD/src f7c24ef — sbin/camcontrol camcontrol.c

camcontrol: Don't close the CAM device in nvme_get_data()

nvme_get_data() closed the supplied CAM device on every error
path, but its callers either pass the device that main() opened
and closes, or close the device themselves, so an error resulted
in a double cam_close_device() and a double free.  Move the error
path close into print_dev_nvme(), the one caller that opens its
own device, and leave the device alone in nvme_get_data().

This predates the recent camcontrol NVMe additions, but they added
more callers.

Reported by:    llm-postcr
Fixes:          6ee13c54dad0
MFC after:      1 week
Sponsored by:   Spectra Logic
Co-authored-by: Claude Fable 5 <noreply at anthropic.com>
DeltaFile
+3-3sbin/camcontrol/camcontrol.c
+3-31 files

FreeBSD/src f262bdc — sys/dev/nvme nvme_ctrlr.c

nvme: Restore the host memory buffer size calculation

When the nvme_ctrlr_cmd_set_feature() call in
nvme_ctrlr_hmb_enable() was rewritten for the widened Set Features
API, the HSIZE calculation reverted to dividing by a hard coded
4096 instead of the controller page size, undoing commit
3740a8db13ba.  The Host Memory Buffer Size field is in units of
the current memory page size (CC.MPS), so the wrong size would be
programmed on controllers configured with a page size other than
4KB.

Reported by:    llm-postcr
Fixes:          7a9e4375316b
MFC after:      1 week
Sponsored by:   Spectra Logic
Co-authored-by: Claude Fable 5 <noreply at anthropic.com>
DeltaFile
+1-1sys/dev/nvme/nvme_ctrlr.c
+1-11 files

FreeBSD/src 86b9d62 — sys/dev/nvme nvme.h

nvme: Fix the data length in the Reservation Report command builder

nvme_ns_resv_report_cmd() put its length argument, which callers
supply in bytes, directly into cdw10.  The NUMD field is a 0's
based count of dwords, so the command asked the controller to
transfer nearly four times the size of the supplied data buffer.
In practice controllers limit the transfer to the length described
by the PRP entries, which is why this worked in testing, but the
command was incorrect.

Convert the byte count to a 0's based dword count in the builder.

Reported by:    llm-postcr
Fixes:          7a9e4375316b
MFC after:      1 week
Sponsored by:   Spectra Logic
Co-authored-by: Claude Fable 5 <noreply at anthropic.com>
DeltaFile
+2-1sys/dev/nvme/nvme.h
+2-11 files

FreeBSD/src ef69484 — sbin/camcontrol nvformat.c

camcontrol: Fix swapped protection information defaults in nvformat

When no -p or -l arguments are given, the nvformat subcommand fills
in the protection information type and location from the
namespace's current settings.  The two were swapped: pi was taken
from the DPS metadata location bit and pil from the protection
information type field.  Formatting a namespace with protection
information enabled would therefore silently change its PI
settings, and before the Format NVM command builder masked its
fields, a namespace with PI type 2 enabled would set bit 9 of
cdw10, turning the format into a user data erase.

Reported by:    llm-postcr
Fixes:          80f090111ae4
MFC after:      1 week
Sponsored by:   Spectra Logic
Co-authored-by: Claude Fable 5 <noreply at anthropic.com>
DeltaFile
+4-4sbin/camcontrol/nvformat.c
+4-41 files

FreeBSD/src 2dd34af — sbin/camcontrol nvfeature.c, sys/cam/nvme nvme_all.h nvme_all.c

camcontrol: Fix extended host identifier retrieval

The Get Features command for the host identifier always requested
the 64-bit form (cdw11 EXHID=0), but the decoding logic sized the
identifier from the controller's CTRATT extended host identifier
capability bit, or always treated it as 128 bits when -U was
given.  On a controller supporting the extended host identifier,
the printed value did not match what was requested from the
controller.

Fetch the controller data before issuing the command, request the
extended form when the controller supports it, and decode the form
that was requested.  Reject -U when the controller only supports
64-bit host identifiers, since an 8 byte value cannot be shown as
a UUID.

sys/cam/nvme/nvme_all.c,
sys/cam/nvme/nvme_all.h:
        Add an exhid argument to nvme_get_feature_hostid(),

    [17 lines not shown]
DeltaFile
+35-22sbin/camcontrol/nvfeature.c
+7-2sys/cam/nvme/nvme_all.c
+3-2sys/cam/nvme/nvme_all.h
+45-263 files

FreeBSD/src b95e2b2 — sbin/camcontrol nvres.c

camcontrol: Require a reservation type for reserve, preempt and release

res_type was initialized to 0, but the checks that enforce the -T
argument for the reserve, preempt and release reservation actions
compare it against -1, so they could never fire and camcontrol
silently sent a reservation type of 0, which is invalid.
Initialize res_type to -1 so the checks work, and default the
reservation type to 0 for the release action's clear variant,
which does not take -T and ignores the field.

Reported by:    llm-postcr
Fixes:          ba75cf05727e
MFC after:      1 week
Sponsored by:   Spectra Logic
Co-authored-by: Claude Fable 5 <noreply at anthropic.com>
DeltaFile
+4-1sbin/camcontrol/nvres.c
+4-11 files

FreeBSD/src 3a6dbe7 — sys/dev/nvme nvme.h

nvme: Byte-swap the nsid in the Get/Set Features command builders

nvme_admin_get_feature_cmd() and nvme_admin_set_feature_cmd() stored
the namespace ID in the command without converting it to little
endian, unlike the other command building functions.  Any caller
passing a non-zero namespace ID would send the wrong namespace ID on
big endian machines.

Reported by:    llm-postcr
Fixes:          7a9e4375316b
MFC after:      1 week
Sponsored by:   Spectra Logic
Co-authored-by: Claude Fable 5 <noreply at anthropic.com>
DeltaFile
+2-2sys/dev/nvme/nvme.h
+2-21 files

FreeBSD/src 3892a64 — sbin/camcontrol nvformat.c, sys/dev/nvme nvme.h

nvme: Mask the fields in the Format NVM command builder

nvme_admin_format_cmd() did not mask any of the fields it composes
into cdw10, so an out of range value in one field would corrupt
neighboring fields.  In particular, an LBA format index greater
than 15 would bleed into the metadata settings and protection
information fields.  It also had no support for LBA format indexes
above 15, which NVMe 2.0 encodes via the separate LBAFU field.

Mask all of the fields, and encode bits 5:4 of the LBA format index
in the LBAFU field (cdw10 bits 13:12).

Also reject out of range LBA format indexes in camcontrol's
nvformat global (-G) mode, which has no namespace data to validate
against.  The per-namespace mode already validates the index
against NLBAF.

sys/dev/nvme/nvme.h:
        Mask the SES, PIL, PI, MSET and LBAF fields in

    [12 lines not shown]
DeltaFile
+6-0sbin/camcontrol/nvformat.c
+3-2sys/dev/nvme/nvme.h
+9-22 files

FreeBSD/src 88e0df0 — sys/dev/asmc asmcmmio.c asmc_sysctl.c

asmc: compare integer results to zero explicitly

No functional change.

MFC After: 1 Week
Approved-by: ngie (co-mentor)

Reviewed by:    ngie, adrian
Differential Revision:  https://reviews.freebsd.org/D61303
DeltaFile
+15-14sys/dev/asmc/asmc_pio.c
+4-4sys/dev/asmc/asmc_debug.c
+4-3sys/dev/asmc/asmc.c
+2-2sys/dev/asmc/asmc_sysctl.c
+1-1sys/dev/asmc/asmcmmio.c
+26-245 files

FreeBSD/src b391f3f — sys/dev/asmc asmcvar.h asmc_pio.c

asmc: Fix style(9) issues

fix operator and comma spacing and three long lines

MFC After: 1 Week
Approved-by: ngie (co-mentor)

Reviewed by:    ngie, imp
Differential Revision:  https://reviews.freebsd.org/D61302
DeltaFile
+4-3sys/dev/asmc/asmc_sysctl.c
+3-2sys/dev/asmc/asmc_debug.c
+3-2sys/dev/asmc/asmc.c
+1-1sys/dev/asmc/asmcvar.h
+1-1sys/dev/asmc/asmc_pio.c
+12-95 files

FreeBSD/src a3468ea — sys/dev/asmc asmcmmio.c asmc_debug.c

asmc: Use c99 initializers with for-loop counters to improve scoping

declared loop indices in the for statement
Index types are unchanged.

No functional change.

MFC After: 1 Week
Approved-by: ngie (co-mentor)

Reviewed by:    ngie, imp
Differential Revision:  https://reviews.freebsd.org/D61301
DeltaFile
+3-8sys/dev/asmc/asmc.c
+4-6sys/dev/asmc/asmc_pio.c
+2-6sys/dev/asmc/asmc_sysctl.c
+1-2sys/dev/asmc/asmcmmio.c
+1-2sys/dev/asmc/asmc_debug.c
+11-245 files

FreeBSD/src c714cde — sys/conf files.amd64, sys/dev/asmc asmc_sysctl.h asmcvar.h

asmc: split the sysctl layer into asmcsysctl.c

Moved the dev.asmc.N tree out of asmc.c

No functional change

MFC After: 1 Week
Approved-by: ngie (co-mentor)

Reviewed by:    ngie
Differential Revision:  https://reviews.freebsd.org/D61300
DeltaFile
+1,147-0sys/dev/asmc/asmc_sysctl.c
+5-1,052sys/dev/asmc/asmc.c
+4-53sys/dev/asmc/asmcvar.h
+25-0sys/dev/asmc/asmc_sysctl.h
+1-1sys/modules/asmc/Makefile
+1-0sys/conf/files.amd64
+1,183-1,1066 files

FreeBSD/src 0b545e5 — sys/conf files.amd64, sys/dev/asmc asmc_pio.h asmc.c

asmc: split the PIO backend into asmcpio.c

Moved the inline PIO transactions out of the key transport routines,
which now only dispatch on sc_is_mmio, matching asmcmmio.c. getbyindex and
getinfo stay fused: PIO needs both halves under one hold of sc_mtx.

No functional change.

MFC After: 1 Week
Approved-by: ngie (co-mentor)

Reviewed by:    ngie
Differential Revision:  https://reviews.freebsd.org/D61296
DeltaFile
+324-0sys/dev/asmc/asmc_pio.c
+7-274sys/dev/asmc/asmc.c
+28-0sys/dev/asmc/asmc_pio.h
+1-1sys/modules/asmc/Makefile
+1-0sys/conf/files.amd64
+361-2755 files

FreeBSD/src d412f42 — sys/conf files.amd64, sys/dev/asmc asmcvar.h asmc_debug.h

asmc: split the debug key access into asmc_debug.c

Move the ASMC_DEBUG code out of asmc.c into a file compiled only when the
option is set, gated in files.amd64 the way acpi_debug gates the ACPICA
debugger sources. The module Makefile writes the define into opt_asmc.h so
every translation unit sees it; the old CFLAGS.asmc.c form covered one.

No functional change.

MFC After: 1 Week
Approved-by: ngie (co-mentor)

Reviewed by:    ngie
Differential Revision:  https://reviews.freebsd.org/D61294
DeltaFile
+6-222sys/dev/asmc/asmc.c
+217-0sys/dev/asmc/asmc_debug.c
+31-0sys/dev/asmc/asmc_debug.h
+19-0sys/dev/asmc/asmcvar.h
+8-0sys/modules/asmc/Makefile
+1-0sys/conf/files.amd64
+282-2226 files

FreeBSD/src f594944 — krb5/usr.bin/kvno Makefile, krb5/usr.bin/sclient Makefile

krb5: Don't include libsys in LIBADD

This has the curious effect of placing libsys before libc in the link
order even though libc links against libsys.  While this happens to
work currently, it is fragile and fails to link properly in some edge
cases.

Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D60724
DeltaFile
+1-1krb5/usr.sbin/sserver/Makefile
+1-1krb5/usr.sbin/sim_server/Makefile
+1-1krb5/usr.sbin/gss-server/Makefile
+1-1krb5/usr.bin/sim_client/Makefile
+1-1krb5/usr.bin/sclient/Makefile
+1-1krb5/usr.bin/kvno/Makefile
+6-610 files not shown
+16-1616 files

FreeBSD/src 9e99355 — lib/libpam/modules/pam_krb5 Makefile

pam_krb5: Append to CFLAGS instead of replacing

Obtained from:  CheriBSD
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D60723
DeltaFile
+1-1lib/libpam/modules/pam_krb5/Makefile
+1-11 files

FreeBSD/src 17a4269 — .github/workflows style.yml cross-bootstrap-tools.yml

.github: Update actions version to 7

version 4 raises warnings when run as the runners force it to use Node
24 instead of Node 20.  version 5 defaults to Node 24, but version 7
is the current version.

Reviewed by:    emaste
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2477
DeltaFile
+1-1.github/workflows/style.yml
+1-1.github/workflows/cross-bootstrap-tools.yml
+2-22 files

FreeBSD/src bba06f0 — sys/riscv/include cpu.h, sys/riscv/riscv identcpu.c

riscv: add QEMU marchid

Globally allocated per:
https://github.com/riscv/riscv-isa-manual/blob/main/marchid.md

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-0sys/riscv/riscv/identcpu.c
+1-0sys/riscv/include/cpu.h
+2-02 files

FreeBSD/src 897d3ae — stand/libsa ufs.c

stand: check for short reads in ufs

Reviewed by:    imp, jhb
Differential Revision:  https://reviews.freebsd.org/D59379
DeltaFile
+8-0stand/libsa/ufs.c
+8-01 files

FreeBSD/src cbd7e7f — stand/libsa ufs.c

stand: ufs directory corruption sanity checks

Add sanity checks for corrupt UFS directory blocks.  Don't allow bad
data to cause buffer overflows or infinite loops.

Reviewed by:    dab, imp (previous version)
Differential Revision:  https://reviews.freebsd.org/D59378
DeltaFile
+10-4stand/libsa/ufs.c
+10-41 files

FreeBSD/src fb1fb7d — sys/arm64/arm64 identcpu.c

arm64: Rename the user_regs struct and array

In preparation for storing a non-user register rename the struct so and
array so they are more obviously for sanitized registers.

While here switch to a flag field and add a flag to record if the
register is for userspace or just the kernel and check for this when
reading the value for userspace.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D60742
DeltaFile
+52-27sys/arm64/arm64/identcpu.c
+52-271 files

FreeBSD/src 3ba68f5 — sys/arm64/arm64 pmap.c

arm64 pmap: combine L3C accessed bits in pmap_mincore()

The accessed bit may be set in only some of an L3C superpage's L3
PTEs.  However, when pmap_mincore() found an L3C mapping, it reported
the accessed state of the specified L3 PTE only, so mincore(2) could
fail to report MINCORE_REFERENCED for an L3C superpage that had been
accessed.  When the accessed bit is not set in the specified entry, use
pmap_load_l3c() to combine the accessed bits from all of the L3C
superpage's L3 PTEs.

Found by:       Claude Code (Opus 5.5)
MFC after:      1 week
DeltaFile
+10-1sys/arm64/arm64/pmap.c
+10-11 files

FreeBSD/src e67b4c8 — sys/dev/hwpmc hwpmc_mod.c

hwpmc: release a PMC whose ID could not be copied out

If copyout of the newly allocated PMC ID fails, the caller cannot use or
release the PMC. Release it in the kernel.

Reviewed by:    mhorne
MFC after:      3 days
Sponsored by:   Advanced Micro Devices, Inc.
Differential Revision:  https://reviews.freebsd.org/D60562

(cherry picked from commit e5a48c8e0dd026ba953cf401c4dec02f76078aa2)
DeltaFile
+6-0sys/dev/hwpmc/hwpmc_mod.c
+6-01 files

FreeBSD/src 0ab6ce9 — usr.sbin/pmc cmd_pmc_stat.c

pmc(8): zero-initialize the event descriptor in stat mode

cmd_pmc_stat allocated the event descriptor with malloc and then set
only some of its fields, so the rest held whatever was on the heap.
Use calloc() instead.

Reviewed by:    mhorne
MFC after:      3 days
Sponsored by:   AMD
Signed-off-by: Andre Silva <andasilv at amd.com>
Differential Revision:  https://reviews.freebsd.org/D59364

(cherry picked from commit a97914284c2e7a7dc330f4d93218e8d7f1e758b2)
DeltaFile
+1-1usr.sbin/pmc/cmd_pmc_stat.c
+1-11 files