FreeBSD/src 3fbdaeesys/arm/broadcom/bcm2835 bcm2835_sdhci.c

bcm2835_sdhci: Clean up DMA resources on attach failure

bcm_sdhci_attach() allocates a DMA channel with bcm_dma_allocate()
before creating the bus_dma tag and map.  If a later initialization
step fails, the common error path releases the interrupt and memory
resources, but leaves the DMA channel allocated.

Call bcm_dma_free() for cleanup, as it already performs the required
internal checks and can therefore be invoked directly.

Signed-off-by:  Haoxiang Li <lihaoxiang at isrc.iscas.ac.cn>
Reviewed by:    mhorne
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2241

(cherry picked from commit d1488cd762bee79240a715bf04f3d30e9a121b26)
DeltaFile
+1-0sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
+1-01 files

FreeBSD/src 6d526fasys/compat/linuxkpi/common/include/linux io.h

linux/io: handle memtype_wc mapping for !DMAP range

The amdgpu driver in drm-kmod will attempt to update/reserve certain GPU
VRAM ranges as write-combining. Depending on the system, this address
range may fall outside of FreeBSD's constructed DMAP. We cannot use
pmap_change_attr() in this case.

When INVARIANTS is enabled, this results in the following:

  panic: physical address 0x880000000 not covered by the DMAP

Add a guard against triggering the KASSERT in PHYS_TO_DMAP().

This limitation in our implementation of arch_io_reserve_memtype_wc() is
already known in drm-kmod's amdgpu_bo_init(), and errors are ignored
there (see "BSDFIXME"). This change is only to eliminate the preventable
assertion failure within this scheme.

Tested by:      kevans

    [6 lines not shown]
DeltaFile
+6-1sys/compat/linuxkpi/common/include/linux/io.h
+6-11 files

FreeBSD/src a95757dsys/dev/usb/net if_smsc.c

smsc: Add missing newline to PHY timeout error printf

(cherry picked from commit 0979bfb0ec804590a782ea33b787ec0989c1f1a4)
(cherry picked from commit 471b1c4ca19b16693ed410da5023739a60d063f3)
DeltaFile
+1-1sys/dev/usb/net/if_smsc.c
+1-11 files

FreeBSD/src 314c855sys/amd64/amd64 trap.c

amd64: Make EFI runtime faults look less like panics

EFI runtime faults may be mistaken for kernel panics, and do not
necessarily represent actual problems.  Try to differentiate them some
more by printing "EFI runtime trap" rather than "Fatal trap".

PR:             291193
Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56309

(cherry picked from commit ddabf7f3ea4f0497dc5a5ffcbbb1d852ea77a4cd)
DeltaFile
+5-5sys/amd64/amd64/trap.c
+5-51 files

FreeBSD/src 3151fddsys/netlink netlink_io.c

netlink: Use unsigned type in nl_process_nbuf

nlmsghdr::nlmsg_len and nl_buf::offset are u_int.  Make msglen match.

Reviewed by:    pouria, glebius
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57474

(cherry picked from commit 888d9236e2249cb1bda686aca8729fdcc69a10ac)
DeltaFile
+3-1sys/netlink/netlink_io.c
+3-11 files

FreeBSD/src f218641sys/dev/hwpmc hwpmc_intel.c, sys/sys pmc.h

pmc: add sapphire rapids model

This commit adds the sapphire rapids CPU model to hwpmc_intel.c,
allowing hwpmc to be used on this CPU family.

Reviewed by:    mhorne
MFC after:      3 days
Sponsored by:   Stormshield
Differential Revision:  https://reviews.freebsd.org/D57263

(cherry picked from commit 03c69dd90122c4ffa91a749f668a2ac8fa6843a2)
DeltaFile
+4-0sys/dev/hwpmc/hwpmc_intel.c
+1-1sys/sys/pmc.h
+5-12 files

FreeBSD/src a9a1011lib/libpmc/pmu-events/arch/x86/meteorlake mtl-metrics.json pipeline.json

pmc: Import Intel Meteor Lake events

Obtained from:  Intel perfmon (JSON event definitions)
Tested by:      bms, olivier
MFC after:      1 week
Reviewed by:    ali_mashtizadeh.com, mhorne
Differential Revision:  https://reviews.freebsd.org/D55641

