FreeBSD/src 92c69c7sys/geom/label g_label.c

glabel(8): Fix debug message for already existing labels

Remove the duplicate (incorrect) name.

PR:             294542
Reviewed by:    markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56400
DeltaFile
+2-2sys/geom/label/g_label.c
+2-21 files

FreeBSD/src b6b0afesys/vm vm_swapout.c

vm_swapout: Remove a special case from vm_swapout_map_deactivate_pages()

John points out that this probably should have been removed in commit
472888018ce, which removed a special case where we'd set desired=0 if
the target process has P_INMEM clear.  It's not obvious to me that the
desired=0 case can't arise by setting an RSS limit to 0, but I'm not
sure why we'd try to go the extra mile in that case anyway.

Reported by:    jhb
Reviewed by:    kib
MFC after:      2 weeks
Fixes:          472888018ce1 ("proc: Remove kernel stack swapping support, part 6")
Differential Revision:  https://reviews.freebsd.org/D56140
DeltaFile
+0-13sys/vm/vm_swapout.c
+0-131 files

FreeBSD/src 0c09c65tests/sys/fs/fusefs rename.cc

tests/fusefs: appease gcc -Wcast-qual

Fix gcc build error.

Reviewed by:    asomers, kib
Fixes:  7e68af7ce2c1 ("fusefs: redo vnode attribute locking")
Differential Revision:  https://reviews.freebsd.org/D56370
DeltaFile
+2-2tests/sys/fs/fusefs/rename.cc
+2-21 files

FreeBSD/src 1dddb58sys/conf ldscript.arm64

arm64: Define the .iplt section placement.

Ensure that the .plt and .ipld sections are in the executable memory segment.

MFC after:      1 week
Reviewed by:    andrew
Differential Revision: https://reviews.freebsd.org/D56403
DeltaFile
+6-1sys/conf/ldscript.arm64
+6-11 files

FreeBSD/src 18b7115sys/netinet ip_mroute.c, sys/netinet6 ip6_mroute.c

ip_mroute: Fix a lock leak in X_ip_mforward()

If a FIB does not have a router configured, X_ip_mforward() would leak a
lock.  Plug the leak.

The IPv6 counterpart did not have such a check.  It wouldn't send an
upcall to a non-existent router anyway due to the router_ver check, but
we should verify that a router is present anyway.

Add regression test cases to exercise these code paths.

Reported by:    Claude Opus 4.6
Fixes:          0bb9c2b665d9 ("ip6_mroute: FIBify")
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield
DeltaFile
+140-13tests/sys/netinet/ip_mroute.py
+3-1sys/netinet/ip_mroute.c
+4-0sys/netinet6/ip6_mroute.c
+147-143 files

FreeBSD/src e99b3f5usr.bin/du/tests du_test.sh

du: Fix t_flag test case

MFC after:      1 week
Fixes:          3e5550d25c6d ("du: Add regression tests")
Sponsored by:   Klara, Inc.
DeltaFile
+1-1usr.bin/du/tests/du_test.sh
+1-11 files

FreeBSD/src 6c18dd3usr.bin/du du.c du.1, usr.bin/du/tests du_test.sh

du: Complete libxo transition

* Use xo_warn() / xo_err() instead of warn() / err().

* Add a test case for the POSIX-mandated stdout error check.

* While here, don't assume the size of off_t, address some style issues,
  and broaden the use of bool instead of int.

* Reorder SEE ALSO section.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    allanjude
Differential Revision:  https://reviews.freebsd.org/D56402
DeltaFile
+26-24usr.bin/du/du.c
+18-0usr.bin/du/tests/du_test.sh
+2-2usr.bin/du/du.1
+46-263 files

FreeBSD/src 52d2fc7sys/compat/linuxkpi/common/include/linux kfifo.h

linuxkpi: Fix an off-by-one error in the kfifo implementation

"total" is the number of slots in the array, so wraparound needs to be
done when "first" or "last" is greater than or equal to the number of
slots.

Note that no consumers of the code are currently connected to the kernel
build.

Reported by:    Stanislav Fort <stanislav.fort at aisle.com>
Reviewed by:    bz, emaste
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56371
DeltaFile
+2-2sys/compat/linuxkpi/common/include/linux/kfifo.h
+2-21 files

FreeBSD/src bb36c45sys/dev/pci pcireg.h, sys/dev/thunderbolt nhi_pci.c nhi.c

