FreeBSD/src 96a1a33 — sys/net if_lagg.c

lagg: re-check port caps after bringing up a port

Some nic drivers (including iflib) do not initialize if_hwassist
until after the interface is brought up.  If a lagg member is included
in a lagg when its not yet been brought up, that will cause lagg to see
if_hwassist=0 and will disable all checksum offload, etc, on the interface.
This is almost impossible to debug without kgdb or dtrace, as ifconfig does
not surface if_hwassist.

Fix this by re-calculating lagg caps (including if_hwassist) after adding a port.

I encountered this problem when I had a commented-out if_foo1=up entry in
my rc.conf that i neglected to uncomment when I was re-configuring a lagg.

Sponsored by: Netflix
Reviewed by: markj, zlei
Differential Revision: https://reviews.freebsd.org/D58062

(cherry picked from commit 1cce5ef05d7ba077b0cb29d30b59f3a862e7e5ae)
DeltaFile
+2-0sys/net/if_lagg.c
+2-01 files

FreeBSD/src 5c8bb2b — usr.sbin/bhyve bhyve.8

bhyve.8: add details on using TPM with UEFI

Add a note that UEFI VMs using TPM devices should be configured
to use a varfile. Some UEFI boot loaders, such as shim, update
persistent boot variables and then reset the system when a TPM is
present. Without a writable varfile, the VM may be reset repeatedly.

Add a TPM device example to the examples list.

While here, add a missing "\" to the "uefivm" example, and add ".Pp"
before the vCPU pinning examples for consistency with other examples.

PR:             287326
Reviewed by:    michaelo, ziaee
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D60181

(cherry picked from commit ff2efe65a89a943beec4dd4cc956f5e075a921be)
DeltaFile
+30-2usr.sbin/bhyve/bhyve.8
+30-21 files

FreeBSD/src 1fb5d82 — lib/msun/src s_nexttowardf.c s_nexttoward.c

msun: fix behaviour of nextafter*() and nexttoward*() for MAX value

For an edge case at an extreme, e.g., nextafter(-DBL_MAX,-INFINITY)
do not return x+x.  Instead, evaluate x+x and assign it to a volatile
to raise an exception, and then fall through to return the correct
result in current rounding mode.

PR:             299389
MFC after:      6 days (for inclusion into releng/15.2)
DeltaFile
+1-1lib/msun/src/s_nexttowardf.c
+1-1lib/msun/src/s_nexttoward.c
+1-1lib/msun/src/s_nextafterl.c
+1-1lib/msun/src/s_nextafterf.c
+1-1lib/msun/src/s_nextafter.c
+5-55 files

FreeBSD/src 48dd6f4 — share/man/man4 apm.4

apm.4: fix trailing dot in .Xr macro call
DeltaFile
+1-1share/man/man4/apm.4
+1-11 files

FreeBSD/src aabeaf6 — usr.bin/truss truss.1

truss.1: fix trailing dot in .Xr macro call
DeltaFile
+1-1usr.bin/truss/truss.1
+1-11 files

FreeBSD/src 1a86e51 — include assert.h time.h, sys/sys stdatomic.h

libc: Fix C23 version macro visibility

In headers that existed prior to C23, these should be visible only in
C23 or BSD mode.

Fixes:          0fe73dcf7c32 ("libc: Add <assert.h> C23 feature test macro")
Fixes:          1f09e354297c ("sys/limits.h: Add BOOL_MAX, BITINT_MAXWIDTH, and C23 feature test macro")
Fixes:          cd0727ec709b ("libc: Add <stdio.h> C23 feature test macro")
Fixes:          fc9d02cb29ed ("libc: Add <time.h> C23 feature test macro")
Fixes:          4aeed6e9d213 ("libc: Add <setjmp.h> C23 feature test macro")
Reviewed by:    fuz, kfv, dteske
Differential Revision:  https://reviews.freebsd.org/D59272

(cherry picked from commit 5076e9b5463afa47cf2e7689431d3dd33e5b15cb)
DeltaFile
+4-2sys/sys/stdatomic.h
+4-2include/time.h
+4-2include/stdio.h
+4-2include/setjmp.h
+4-2include/limits.h
+2-0include/assert.h
+22-106 files

FreeBSD/src 908fae6 — include inttypes.h

libc: Add <inttypes.h> C23 feature test macro

Define __STDC_VERSION_INTTYPES_H__ now that the header fully
conforms to C23.

Reviewed by:    fuz
Approved by:    fuz (mentor)
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D59382

(cherry picked from commit 733ea4ee584db9b25b470ee48243135a321b4eed)
DeltaFile
+6-0include/inttypes.h
+6-01 files

