FreeBSD/src ffcd788 — sys/conf files, sys/dev/fdt fdt_reserved_memory.c

fdt: Support SCMI shared memory under reserved-memory nodes

Add a simplebus-based pseudo-bus that matches the "reserved-memory"
node in the device tree.  Update the SCMI shared memory driver so that
it can attach either as a child of mmio_sram or directly under
simplebus (via the new reserved-memory bus). Make the mmio_sram memory
resource shareable so both attachment methods can coexist when required.

MFC after:      1 week
Reviewed by:    manu
DeltaFile
+80-0sys/dev/fdt/fdt_reserved_memory.c
+17-28sys/dev/firmware/arm/scmi_shmem.c
+1-1sys/dev/sram/mmio_sram.c
+1-0sys/conf/files
+99-294 files

FreeBSD/src f9126f8 — sys/dev/bnxt/bnxt_en bnxt_sysctl.h bnxt_hwrm.h

if_bnxt: add support for HW generic stats

HW generic stats provide information about PCIe transactions and
out-of-order doorbell writes, useful for debug. Allocate a DMA buffer
for them (disabling BNXT_FW_CAP_GENERIC_STATS if the allocation
fails), fetch them via HWRM_STAT_GENERIC_QSTATS once per admin-status
tick on P5+ chips, and expose them to userspace under
dev.bnxt.<unit>.hwstats.generic_stats.* via sysctl.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   Broadcom Inc.
Differential Revision:  https://reviews.freebsd.org/D58614

(cherry picked from commit d1619865da1cd4c5b557158b4bbf666e0f7f040b)
DeltaFile
+94-0sys/dev/bnxt/bnxt_en/bnxt_sysctl.c
+20-0sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
+15-0sys/dev/bnxt/bnxt_en/if_bnxt.c
+3-0sys/dev/bnxt/bnxt_en/bnxt.h
+1-0sys/dev/bnxt/bnxt_en/bnxt_sysctl.h
+1-0sys/dev/bnxt/bnxt_en/bnxt_hwrm.h
+134-06 files

FreeBSD/src 30c45bb — sys/dev/bnxt/bnxt_en bnxt_hwrm.c

if_bnxt: avoid FTQM/STQM pg_info alias on reset

Copying the STQM backing-store context to seed FTQM's also copied
STQM's pg_info pointer verbatim. On cold load STQM's pg_info is still
NULL so this is harmless, but on a firmware reset STQM's pg_info is
already non-NULL, making FTQM alias STQM's backing-store pages. The
allocator then skips FTQM since it looks already allocated, and FTQM
is later indexed as its own array, reading out of bounds into STQM's
buffer and dereferencing a bogus DMA address.

Clear ctxm->pg_info after the memcpy so FTQM always gets its own
backing store.

Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   Broadcom Inc.
Differential Revision:  https://reviews.freebsd.org/D58615

(cherry picked from commit f2ce672ade231a1e19f1238922a2c3b6fe696e22)
DeltaFile
+3-0sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
+3-01 files

FreeBSD/src 443c423 — sys/dev/bnxt/bnxt_en if_bnxt.c

if_bnxt: add support for SIOCGI2CPB page/bank i2c requests

Advertise IFLIB_I2C_PAGE_BANK and forward the requested page/bank to
firmware, so CMIS optics can be read correctly instead of falling
back to bogus legacy SFF-8472 decoding. Also fix bnxt_i2c_req() to
return positive errno values.

Signed-off-by:  gallatin
Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   Broadcom Inc.
Differential Revision:  https://reviews.freebsd.org/D59573

(cherry picked from commit fdab50f6f8107c9d825a7e6d92d7a6b89c417bbb)
DeltaFile
+22-4sys/dev/bnxt/bnxt_en/if_bnxt.c
+22-41 files

FreeBSD/src 72d79af — sys/dev/bnxt/bnxt_en bnxt_dcb.c

bnxt_en: dcb: stop zeroing ETS and PFC config in bnxt_dcb_init()

bnxt_dcb_init() currently pushes all-zero ETS and PFC settings to
the firmware at every attach. This reserves bandwidth allocation
for RoCE traffic, which prevents L2 traffic from reaching line rate.