thunderbolt: Support generic USB4 NHIs

Check a PCI device's class, subclass, and progif to figure out if it is
a USB4 NHI. nhi_identifiers is completely removed as only these generic
USB4 NHIs are supported anyway, and all remnants of ICM-supporting code
are removed too. All devices now use the HCM.

PR:             290827
Reviewed by:    jhb, ngie
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52861
DeltaFile
+5-116sys/dev/thunderbolt/nhi_pci.c
+3-46sys/dev/thunderbolt/nhi.c
+0-18sys/dev/thunderbolt/nhi_var.h
+0-12sys/dev/thunderbolt/tb_pcib.c
+1-0sys/dev/pci/pcireg.h
+9-1925 files

FreeBSD/src 78bf20dlib/libc/tests/string strrchr_test.c Makefile

libc/tests/string: add a more comprehensive unit test for strrchr()

The unit tests are patterned after those for memrchr().
This catches the issue found in 293915.

PR:             293915
Reviewed by:    strajabot
Reported by:    safonov.paul at gmail.com
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56037

(cherry picked from commit 8b5d77bbcbd98e684226950be1c779e108059d8d)
DeltaFile
+156-0lib/libc/tests/string/strrchr_test.c
+2-0lib/libc/tests/string/Makefile
+158-02 files

FreeBSD/src e4f02a7lib/libc/tests/string strrchr_test.c Makefile

libc/tests/string: add a more comprehensive unit test for strrchr()

The unit tests are patterned after those for memrchr().
This catches the issue found in 293915.

PR:             293915
Reviewed by:    strajabot
Reported by:    safonov.paul at gmail.com
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56037

(cherry picked from commit 8b5d77bbcbd98e684226950be1c779e108059d8d)
DeltaFile
+156-0lib/libc/tests/string/strrchr_test.c
+2-0lib/libc/tests/string/Makefile
+158-02 files

FreeBSD/src a6bd704usr.bin/sockstat sockstat.1

sockstat: Unbreak SEE ALSO section

MFC after:      1 week
Fixes:          7b35b4d19630 ("sockstat: add libxo support")
DeltaFile
+3-3usr.bin/sockstat/sockstat.1
+3-31 files

FreeBSD/src ab57518sys/sys abi_types.h

sys/abi_types.h: Stick with 32-bit time32_t

This unbreaks zfs on non-x86 64-bit architectures.
DeltaFile
+2-0sys/sys/abi_types.h
+2-01 files

FreeBSD/src 47a9af4. UPDATING, libexec/rc/rc.d NETWORKING

rc.d/NETWORKING: remove the NETWORK alias

NETWORKING is the documented placeholder, while
/etc/rc.d/NETWORKING still provides the legacy alias
NETWORK.

The NETWORKING script was originally introduced to avoid
conflicts with NetBSD's lowercase network script on
case-insensitive file systems.  The NETWORK alias was
retained for compatibility with older scripts.

Following the discussion in PR 293652, remove the legacy
NETWORK alias from 16-CURRENT.  Keeping both names adds
more confusion than value now that NETWORKING is the
documented placeholder and current base system and ports
tree uses are already clean.

Add an UPDATING entry to note that local RC scripts using
REQUIRE: NETWORK should be migrated to REQUIRE: NETWORKING.

    [5 lines not shown]
DeltaFile
+6-0UPDATING
+1-1libexec/rc/rc.d/NETWORKING
+7-12 files

FreeBSD/src c80f525usr.sbin/daemon daemon.c

daemon(8): Add "--output-file -o" to list of options enabling supervision mode

This is the small internal doc fix from https://reviews.freebsd.org/D46313

Reviewed by:    michaelo
Approved by:    (blanket; comment fix)
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D55325

(cherry picked from commit e9a69948a8837601d71e556550a272ca85c03e48)
DeltaFile
+1-0usr.sbin/daemon/daemon.c
+1-01 files

FreeBSD/src 2620eb7usr.sbin/daemon daemon.c

daemon(8): Add "--output-file -o" to list of options enabling supervision mode

This is the small internal doc fix from https://reviews.freebsd.org/D46313

Reviewed by:    michaelo
Approved by:    (blanket; comment fix)
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D55325

(cherry picked from commit e9a69948a8837601d71e556550a272ca85c03e48)
DeltaFile
+1-0usr.sbin/daemon/daemon.c
+1-01 files