(cherry picked from commit cb9e24221672a7f77c858518c292c1eac09b3740)
DeltaFile
+2,825-0lib/libpmc/pmu-events/arch/x86/meteorlake/mtl-metrics.json
+2,096-0lib/libpmc/pmu-events/arch/x86/meteorlake/pipeline.json
+1,733-0lib/libpmc/pmu-events/arch/x86/meteorlake/cache.json
+623-0lib/libpmc/pmu-events/arch/x86/meteorlake/frontend.json
+499-0lib/libpmc/pmu-events/arch/x86/meteorlake/memory.json
+377-0lib/libpmc/pmu-events/arch/x86/meteorlake/virtual-memory.json
+8,153-09 files not shown
+8,877-015 files

FreeBSD/src 648ac17sys/arm/broadcom/bcm2835 bcm2835_sdhci.c

bcm2835_sdhci: Clean up DMA resources on attach failure

bcm_sdhci_attach() allocates a DMA channel with bcm_dma_allocate()
before creating the bus_dma tag and map.  If a later initialization
step fails, the common error path releases the interrupt and memory
resources, but leaves the DMA channel allocated.

Call bcm_dma_free() for cleanup, as it already performs the required
internal checks and can therefore be invoked directly.

Signed-off-by:  Haoxiang Li <lihaoxiang at isrc.iscas.ac.cn>
Reviewed by:    mhorne
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2241

(cherry picked from commit d1488cd762bee79240a715bf04f3d30e9a121b26)
DeltaFile
+1-0sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
+1-01 files

FreeBSD/src be5d6a2lib/geom/part gpart.8

gpart.8: add entry for xbootldr partition type

Reviewed by:    emaste, markj
Sponsored by:   The FreeBSD Foundation
Fixes:  dab8138e13de ("g_part,mkimg: Add additional GPT partition types")
Differential Revision:  https://reviews.freebsd.org/D56969

(cherry picked from commit 54d0ae979d9596399f33dc7d7245866f86ab7f8e)
DeltaFile
+7-1lib/geom/part/gpart.8
+7-11 files

FreeBSD/src 7b8ee50sys/compat/linuxkpi/common/include/linux io.h

linux/io: handle memtype_wc mapping for !DMAP range

The amdgpu driver in drm-kmod will attempt to update/reserve certain GPU
VRAM ranges as write-combining. Depending on the system, this address
range may fall outside of FreeBSD's constructed DMAP. We cannot use
pmap_change_attr() in this case.

When INVARIANTS is enabled, this results in the following:

  panic: physical address 0x880000000 not covered by the DMAP

Add a guard against triggering the KASSERT in PHYS_TO_DMAP().

This limitation in our implementation of arch_io_reserve_memtype_wc() is
already known in drm-kmod's amdgpu_bo_init(), and errors are ignored
there (see "BSDFIXME"). This change is only to eliminate the preventable
assertion failure within this scheme.

Tested by:      kevans

    [6 lines not shown]
DeltaFile
+6-1sys/compat/linuxkpi/common/include/linux/io.h
+6-11 files

FreeBSD/src b1594aelib/geom/part gpart.8

gpart(7): Fix reference to the zfsprops man page

PR:     292147

(cherry picked from commit 6499888ca741bf3db90d7fd352d5480f7314337f)
DeltaFile
+2-2lib/geom/part/gpart.8
+2-21 files

FreeBSD/src a1b2bcbsys/dev/eqos if_eqos_starfive.c

if_eqos_starfive: Read MAC address from device tree

u-boot/opensbi determines the ethernet MAC address from ROM and passes
it to the OS in the device tree. This change sets the correct MAC
address from this source. This prevents the eqos class driver from
generating random MAC addresses at each boot.

Tested on Starfive VisionFive 2, riscv64 SBC.

Reviewed by:    mhorne
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56782

(cherry picked from commit 351fad05e075c388dece4cd6dd8613494b870bad)
DeltaFile
+12-0sys/dev/eqos/if_eqos_starfive.c
+12-01 files