These settings should only be updated with valid values when the
RoCE driver is loaded. Therefore, we should stop programming them
during bnxt_dcb_init().

Signed-off-by:  Andy Gospodarek <gospo at broadcom.com>
Reviewed by:    chandrakanth.patil_broadcom.com, gallatin
MFC after:      2 weeks
Sponsored by:   Broadcom Inc.
Differential Revision:  https://reviews.freebsd.org/D60516

(cherry picked from commit 31cbd8f27d687ce9b10a22c858296532be400bb4)
DeltaFile
+0-6sys/dev/bnxt/bnxt_en/bnxt_dcb.c
+0-61 files

FreeBSD/src 372803c — sys/dev/bnxt/bnxt_en if_bnxt.c

if_bnxt: Fix interrupt storm on Thor2

An interrupt storm was observed on Thor2 because the Rx CQ consumer
index was always one less than it should be. Correct the Rx CQ
consumer index to fix the storm.

Reported by:    gallatin
Reviewed by:    gallatin
MFC after:      2 weeks
Sponsored by:   Broadcom Inc.
Differential Revision:  https://reviews.freebsd.org/D58602

(cherry picked from commit 8c69a5dc60b3630a4c5bca0bda714f791324afad)
DeltaFile
+1-2sys/dev/bnxt/bnxt_en/if_bnxt.c
+1-21 files

FreeBSD/src 4e699cf — libexec/nuageinit nuageinit, libexec/nuageinit/tests nuageinit.sh

nuageinit: apply meta-data if user-data is a script

Tested by:      adam.mizerski at ovhcloud.com
Sponsored by:   OVHcloud
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2446

(cherry picked from commit de0a279c8b6967ffd1cb0c9f76d3cc4658a0f1aa)
DeltaFile
+14-12libexec/nuageinit/nuageinit
+16-3libexec/nuageinit/tests/nuageinit.sh
+30-152 files

FreeBSD/src 6c43154 — libexec/rc/rc.d nuageinit

nuageinit: fix support on OpenStack

Change added in 90a7728cd8905cd26b90d06f7873df8bad43ae9a contained a
lot of bugs:
- If all network interfaces correctly respond to DHCP, then pwait was
waiting forever.
- If there was more than 1 interface, then "cat
/tmp/ephemeraldhcp.*.pid" joined pid numbers into one long string.
- "for iface in $left; do kill -15 $left; done" is not using $iface.

Tested by:      adam.mizerski at ovhcloud.com
Sponsored by:   OVHcloud
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2436

(cherry picked from commit 13d5f20e5b9ecb42ecf7de4e98d5af0bd5d63c82)
DeltaFile
+6-8libexec/rc/rc.d/nuageinit
+6-81 files

FreeBSD/src 69a263e — sys/compat/linuxkpi/common/include/linux scatterlist.h, sys/compat/linuxkpi/common/src linux_pci.c

LinuxKPI: Add dma_length field to struct scatterlist

On Linux `dma_length` field of `struct scatterlist` is present on the
arches where DMA mapping code is able to coalesce adjacent segments
of physical address space. It contains total length of coalesced
segments while `length` field contains non-coalesced length of each
segment. On other arches `dma_length` is aliased to `length` field with
`sg_dma_len` macro. As FreeBSD does not merge scatterlist segments it
do not have `dma_length` field. It is appered that at least i915kms
driver depends on existence of `dma_length` field.

Add the field and disable it by default. To enable add to Makefile

.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \\
    ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "powerpc"
CFLAGS+=        -DCONFIG_NEED_SG_DMA_LENGTH
.endif

Reported by:    Ryan Fahy

    [6 lines not shown]
DeltaFile
+17-9sys/compat/linuxkpi/common/include/linux/scatterlist.h
+1-0sys/compat/linuxkpi/common/src/linux_pci.c
+18-92 files

FreeBSD/src 74ea8dd — sys/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.

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

FreeBSD/src 54118e1 — share/man/man4 ps5dsense.4, sys/conf files NOTES

hid: Add Sony DualSense gamepad driver

Add a driver for the Sony PS5 DualSense controller (054c:0ce6)
providing gamepad input via evdev, lightbar RGB LED control, and
player indicator LEDs through sysctl.