FreeBSD/src 1026dd1 — lib/msun/arm fenv.c, lib/msun/man fenv.3 fegetmode.3

libm: Implement femode_t, fegetmode(), and fesetmode() as per C23

Reviewed by:    kargl, kib
Approved by:    fuz (mentor)
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D59288

(cherry picked from commit d8b6461f8c56237a00ddc32678b3928bf76f5440)
DeltaFile
+78-0lib/msun/x86/fenv.h
+70-0lib/msun/man/fegetmode.3
+63-0lib/msun/tests/fenv_test.c
+48-1lib/msun/man/fenv.3
+42-0lib/msun/arm/fenv.c
+33-0lib/msun/riscv/fenv.h
+334-113 files not shown
+533-319 files

FreeBSD/src 71649bb — include time.h

libc: Add <time.h> C23 feature test macro

Define the __STDC_VERSION_TIME_H__ feature test macro as the
header fully conforms to C23.

Reviewed by:    fuz
Approved by:    fuz (mentor)
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D59134

(cherry picked from commit fc9d02cb29ed8505eeb4f90348b7318ddcfae434)
DeltaFile
+2-3include/time.h
+2-31 files

FreeBSD/src e6cab85 — include setjmp.h

libc: Add <setjmp.h> C23 feature test macro

Define the __STDC_VERSION_SETJMP_H__ feature test macro as the
header fully conforms to C23.

Reviewed by:    fuz
Approved by:    fuz (mentor)
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D59135

(cherry picked from commit 4aeed6e9d2132366fe5d7fa46d47d73be9de263b)
DeltaFile
+2-0include/setjmp.h
+2-01 files

FreeBSD/src a767006 — lib/libc/tests/gen limits_test.c

libc/tests: Add assertions for BOOL_WIDTH, BOOL_MAX, and BITINT_MAXWIDTH

Reviewed by:    fuz
Approved by:    fuz (mentor)
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2352

(cherry picked from commit b54dcb897a5fa66ff1013d0ea403ed8894e34b8a)
DeltaFile
+6-0lib/libc/tests/gen/limits_test.c
+6-01 files

FreeBSD/src 068271f — include stdio.h limits.h, stand/libsa/geli geliboot_internal.h

libc: Restore prior C23 include guards

To avoid any sort of POLA violation, this commit restores old
guards and defines the C23 feature test macros in addition to
them.  This is to close off whole class of possible breakage,
rather than patching it case by case.

Reported by:    dim
Reviewed by:    dim, dteske, fuz
Approved by:    dim, dteske (mentor), fuz (mentor)
MFC after:      1 month
Differential Revision: https://reviews.freebsd.org/D58911

(cherry picked from commit 8d29d242964976d9ffa89387d97de87d6cedc886)
DeltaFile
+1-7stand/libsa/geli/geliboot_internal.h
+5-3include/assert.h
+4-2sys/sys/stdatomic.h
+4-2include/stdio.h
+4-2include/limits.h
+1-1sys/sys/syslimits.h
+19-175 files not shown
+24-2211 files

FreeBSD/src 47f45c2 — include xlocale.h stdio.h, lib/libc/xdr xdr.3

libc: Add <stdio.h> C23 feature test macro

Define the __STDC_VERSION_STDIO_H__ feature test macro now that
the header fully conforms to C23.

Reviewed by:    fuz
Approved by:    fuz (mentor)
MFC after:      1 month
Differential Revision: https://reviews.freebsd.org/D58842

(cherry picked from commit cd0727ec709bb54f8f82104f6113284a15dd3464)
DeltaFile
+7-1stand/libsa/geli/geliboot_internal.h
+3-3include/stdio.h
+1-1lib/libutil/libutil.h
+1-1lib/libgeom/libgeom.h
+1-1lib/libc/xdr/xdr.3
+1-1include/xlocale.h
+14-81 files not shown
+15-97 files

FreeBSD/src 92bb927 — sys/sys stdatomic.h

libc: Fix ATOMIC_VAR_INIT visibility

Fixes:          28cecfe27964 ("libc: Restrict ATOMIC_VAR_INIT for C23 conformance")
Reviewed by:    fuz, imp
Differential Revision:  https://reviews.freebsd.org/D57724

(cherry picked from commit 4c860db34a1b8cff79e7f0d5184423221613e8e1)
DeltaFile
+1-1sys/sys/stdatomic.h
+1-11 files

FreeBSD/src 39dbfae — sys/powerpc/include _limits.h

sys/limits.h: Fix typo