FreeBSD/src 5aa751cusr.sbin/daemon daemon.c

daemon(8): Add "--output-file -o" to list of options enabling supervision mode

This is the small internal doc fix from https://reviews.freebsd.org/D46313

Reviewed by:    michaelo
Approved by:    (blanket; comment fix)
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D55325

(cherry picked from commit e9a69948a8837601d71e556550a272ca85c03e48)
DeltaFile
+1-0usr.sbin/daemon/daemon.c
+1-01 files

FreeBSD/src 00dccc3sys/sys time.h

sys/time: appease gcc -Wtype-limits

In environments where time_t is 32 bits, including the 32-bit library
build on amd64, the overflow being tested for cannot happen, and gcc
complains with -Wtype-limits, causing the gcc build to fail.  Work
around this by ifdef'ing out the saturation code on i386.

Reviewed by:    imp, jfree
Discussed with: markj
Fixes:  e3799530b3ba ("sys/time: Add saturating sbt conversions")
Differential Revision:  https://reviews.freebsd.org/D56369
DeltaFile
+4-0sys/sys/time.h
+4-01 files

FreeBSD/src 94d4be9usr.bin/stat/tests stat_test.sh

stat: Nits in stat tests

* Use ourselves as test file instead of /COPYRIGHT, which may or may not
  be present in the test environment.

* atf-check understands \n in strings, use it.

* Some file systems don't like creating small holes, so create large ones
  instead.  This means we need two variables: ps (page size) is the
  minimum size of a data region and the alignment for a hole, while hs
  (hole size) is the minimum size of the holes we create.  This makes no
  difference on FreeBSD but makes it easier to port the test to other
  platforms.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D56304

(cherry picked from commit 8cbd3949297d56e3960dcde73bd7e2277ac4bee8)
DeltaFile
+13-12usr.bin/stat/tests/stat_test.sh
+13-121 files

FreeBSD/src 9d89e57usr.bin/stat/tests readlink_test.sh

stat: Nits in readlink tests

* The f_flag test may fail if a component of the full path to the
  temporary directory is a symbolic link.

* The n_flag test had an empty head; give it a description.

* Use consistent quoting.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D56293

(cherry picked from commit 1c793e7cbe2ecded388fd51fb20274891620a6f4)
DeltaFile
+6-3usr.bin/stat/tests/readlink_test.sh
+6-31 files

FreeBSD/src 3e27114share/man/man4 asmc.4, sys/dev/asmc asmc.c asmcvar.h

asmc: add raw SMC key read/write interface

This patch adds a debugging interface to read and write arbitrary
Apple SMC keys by name through sysctl, enabling hardware exploration
 and control of undocumented features.

The interface provides four sysctls under dev.asmc.0.raw.*:
  - key - Set the 4-character SMC key name (e.g., "AUPO")
  - value - Read/write key value as a hex string
  - len - Auto-detected key value length (can be overridden)
  - type - Read-only 4-character type string (e.g., "ui8", "flt")

Implementation includes a new asmc_key_getinfo() function using SMC
command 0x13 to query key metadata. The interface automatically
detects key lengths and types, uses hex string encoding for
arbitrary binary values, and is safe for concurrent access via
CTLFLAG_NEEDGIANT.

This interface was essential for discovering that the AUPO key

    [5 lines not shown]
DeltaFile
+240-47sys/dev/asmc/asmc.c
+29-0share/man/man4/asmc.4
+19-0sys/dev/asmc/asmcvar.h
+288-473 files

FreeBSD/src 1e7e033lib/msun Makefile, lib/msun/amd64 Makefile.inc

lib/msun: centralize addition of the arch-specific symbol map files

(cherry picked from commit c913dce86e7b6ff9c0c3265631529586aaf8520a)
DeltaFile
+1-0lib/msun/Makefile
+0-1lib/msun/amd64/Makefile.inc
+0-1lib/msun/arm/Makefile.inc
+0-1lib/msun/i387/Makefile.inc
+0-1lib/msun/powerpc/Makefile.inc
+0-1lib/msun/riscv/Makefile.inc
+1-56 files

FreeBSD/src 68c6a73lib/msun/aarch64 fenv.c fenv.h

lib/msun/aarch64: provide export file for arch-specific fenv methods