Signed-off-by:  Christos Longros <chris.longros at gmail.com>
Reviewed by:    ziaee, wulf
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D56345

(cherry picked from commit d8e315ba975163a2050dd3d3e193f2472dbc2478)
DeltaFile
+472-0sys/dev/hid/ps5dsense.c
+145-0share/man/man4/ps5dsense.4
+8-0sys/modules/hid/ps5dsense/Makefile
+1-0sys/modules/hid/Makefile
+1-0sys/conf/files
+1-0sys/conf/NOTES
+628-01 files not shown
+629-07 files

FreeBSD/src c3f6fef — lib/libsys sysarch.2, lib/libsys/x86 Makefile.sys sysarch.x86.2

sysarch.x86.2: manual page for the sysarch(2) functions on x86

(cherry picked from commit bdcfeac3e1cb8ce3f05c32d8a7ad3597deb48bdf)
DeltaFile
+659-0lib/libsys/x86/sysarch.x86.2
+2-1lib/libsys/x86/Makefile.sys
+2-1lib/libsys/sysarch.2
+663-23 files

FreeBSD/src a401023 — sys/compat/linux linux_event.c

linux: preserve epoll descriptors across fork using KQUEUE_CPONFORK

(cherry picked from commit b3836322a1e6863734427ac9c01381ab25458126)
DeltaFile
+1-1sys/compat/linux/linux_event.c
+1-11 files

FreeBSD/src 4a6f371 — sys/amd64/include floatingpoint.h, sys/arm/include floatingpoint.h

machine/floatingpoing.h: harmonize all arches

(cherry picked from commit 43c79c64af480dad96ba8cf73fb010239dd088d2)
DeltaFile
+2-34sys/i386/include/floatingpoint.h
+2-34sys/amd64/include/floatingpoint.h
+2-33sys/arm/include/floatingpoint.h
+2-29sys/powerpc/include/floatingpoint.h
+8-0sys/riscv/include/floatingpoint.h
+8-0sys/arm64/include/floatingpoint.h
+24-1306 files

FreeBSD/src 41435c7 — sys/dev/pty pty.c

pty: preserve O_NONBLOCK when opening /dev/ptmx

(cherry picked from commit 495bc1924edfd474c479df61ec35bdf6a83a8d17)
DeltaFile
+1-1sys/dev/pty/pty.c
+1-11 files

FreeBSD/src 16f4a87 — sys/dev/mlx5/mlx5_ib mlx5_ib_devx.c, sys/ofed/include/uapi/rdma mlx5_user_ioctl_cmds.h

mlx5: support DevX UMEM page size bitmap

(cherry picked from commit 78ae174e420a2eaa340b41247a260bc067fae0c6)
DeltaFile
+143-9sys/dev/mlx5/mlx5_ib/mlx5_ib_devx.c
+1-0sys/ofed/include/uapi/rdma/mlx5_user_ioctl_cmds.h
+144-92 files

FreeBSD/src 564bbc9 — sys/conf newvers.sh, usr.bin/yacc config.h

15.2: Update stable/15 to -PRERELEASE

This marks the start of the FreeBSD 15.2 release cycle; the stable/15
tree is now in "code slush".

Developers are encouraged to prioritize fixing bugs (and/or merging bug
fixes from HEAD) over new features at this time.  Commit approval from
re@ is not required but if new features introduce problems they may be
removed from the release.

Approved by:    re (implicit)
Sponsored by:   OpenSats Initiative
DeltaFile
+2-2sys/conf/newvers.sh
+1-1usr.bin/yacc/config.h
+3-32 files

FreeBSD/src 775e421 — sys/dev/nvme nvme_if.m

nvme: Fix default is_storage_device kobj method

makeobjops.awk only accepts an uppercase DEFAULT before a default kobj
method. This commit fixes a typo introduced in 949804c81909 so non-PCI
drivers actually use nvme_is_storage_device_default instead of
kobj_error_method. Note that even though kobj_error_method returns
ENXIO (6), it does not get implicitly cast to a bool due to the function
pointer casting in the nvme_if.h generated by makeobjops. Instead the
codegen for the NVME_IS_STORAGE_DEVICE callsite shows that only the
lowest bit is being checked as if it were always a bool. Without this
any nvme driver that doesn't implement is_storage_device is not treated
as a storage device.