FreeBSD/src 670024dsys/geom/part g_part.h g_part_gpt.c, sys/sys/disk gpt.h

g_part,mkimg: Add additional GPT partition types

Add the hifive-fsbl, hifive-bbl, and xbootldr aliases to mkimg(1).
Add the xbootldr alias to geom(4), and thus gpart(8).

The "hifive" partition types are defined and used by various RISC-V SBCs
for locating firmware.

"xbootldr", or the Extended Boot Loader Partition is defined here:
https://uapi-group.org/specifications/specs/boot_loader_specification/

Reviewed by:    emaste, markj, mhorne
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56784

(cherry picked from commit dab8138e13dea539a387c458979403980a137bf2)
DeltaFile
+6-0usr.bin/mkimg/gpt.c
+3-0usr.bin/mkimg/scheme.h
+3-0usr.bin/mkimg/scheme.c
+2-0sys/geom/part/g_part.h
+2-0sys/geom/part/g_part_gpt.c
+2-0sys/sys/disk/gpt.h
+18-01 files not shown
+19-07 files

FreeBSD/src 0aa4c25lib/libpmc pmc.ibs.3 libpmc.c, sys/dev/hwpmc hwpmc_ibs.c hwpmc_ibs.h

hwpmc_ibs: Add Zen6 IBS ctl2 filters and alternate disable

Add kernel and userland support for Zen6 IBS extensions per AMD pub
69205 (rev 1.00, March 2026): alternate fetch/op disable via ctl2[0],
fetch latency filtering, virtual address bit 63 filtering, and
streaming-store filtering.  Decode the new IbsOpData2 StrmSt and
RmtSocket bits. Update libpmc, pmcstat and manpage.

Pre-Zen6 systems work unchanged with ibs_ctl2 == 0.

Signed-off-by:  Andre Silva <andasilv at amd.com>
Reviewed by:    Ali Mashtizadeh <ali at mashtizadeh.com>, mhorne
Sponsored by:   AMD
Differential Revision:  https://reviews.freebsd.org/D56914
DeltaFile
+193-21sys/dev/hwpmc/hwpmc_ibs.c
+73-4lib/libpmc/pmc.ibs.3
+53-2lib/libpmc/libpmc.c
+41-4sys/dev/hwpmc/hwpmc_ibs.h
+35-6usr.sbin/pmcstat/pmcstat_log.c
+395-375 files

FreeBSD/src ff46acflib/libusb libusb01.c libusb20_ugen20.c, sys/dev/usb usb_generic.c

usb: implement attach kernel driver feature

FreeBSD's USB framework supports detaching kernel drivers to allow
user space applications to exclusively claim USB interfaces. However,
it lacked support for reattaching the kernel driver afterward.

This commit adds the missing functionality, enabling user space
to return control of the device back to the kernel.

Reviewed by:    lwhsu
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52122
DeltaFile
+22-0sys/dev/usb/usb_generic.c
+18-0lib/libusb/libusb01.c
+16-0usr.sbin/usbconfig/usbconfig.c
+12-0lib/libusb/libusb20_ugen20.c
+11-0lib/libusb/libusb20.3
+11-0lib/libusb/libusb20.c
+90-09 files not shown
+116-715 files

FreeBSD/src f056e84sys/dev/virtio/scsi virtio_scsi.c virtio_scsi.h

virtio-scsi: handle device capacity change event

This feature is utilized when updating storage capacity in capable hypervisors such as QEMU.

Reviewed by:    imp
Approved by:    imp(mentor)
Obtained from:  Fudo Security
MFC after:      2 weeks
Sponsored by:   Fudo Security
Differential Revision:  https://reviews.freebsd.org/D57247
DeltaFile
+24-0sys/dev/virtio/scsi/virtio_scsi.c
+9-0sys/dev/virtio/scsi/virtio_scsi.h
+1-0sys/dev/virtio/scsi/virtio_scsivar.h
+34-03 files

FreeBSD/src b440741tools/test/stress2/misc msdos12.sh

tools/test/stress2/misc/msdos12.sh: fix permission issue