(cherry picked from commit 96a685c229f2ce440591f98d33d36776e56dd55c)
DeltaFile
+18-0lib/msun/aarch64/fenv.c
+9-5lib/msun/aarch64/fenv.h
+10-0lib/msun/aarch64/Symbol.map
+37-53 files

FreeBSD/src 6b00c65sys/netinet6 in6_pcb.c

inpcb: make in6_pcbdisconnect() just like in_pcbdisconnect()

Allow to be passed with already unconnected inpcb.

Fixes:  4fadf2466468dd6dcb6cf9e3739ed696a18c1bb4
DeltaFile
+3-0sys/netinet6/in6_pcb.c
+3-01 files

FreeBSD/src bf41d86sys/netinet ip_fastfwd.c, sys/netinet6 ip6_fastfwd.c

routing: Make ip[6]_tryforward() FIB-aware for local traffic

`ip_tryforward()` and `ip6_tryforward()` checks whether the destination
address is local or not without considering if it belongs to the current FIB.
If the destination is local but not in our FIB, forward it instead
of returning it to ip_input().

PR:             292319
Reviewed by:    zlei
MFC after:      1 week
MFC to:         stable/15
Differential Revision: https://reviews.freebsd.org/D56353
DeltaFile
+2-2sys/netinet/ip_fastfwd.c
+1-1sys/netinet6/ip6_fastfwd.c
+3-32 files

FreeBSD/src 956acdcsys/net if_loop.c

loopback: Account for packet drops

Make loopback packet drops more obvious by reporting them
in interface stats visable via netstat -ni
Since loopback uses netisr, packets can be dropped if the
netisr queue overflows.  These drops are visible via
netisr -Q, but its not an obvious place to look.

Differential Revision: https://reviews.freebsd.org/D56356
Reviewed by: glebius, tuexen
Sponsored by: Netflix
DeltaFile
+7-3sys/net/if_loop.c
+7-31 files

FreeBSD/src f707cc0sys/netinet tcp_lro.c

lro: move pkt rejection checks to leafs to avoid queueing non-LRO'able pkts

When lro mbuf queuing is enabled, we should not queue easily
reject-able packets. Queuing them does a bit of extra work (sorting,
timestamps) and can potentially delay urgent packets such as LACP
PDUs. This change moves simple rejection tests from lro_rx_common()
into lro_rx and (more importantly) into tcp_lro_queue_mbuf().

Note this change only moves the easy checks on forwarding and packet
metadata, where the rejection criteria is already hot in cache. It
does not move parsing and looking inside the packet to verify the
ether protocol, ip protocol, etc. This could be done, but we risk
essentially doubling the cache misses per-packet by doing so.

Differential Revision: https://reviews.freebsd.org/D56337
Reviewed by: rrs, tuexen
Sponsored by: Netflix
DeltaFile
+52-21sys/netinet/tcp_lro.c
+52-211 files

FreeBSD/src 963f1a5lib/libifconfig libifconfig_sfp.c sfp.lua, sbin/ifconfig sfp.c

ifconfig: add CMIS support for 400GbE optics

Add support for CMIS based optics, typically used by 400GbE
and faster ethernet optics.   The CMIS standard requires paged
support for i2c ioctls.

This has been tested on an Nvidia ConnectX-7 and Broadcom
Thor2 400GbE NIC, and I have verified that optics vendor information,
light levels, and temperatures match the information provided by
various vendor tools.

Differential Revision: https://reviews.freebsd.org/D56265
Reviewed by: kbowling, sumit.saxena_broadcom.com
Sponsored by: Netflix
DeltaFile
+450-0sys/net/cmis.h
+227-1lib/libifconfig/libifconfig_sfp.c
+120-0lib/libifconfig/sfp.lua
+25-2lib/libifconfig/libifconfig_sfp.h
+14-2sbin/ifconfig/sfp.c
+836-55 files

FreeBSD/src c48381dsys/conf files.arm64

qcom_gcc: Only build on arm64 for kernels with FDT

This fixes the build of the LINT-ACPI kernel.

Fixes:          4e3fdced7f78 ("qcom_gcc: migrate the MSM8916 support to qcom_gcc")
DeltaFile
+14-14sys/conf/files.arm64
+14-141 files

FreeBSD/src f4e5b45sys/net if_geneve.c

if_geneve: Fix build without INET or without INET6
DeltaFile
+49-7sys/net/if_geneve.c
+49-71 files