Reviewed by:    imp, kevans
Differential Revision:  https://reviews.freebsd.org/D60112
DeltaFile
+1-1sys/dev/nvme/nvme_if.m
+1-11 files

FreeBSD/src a4dc618 — sys/netipsec key.c

netipsec: Fix V_spd_size updates

key_unregister_ifnet() was erroneously decrementing the size of the
global security policy database, V_sptree, but it doesn't modify that
database.  V_sptree_ifnet is for policies attached to if_ipsec
interfaces.  Note also that key_register_ifnet() was not incrementing
the counter.

Move the definition of V_spd_size up to the rest of the SPD definitions.
Its inclusion among the SPD cache definitions was confusing to me.

Reviewed by:    ae
Reported by:    Stephan de Wit and Cedrik Pischem from OPNsense
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D60418

(cherry picked from commit 6b1d5fec57f9604a447864ec5e66940126b38df4)
DeltaFile
+4-3sys/netipsec/key.c
+4-31 files

FreeBSD/src 8aee0c3 — sys/dev/gve gve_tx.c gve_rx.c

gve: fix kernel panic on attach failure

When device initialization fails during attach (for instance, if device
resource configuration or firmware negotiation fails), the driver aborts
and unrolls partial state via its detach routine. However, the teardown
path assumes transmit and receive queues have already been created. If
attach aborts before queue allocation, tearing down the uninitialized
queues triggers a NULL pointer dereference and panics the kernel during
boot.

Guard queue teardown against uninitialized queue state so that early
attach failures unwind safely, allowing the driver to report the failure
gracefully without crashing the operating system.

Signed-off-by: Jasper Tran O'Leary <jtranoleary at google.com>

Reviewed by:    adrian, markj
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D60385

    [2 lines not shown]
DeltaFile
+10-6sys/dev/gve/gve_main.c
+3-0sys/dev/gve/gve_tx.c
+3-0sys/dev/gve/gve_rx.c
+16-63 files

FreeBSD/src 8fcf4d4 — sys/amd64/vmm x86.c

amd64/vmm: Don't advertise support for performance counters

vmm doesn't implement them, and after commit 2272fac218a8
("hwpmc: Add support for AMD-only IRPERF in hwpmc PERF class"), FreeBSD
guests fail to boot since they access the unimplemented IRPERF MSR.

MFC after:      1 week

(cherry picked from commit c83e075d72f62c91cb27dd644a62d6a6f5bd56ba)
DeltaFile
+1-2sys/amd64/vmm/x86.c
+1-21 files

FreeBSD/src fe99b55 — sys/dev/gve gve_utils.c

gve: fix double free on ring allocation failure

When gve_alloc_rings fails (such as when failing to acquire MSI-X
vectors or during partial ring allocation), ring cleanup can be
executed multiple times across nested error paths (e.g. within
gve_alloc_rings abort and gve_attach abort).

Because gve_free_counters invoked counter_u64_free without nullifying
the pointer in the stats array, repeated invocation caused a double-free
panic when freeing the same counter references.

Check for non-NULL before freeing and nullify each counter pointer
upon release in gve_free_counters.

Signed-off-by: Jasper Tran O'Leary <jtranoleary at google.com>

Reviewed by:    adrian, markj
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D60386

    [2 lines not shown]
DeltaFile
+6-2sys/dev/gve/gve_utils.c
+6-21 files

FreeBSD/src b3a94e0 — sys/net if_epair.c

epair: Make vnet_epair_uninit() run earlier

I can't see a reason for vnet_epair_init() and vnet_epair_uninit() to be
inconsistent in the sys(un)init run order.  Move vnet_epair_uninit() to
SI_SUB_PSEUDO, which is more appropriate for software ifnet drivers.

Reviewed by:    glebius
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60388

(cherry picked from commit 5c20c75b67e3c96d58c1bbfe82472a8371bfa161)
DeltaFile
+1-1sys/net/if_epair.c
+1-11 files

FreeBSD/src 56280cd — sys/amd64/conf GENERIC

amd64: Revert an unintended change to GENERIC