Reviewed by:    fuz
Approved by:    fuz (mentor)
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2352

(cherry picked from commit ca1c1eceb38c57ce7439786008f7c6f37c9a62d3)
DeltaFile
+1-1sys/powerpc/include/_limits.h
+1-11 files

FreeBSD/src 20ff5aa — include limits.h, sys/sys syslimits.h limits.h

sys/limits.h: Add BOOL_MAX, BITINT_MAXWIDTH, and C23 feature test macro

Add BOOL_MAX and BITINT_MAXWIDTH macros for C23 compliance, and
define the __STDC_VERSION_LIMITS_H__ feature test macro now that
the header fully conforms to C23.

Reviewed by:    fuz
Approved by:    fuz (mentor)
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2352

(cherry picked from commit 1f09e354297ce571353210c23e50ef6fc19ce382)
DeltaFile
+7-0sys/sys/limits.h
+3-3include/limits.h
+2-1sys/sys/syslimits.h
+12-43 files

FreeBSD/src af11665 — sys/sys stdatomic.h

libc: Fix atomic_init for GCC atomic objects

Add a dedicated `__GNUC_ATOMICS` path that initialises via
`atomic_store_explicit(obj, value, memory_order_relaxed)`.

This ensures the required initialisation semantics without
assuming any particular object representation.

Previously, `atomic_init` on GCC fell through to the legacy
`__val` member path intended only for old struct-backed
atomic objects. For current atomic objects, this caused the
following compilation error:

> error: request for member '__val' in something not a
  structure or union

As a result, valid code such as `atomic_init(&x, 1)` failed
to compile when using GCC.


    [7 lines not shown]
DeltaFile
+3-0sys/sys/stdatomic.h
+3-01 files

FreeBSD/src 53ba20b — sys/sys stdatomic.h

libc: Enforce lock-free atomic_flag and C23-safe initialisation

Select the `atomic_flag` backing type according to the C standard
requirements that `atomic_flag` operations be lock-free.

C11 §7.17.1.5 defines `atomic_flag` as:

> a structure type representing a lock-free, primitive atomic flag

and §7.17.8.2 further requires:

> Operations on an object of type atomic_flag shall be lock free

Therefore:

- Prefer `atomic_bool` when `ATOMIC_BOOL_LOCK_FREE == 2`
- Fall back to `atomic_uchar` when `ATOMIC_CHAR_LOCK_FREE == 2`
- Trigger a translation failure if neither type is lock-free


    [14 lines not shown]
DeltaFile
+12-4sys/sys/stdatomic.h
+12-41 files

FreeBSD/src 1232004 — sys/sys stdatomic.h

libc: Fix GCC pointer semantics for atomic_fetch_add/sub

Correct the GCC implementation of `atomic_fetch_add_explicit()`
and `atomic_fetch_sub_explicit()` for atomic pointer types.

The previous implementation passed the operand directly to the
builtins. For pointer objects, this could result in raw byte-wise
address arithmetic rather than the required C atomic pointer
semantics, where the operand is interpreted as a `ptrdiff_t`
element count.

As a result, operations such as `atomic_fetch_sub_explicit(&p, 2, ...)`
could produce an incorrect post-operation pointer value.

Fix this by applying pointer scaling in the GCC path before invoking
the builtin, mirroring the existing legacy fallback implementation.
Pointer operands are now scaled by the size of the pointed-to type,
while integer atomic behaviour remains unchanged.


    [4 lines not shown]
DeltaFile
+6-2sys/sys/stdatomic.h
+6-21 files

FreeBSD/src db50099 — sys/sys stdatomic.h

libc: Reorganise memory_order enumeration constants

Place the `memory_order` enumeration constants alongside the corresponding
typedef under the §7.17.3 heading.

The previous layout separated the fallback constant definitions from the
enum, which could obscure their relationship. These fallbacks exist only
to provide values when the compiler does not supply the builtins.

The removed comment encoded implementation-specific assumptions about
compiler-provided definitions and implied a relationship between Clang/GCC
macros and fallback values. In practice, the fallback definitions exist
solely to ensure the enumerators are defined when compiler intrinsics are
absent, and do not depend on any particular numeric mapping.

No functional change; this is a mere structural and clarity improvement.

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by: imp

    [2 lines not shown]
DeltaFile
+4-10sys/sys/stdatomic.h
+4-101 files

FreeBSD/src 650fea6 — sys/sys stdatomic.h

libc: Reorder atomic operations to match ISO C standard

Reorder definitions of specified generic operations on atomic types
so they follow the sequence in ISO/IEC 9899:2024 §7.17.7:

1. `atomic_store`
2. `atomic_load`
3. `atomic_exchange`
4. `atomic_compare_exchange`
5. `atomic_fetch`

This aligns the header layout with the standard, making it easier
to cross-check against the normative text and maintain consistency
with the rest of the header.

The behaviour of the macros remains unchanged; this is purely a
reorganisation and documentation improvement.

Signed-off-by: Faraz Vahedi <kfv at kfv.io>

    [3 lines not shown]
DeltaFile
+50-50sys/sys/stdatomic.h
+50-501 files

FreeBSD/src 127109e — sys/sys stdatomic.h

libc: Add missing kill_dependency macro

Add `kill_dependency` as specified by C11 §7.17.3.1.

The macro is required to break dependency chains in
expressions without affecting the value.

No functional impact beyond providing the required,
value-preserving definition.

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2185
(cherry picked from commit 9d87c1aac4a84ac5e82acf872f645a7202977204)
DeltaFile
+2-0sys/sys/stdatomic.h
+2-01 files

FreeBSD/src 54916e2 — sys/sys stdatomic.h

libc: Restrict ATOMIC_VAR_INIT for C23 conformance

Omit `ATOMIC_VAR_INIT` when targeting C23, where it has been removed.
Retain it for earlier C standards and for C++ (as it still remains in
C++23, albeit marked as deprecated since C17 and C++20.)

Also separate `atomic_init` definitions from `ATOMIC_VAR_INIT` to
avoid coupling with a deprecated initialisation mechanism.

No functional change intended for `atomic_init`; this is purely a
conformance and cleanup adjustment.

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2185
(cherry picked from commit 28cecfe27964fdb67497800f5dcd5d3e1033727f)
DeltaFile
+7-1sys/sys/stdatomic.h
+7-11 files

FreeBSD/src 7407dd9 — sys/sys stdatomic.h

libc: Add atomics C23 feature test macro

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2185
(cherry picked from commit 85becdacf3b043849b240eb1b1b2cde63add0690)
DeltaFile
+3-3sys/sys/stdatomic.h
+3-31 files

FreeBSD/src f461e7b — contrib/bsnmp/lib bsnmplib.3 bsnmpclient.3, contrib/bsnmp/snmp_target snmp_target.3

bsnmp manpages: Fix unusual Xr order
DeltaFile
+2-2contrib/bsnmp/snmp_target/snmp_target.3
+1-1contrib/bsnmp/snmpd/snmpmod.3
+1-1contrib/bsnmp/lib/bsnmplib.3
+1-1contrib/bsnmp/lib/bsnmpclient.3
+1-1contrib/bsnmp/lib/bsnmpagent.3
+1-1contrib/bsnmp/lib/asn1.3
+7-76 files

FreeBSD/src c7d3801 — contrib/elftoolchain/addr2line addr2line.1, contrib/elftoolchain/readelf readelf.1

elftoolchain manpages: Fix unusual Xr order
DeltaFile
+2-2contrib/elftoolchain/addr2line/addr2line.1
+1-1contrib/elftoolchain/readelf/readelf.1
+3-32 files

FreeBSD/src 15bf2c9 — contrib/pf/pflogd pflogd.8

pflogd.8: hyperv manpages: Fix unusual Xr order
DeltaFile
+2-2contrib/pf/pflogd/pflogd.8
+2-21 files

FreeBSD/src d82081e — contrib/hyperv/tools hv_vss_daemon.8 hv_kvp_daemon.8

hyperv manpages: Fix unusual Xr order
DeltaFile
+4-4contrib/hyperv/tools/hv_kvp_daemon.8
+3-3contrib/hyperv/tools/hv_vss_daemon.8
+7-72 files

FreeBSD/src 4062791 — contrib/tzdata southamerica theory.html

contrib/tzdata: import tzdata 2026f

Changes: https://github.com/eggert/tz/blob/2026f/NEWS

(cherry picked from commit 5a2e900390155ca00ca321230e498f94d449eff5)
DeltaFile
+94-19contrib/tzdata/NEWS
+50-23contrib/tzdata/northamerica
+0-40contrib/tzdata/backzone
+13-26contrib/tzdata/leapseconds.awk
+18-20contrib/tzdata/theory.html
+25-10contrib/tzdata/southamerica
+200-1383 files not shown
+226-1589 files

FreeBSD/src f89814a — libexec/rtld-elf rtld.c

dl_iterate_phdr(3): do not return garbage for objects not using TLS

(cherry picked from commit 175595ba6c5253e395c028e792787dffd2875910)
DeltaFile
+6-2libexec/rtld-elf/rtld.c
+6-21 files