This test runs with rights of an un-privileged user writing to a file
system only writable by the owner. Since no UID was provided in the
mount command, the owner of the file system was "root", and thus
writing was not allowed for $testuser. Fix this issue by mounting
with "-u $testuser".

MFC after:      3 days
DeltaFile
+1-1tools/test/stress2/misc/msdos12.sh
+1-11 files

FreeBSD/src 92ae21esys/arm64/arm64 freebsd32_machdep.c

sys/arm64: fix return values of freebsd32_{set,swap}context()

This patch aligns the return values of freebsd32_{set,swap}context()
with their counterparts on amd64 and powerpc64, fixing the setcontext()
and swapcontext() calls in armv7 applications running on aarch64.

In particular, this fixes random crashes in armv7 Ruby applications
running on aarch64 hosts.

Tested by:      fuz
MFC after:      1 week
DeltaFile
+2-2sys/arm64/arm64/freebsd32_machdep.c
+2-21 files

FreeBSD/src 3260c42tools/test/stress2/misc all.exclude

tools/test/stress2/misc/all.exclude: remove msdos24.sh

Remove test for UFC-16 surrogate pairs in file names from this exclude
list, since kernel support has been committed and the test can be now
expected to succeed.

MFC after:      3 days
DeltaFile
+0-1tools/test/stress2/misc/all.exclude
+0-11 files

FreeBSD/src 596dadbtools/test/stress2/misc msdos24.sh

tools/test/stress2/misc/msdos24.sh: improve surrogate pair test

Instead of varying only the low surrogate do also randomly choose a
suitable high surrogate.

MFC after:      3 days
DeltaFile
+10-2tools/test/stress2/misc/msdos24.sh
+10-21 files

FreeBSD/src 6e5b990tools/test/stress2/misc all.debug.inc

tools/test/stress2/misc/all.debug.inc: skip undefined variables

On my ZFS based systems, no allocations occur with tags "newblk" or
"freework". This leads to errors executing the tests that check for
memory leaks. Skip the checks if the output of wmstat -m does not
contain lines corresponding to those allocations.

MFC after:      3 days
DeltaFile
+4-2tools/test/stress2/misc/all.debug.inc
+4-21 files

FreeBSD/src de639dcsys/net/route route_ctl.c nhgrp_ctl.c

routing: Enable hash_outbound during nhgrp allocation

Multipath routes can be added via both RTM_F_CREATE and RTM_F_APPEND.
Therefore, it's possible to have mpath routes without calling
add_route_flags_mpath.

Instead of checking V_fib_hash_outbound for every route append,
check it during nhgrp_ctl initialization, which is only called for
the first multipath request per rib_head.

PR:             293136
Reviewed by:    glebius
Tested by:      Marek Zarychta <zarychtam at plan-b.pwste.edu.pl>
Differential Revision:  https://reviews.freebsd.org/D57469
DeltaFile
+1-14sys/net/route/route_ctl.c
+6-0sys/net/route/nhgrp_ctl.c
+7-142 files

FreeBSD/src 93a234ausr.sbin/virtual_oss/virtual_oss main.c int.h

virtual_oss(8): Make sndstat FD global

There is no reason to have per-profile copies, plus this way we open
/dev/sndstat multiple times if more than 1 profile is created.

Also close the FD on exit to avoid leaking.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    jrm
Pull-Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/41
DeltaFile
+9-7usr.sbin/virtual_oss/virtual_oss/main.c
+0-1usr.sbin/virtual_oss/virtual_oss/int.h
+9-82 files

FreeBSD/src 0bd5ef6usr.sbin/virtual_oss/virtual_oss main.c int.h

virtual_oss(8): Properly cleanup cuse(3)

virtual_oss(8) does not currently keep track of the cuse(3) it creates,
nor does it destroy any of them on exit, except for the control device.
This is harmless if virtual_oss(8) is killed after all audio streams
have been shut down, but if it's killed during I/O, the process hangs
and/or goes into uninterruptible sleep state.

To fix this, have pointers to all cuse(3) devices, and explicitly
destroy them on exit. Also make sure we don't leak memory in
dup_profile().

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    jrm
Pull-Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/41
DeltaFile
+35-4usr.sbin/virtual_oss/virtual_oss/main.c
+2-0usr.sbin/virtual_oss/virtual_oss/int.h
+37-42 files