Fixes:  767cd9bb4200 ("vm_swapout: Fix the build without options RACCT")
(cherry picked from commit ec8b68ba8a4ad3b020805322f7c676869978a480)
DeltaFile
+3-3sys/amd64/conf/GENERIC
+3-31 files

FreeBSD/src b608a3e — tests/sys/kern timerfd.c, tests/sys/kqueue kqueue_fork.c

tests/sys/kern: Skip some timer tests if ncpu == 1

PR:             299223
MFC after:      1 week

(cherry picked from commit 62f54beab05a196fd05170eafcc7715b3f4150b0)
DeltaFile
+3-0tests/sys/kqueue/kqueue_fork.c
+3-0tests/sys/kern/timerfd.c
+6-02 files

FreeBSD/src deceef2 — sys/amd64/conf GENERIC, sys/vm vm_swapout.c

vm_swapout: Fix the build without options RACCT

Reported by:    Jenkins
Fixes:          da0764f23554 ("vm_swapout: Restore handling of RLIMIT_RSS")

(cherry picked from commit 767cd9bb420008a3ebeef65fe1d31eab60d61028)
DeltaFile
+6-1sys/vm/vm_swapout.c
+3-3sys/amd64/conf/GENERIC
+9-42 files

FreeBSD/src feb1931 — lib/libc/gen sysctl.3, sys/kern kern_sysctl.c

sysctl: Return ECAPMODE when trying to access sysctls in capability mode

We have always returned EPERM in this case, but it's incorrect, we
should return ECAPMODE for capability mode violations.  Fix the errno
value.

Reviewed by:    emaste
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D59887

(cherry picked from commit a76e986470f86731dd3a5f9eeae1ba28b8b160fb)
DeltaFile
+3-0lib/libc/gen/sysctl.3
+1-1sys/kern/kern_sysctl.c
+4-12 files

FreeBSD/src 5a5c0b5 — sys/cddl/contrib/opensolaris/uts/common/sys dtrace_impl.h, sys/cddl/dev/dtrace/aarch64 dtrace_isa.c dtrace_asm.S

dtrace/arm64: Fix copyout and copyoutstr

Calling dtrace_copy and dtrace_copystr with the kaddr and uaddr
arguments inversed does not work with PAN. Rename them
dtrace_copyin_pan and dtrace_copyinstr_pan, respectively, and
implement dtrace_copyout_pan and dtrace_copyoutstr_pan.

Avoid excessive faulting by checkin DTrace's CPU flags. Implement the
trick from OpenSolaris/Illumos of only checking the flags when
crossing into a new page, altough more effectively by examining the
vaddr instead of the count.

Reviewed by:    markj
MFC after:      3 weeks
Differential Revision:  https://reviews.freebsd.org/D59449

(cherry picked from commit a6deeaa2fb3b28a61ae56a85f2275f67fcf23262)
DeltaFile
+62-6sys/cddl/dev/dtrace/aarch64/dtrace_asm.S
+5-5sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h
+4-4sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
+71-153 files

FreeBSD/src 20dbc46 — sys/netinet ip_icmp.c, sys/netinet6 icmp6.c

icmp: Limit routing table updates to the FIB of the redirect

When we receive an ICMP redirect, rib_add_redirect() is used to apply
the redirect to all FIBs.  This has been the case since support for
multiple FIBs was added.  However, it seems rather dubious: the new
gateway might not be routable from all FIBs, and the validation done for
v4 redirects in icmp_verify_redirect_gateway() is only applied to the
FIB from which the redirect originated.

Modify the handler to apply the redirect only in the originating FIB.

Reported by:    Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li,
                and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai
Reviewed by:    pouria, zlei, glebius, melifaro
MFC after:      3 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59567

(cherry picked from commit 01a95394abfdef2adb3216e74d88b9c33321260e)
DeltaFile
+4-7sys/netinet/ip_icmp.c
+3-5sys/netinet6/icmp6.c
+7-122 files

FreeBSD/src 6851fbd — lib/libsys inotify.2

inotify.2: Add some entries to the BUGS section

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit fa6fe034a73c8b17320d1e68767ad2aa99eaa8bf)
DeltaFile
+25-1lib/libsys/inotify.2
+25-11 files