FreeBSD/src 0d644b4usr.bin/renice renice.c, usr.bin/renice/tests renice_test.sh

Revert "improve renice user error messages"

This reverts commit 925f53682469ea12c017b48114b16e8f1627fb0b. The tests are wrong,
so I'm reverting and reopening the pull request.
DeltaFile
+0-57usr.bin/renice/tests/renice_test.sh
+4-27usr.bin/renice/renice.c
+4-842 files

FreeBSD/src ca66129crypto/openssl/apps testrsa.h, crypto/openssl/crypto/cast cast_s.h

openssl: update to 3.0.21

This change is a security release which resolves several issues with OpenSSL 3.0,
the highest severity issue being ranked "High". Users are strongly encouraged to
update to this release.

More information about the release (from a high level) can be found in
the release notes [1].

Tested with:    (make tinderbox; spotchecks on dev hosts)

1. https://github.com/openssl/openssl/blob/openssl-3.0.21/NEWS.md

- :main and :stable/15 run OpenSSL 3.5 and :stable/14, et al runs
  OpenSSL 3.0.
- This is not a merge commit because our pre-receive checkers still
  don't allow direct MFVs without going through :main first.
- This is a direct commit to stable/14.
DeltaFile
+449-4,467crypto/openssl/apps/testrsa.h
+284-2,821crypto/openssl/test/pkcs12_format_test.c
+224-2,214crypto/openssl/test/evp_extra_test2.c
+257-2,049crypto/openssl/crypto/cast/cast_s.h
+248-1,965crypto/openssl/fuzz/server.c
+129-1,793crypto/openssl/test/siphash_internal_test.c
+1,591-15,309913 files not shown
+5,374-22,558919 files

FreeBSD/src 14e93e3sys/dev/mxge if_mxge.c

mxge(4): Fix a typo in a source code comment

- s/deterimine/determine/

MFC after:      3 days
DeltaFile
+1-1sys/dev/mxge/if_mxge.c
+1-11 files

FreeBSD/src 9d10b4dusr.bin/xinstall xinstall.c install.1

install: drop obsolete file size limit for -C

Removes the file size limit for -C comparisons. The limit was
meant to prevent oversized mmap allocations, which is no longer
relevant as mmap is no longer used here (removed by
a0439a1b820fa0e742c00d095f5f5c06f5f19432, review D44809).
Credit to bdrewery.
See: https://reviews.freebsd.org/D57230

Reviewed by:    bdrewery, glebius, ziaee
Approved by:    glebius (mentor)
Obtained from:  Fudo Security
MFC after:      2 weeks
Sponsored by:   Fudo Security
Differential Revision:  https://reviews.freebsd.org/D57503
DeltaFile
+45-60usr.bin/xinstall/xinstall.c
+2-11usr.bin/xinstall/install.1
+1-1usr.bin/xinstall/Makefile
+48-723 files

FreeBSD/src 64b053ftests/sys/posixshm memfd_test.c

memfd_test: skip hugetlb testcase when large page requests are not supported

Fixes this CI test failure: https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16606/testReport/junit/sys.posixshm/memfd_test/hugetlb/

Reviewed by:    kevans
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57289
DeltaFile
+5-2tests/sys/posixshm/memfd_test.c
+5-21 files

FreeBSD/src b61ab2dshare/man/man5 src.conf.5, share/mk src.opts.mk

src.opts.mk: enable OPENSSL_KTLS by default on riscv64

1e649491b8567151270095fda3bce8faea394952 enabled KERN_TLS in
riscv/conf/GENERIC, but didn't enable OPENSSL_KTLS.

This passes all testcases in the sys/kern/ssl_sendfile suite and
fixes CI failures seen here:
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16606/testReport/sys.kern/ssl_sendfile/

PR:     293810
Fixes:  1e649491b8567151270095fda3bce8faea394952
MFC after:      3 days
Reviewed by:    gallatin, ngie
Differential Revision:  https://reviews.freebsd.org/D57316
DeltaFile
+3-3share/man/man5/src.conf.5
+2-2share/mk/src.opts.mk
+5-52 files