FreeBSD/src fb63bc6sys/sys _atomic_subword.h, sys/vm vm_page.c

atomic: Implement atomic_{set,clear}_8 in _atomic_subword.h

Reimplement atomic_{set,clear}_16 using atomic_set_32.

Remove emulation of these operations from vm_page.c.

Reviewed by:    alc, kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D58580
DeltaFile
+9-67sys/vm/vm_page.c
+39-15sys/sys/_atomic_subword.h
+48-822 files

FreeBSD/src e004ff1usr.sbin/ppp mp.c

ppp: Avoid overflow when formatting endpoint discriminator options

Each byte of the address is represented by a pair of characters, so we
should be multiplying len by 2 when figuring out how much buffer space
we have.  Previously, a sufficiently large option could cause an
overflow of the global "result" buffer.

Reported by:    Joshua Rogers <joshua at joshua.hu>
Tested by:      Décio Brandão (0xDBJ)
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58555
DeltaFile
+6-6usr.sbin/ppp/mp.c
+6-61 files

FreeBSD/src 85b07e9contrib/elftoolchain/libelftc libelftc_dem_arm.c libelftc_dem_gnu2.c

libelftc: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks libelftc during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

Since the returned pointer is never modified in either case, make
it const.

MFC after:      1 week
Reviewed by:    jkoshy, markj, dim, emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58497
DeltaFile
+2-3contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c
+1-2contrib/elftoolchain/libelftc/libelftc_dem_arm.c
+3-52 files

FreeBSD/src 9f18614contrib/mandoc mdoc.c out.c

mandoc: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks mandoc during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

In read.c, make the existing temporary pointer const, and for the
mandoc_asprintf() call, add a new mutable local.

In mdoc.c and out.c, since the data is mutable and is mutated here,
remove const from the temporary pointers.

MFC after:      1 week
Reviewed by:    fuz
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58495
DeltaFile
+6-4contrib/mandoc/read.c
+2-2contrib/mandoc/out.c
+1-2contrib/mandoc/mdoc.c
+9-83 files

FreeBSD/src 1d94e2eusr.bin/m4 misc.c

m4: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks m4 during the
bootstrap build, since it assumes the return value is always a
mutable pointer.

Since the returned value is never modified, simply make the
temporary const.

MFC after:      1 week
Reviewed by:    bapt, dim
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58494
DeltaFile
+1-1usr.bin/m4/misc.c
+1-11 files

FreeBSD/src 9fd8f5eusr.bin/mkimg mkimg.c

mkimg: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks mkimg during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

Make the existing 'sep' pointer const to fix the first case, and
for the second, introduce a new non-const pointer for strchr,
since we do modify the result in that case.

MFC after:      1 week
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58493
DeltaFile
+7-7usr.bin/mkimg/mkimg.c
+7-71 files

FreeBSD/src 2296c39usr.bin/xinstall xinstall.c

xinstall: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks xinstall during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

As the returned pointer is never used to modify the value, fix this
by making the temporary variable const.

MFC after:      1 week
Reviewed by:    ray, markj, emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58492
DeltaFile
+2-1usr.bin/xinstall/xinstall.c
+2-11 files

FreeBSD/src 78f842dusr.bin/sort sort.c

sort: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks sort during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

As the returned pointer is never used to modify the value, fix this
by making the temporary variable const.

MFC after:      1 week
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58491
DeltaFile
+1-1usr.bin/sort/sort.c
+1-11 files

FreeBSD/src bcee560contrib/libucl/src ucl_util.c

libucl: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks libucl during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

Instead of assigning directly to params->prefix (which is const),
use a non-const temporary variable and assign the result after
we've done the modification.

MFC after:      1 week
Reviewed by:    bofh, bapt
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58490
DeltaFile
+4-3contrib/libucl/src/ucl_util.c
+4-31 files

FreeBSD/src cb2daf8usr.bin/rpcgen rpc_main.c rpc_svcout.c

rpcgen: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks rpcgen during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

For mkfile_output(), the pointed-to value is never modified, so
fix this by making the pointer const as well.

For open_log_file(), the current code modifies the supposedly const
value in-place to remove the filename suffix, which happens to work
but is wrong even in older versions of C.  Change the code to use a
printf "%.*s" format specifier to strip the suffix instead.

MFC after:      1 week
Reviewed by:    brooks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58489
DeltaFile
+13-6usr.bin/rpcgen/rpc_svcout.c
+2-1usr.bin/rpcgen/rpc_main.c
+15-72 files

FreeBSD/src f1d9886lib/libc/stdlib getopt_long.c getopt.c

libc: getopt{,_long}: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks getopt during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

Since the pointed-to value is never modified, fix this by making
the pointer const.

MFC after:      1 week
Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58488
DeltaFile
+1-1lib/libc/stdlib/getopt_long.c
+1-1lib/libc/stdlib/getopt.c
+2-22 files

FreeBSD/src 0787b1fsys/dev/ixgbe ix_txrx.c

ixgbe: supply PF transmit contexts under SR-IOV

X550-family malicious-driver detection validates the transmit
context selected by a data descriptor with Check Context set.  ixgbe
sets that bit on every transmit data descriptor, but ordinary PF
packets without a VLAN or checksum offload do not create a context
descriptor.  The empty context then reports an invalid MAC-header
length and blocks the PF queue as soon as MDD is enabled.

Create the existing context descriptor for every PF packet while
SR-IOV is active.  This supplies the required MAC-header length and
keeps MDD from mistaking normal PF traffic for a malicious-driver
event.

MFC after:      1 week
DeltaFile
+1-0sys/dev/ixgbe/ix_txrx.c
+1-01 files

FreeBSD/src 8f779f1share/man/man4 igc.4, sys/dev/igc if_igc.h if_igc.c

igc: Add VLAN hardware filtering

Borrow the e1000 VLAN filter table

Ambiguous presence of the feature by Intel was settled by DPDK and
emperical testing.

MFC after:      2 weeks
Relnotes:       yes
DeltaFile
+107-9sys/dev/igc/if_igc.c
+3-3share/man/man4/igc.4
+3-0sys/dev/igc/if_igc.h
+113-123 files

FreeBSD/src 04753df. UPDATING, bin/pwait pwait.1

Bump dates

Fixes:          c8f5e6819d4d ("pwait: Optionally wait until process is reaped")
Fixes:          eddd8aa99ca8 ("pwait: Add a SIGINFO handler")
Fixes:          356d0b79cf6f ("rc.subr: Fix premature return from wait_for_pids")
(cherry picked from commit 9d852922f6687ce9a699efe5e09e3634923b2b60)
DeltaFile
+1-1lib/libc/sys/kqueue.2
+1-1bin/pwait/pwait.1
+1-1UPDATING
+3-33 files

FreeBSD/src 934fde2. UPDATING, libexec/rc rc.subr

rc.subr: Fix premature return from wait_for_pids

Use pwait's new -r option to wait until the target processes have not
only terminated, but also been reaped.

PR:             293183
MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D58391

(cherry picked from commit 356d0b79cf6fc693ed1a5564232e240ce15ccb8a)
DeltaFile
+6-14libexec/rc/tests/rc_subr_test.sh
+12-0UPDATING
+2-2libexec/rc/rc.subr
+20-163 files

FreeBSD/src 58c826dbin/pwait/tests pwait_reap.c

pwait: Fix pwait_normal test case

Reported by:    markj
Fixes:          e115066370dc ("pwait: Test the new -r option")

(cherry picked from commit 51c0cdb04919f776516a7fac8529e7279ea5efad)
DeltaFile
+1-1bin/pwait/tests/pwait_reap.c
+1-11 files

FreeBSD/src 6bfcca2contrib/unbound/iterator iterator.c, contrib/unbound/services mesh.c outside_network.h

unbound: Update to 1.25.2

Release notes at
        https://community.nlnetlabs.nl/t/unbound-1-25-2-released

Merge commit 'c68e7bcd81d62e9f5364c6da22fd9917976acf85'

Security:       CVE-2026-14586
Security:       CVE-2026-32665
Security:       CVE-2026-40691
Security:       CVE-2026-41637
Security:       CVE-2026-42955
Security:       CVE-2026-44621
Security:       CVE-2026-44687
Security:       CVE-2026-44690
Security:       CVE-2026-46582
Security:       CVE-2026-50045
Security:       CVE-2026-50046
Security:       CVE-2026-50243

    [13 lines not shown]
DeltaFile
+321-67contrib/unbound/services/outside_network.c
+159-75contrib/unbound/services/listen_dnsport.c
+96-11contrib/unbound/services/outside_network.h
+47-20contrib/unbound/iterator/iterator.c
+52-14contrib/unbound/services/mesh.c
+56-3contrib/unbound/validator/validator.c
+731-19051 files not shown
+1,131-33857 files

FreeBSD/src c4700dbbin/pwait/tests pwait_test.sh

pwait: Don't use init as a target

The time_unit test case uses PID 1 as a target for pwait.  This doesn't
work in a jail.  Since all we need is a process that we know won't die
while the test is running, we may as well use ourselves.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    ngie
Differential Revision:  https://reviews.freebsd.org/D58418

(cherry picked from commit 5922e9d7e72bfa8a85b0f37bcfd1a8b5d866ec3b)
DeltaFile
+19-21bin/pwait/tests/pwait_test.sh
+19-211 files

FreeBSD/src 70b3d32sys/kern sys_procdesc.c kern_event.c

kqueue: Fix delivery of unwanted events

In both procdesc_kqops_event() and filt_proc(), the event variable can
have more than one bit set.  This means that:

* We cannot compare it directly with NOTE_EXIT; we must binary-and them
  instead.

* We cannot binary-or it with the report mask; we must binary-and it
  with the request mask first.

MFC after:      1 week
Fixes:          2a5e58c59694 ("procdesc: add NOTE_PDSIGCHLD")
Fixes:          b328975b9d7c ("procdesc: report NOTE_PDSIGCHLD for traced and stopped process")
Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D58395

(cherry picked from commit 4627fe9e5afc0dce4469f5964f5d4b0e49a24274)
DeltaFile
+3-3sys/kern/kern_event.c
+2-2sys/kern/sys_procdesc.c
+5-52 files

FreeBSD/src 4e6679cbin/pwait/tests Makefile pwait_reap.c

pwait: Test the new -r option

Test that pwait without -r reports a process as soon as it terminates,
while pwait with -r does not report it until it has been reaped.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D58385

(cherry picked from commit e115066370dcfec410d914362756d09c268a5b4e)
DeltaFile
+188-0bin/pwait/tests/pwait_reap.c
+1-1bin/pwait/tests/Makefile
+189-12 files

FreeBSD/src 19723c7bin/pwait pwait.1 pwait.c

pwait: Add a SIGINFO handler

On SIGINFO, print a space-separated list or remaining processes to
standard error.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D58386

(cherry picked from commit eddd8aa99ca84c85faea5761af800b5b089d6ba1)
DeltaFile
+29-7bin/pwait/pwait.c
+13-0bin/pwait/pwait.1
+42-72 files

FreeBSD/src ae3c852bin/pwait pwait.1 pwait.c

pwait: Optionally wait until process is reaped

If the new -r option is specified, wait until the target process not
only terminates but is reaped.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D58314

(cherry picked from commit c8f5e6819d4d81906c4a1641b5c9f02d8730481c)
DeltaFile
+29-12bin/pwait/pwait.c
+14-3bin/pwait/pwait.1
+43-152 files

FreeBSD/src b58c9e8lib/libc/sys kqueue.2, lib/libsysdecode flags.c

kqueue: Add NOTE_REAP

Add a NOTE_REAP event for EVFILTER_PROC which provides a notification
when the process is reaped.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D58313

(cherry picked from commit 2bacbbecb165dd761ea7ec2fc35630db61508cdf)
DeltaFile
+8-5sys/kern/kern_event.c
+4-7sys/sys/event.h
+8-2lib/libc/sys/kqueue.2
+6-3sys/kern/sys_procdesc.c
+2-2lib/libsysdecode/flags.c
+1-0sys/kern/kern_exit.c
+29-196 files

FreeBSD/src 237ab14. UPDATING, libexec/rc rc.subr

rc.subr: Fix premature return from wait_for_pids

Use pwait's new -r option to wait until the target processes have not
only terminated, but also been reaped.

PR:             293183
MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D58391

(cherry picked from commit 356d0b79cf6fc693ed1a5564232e240ce15ccb8a)
DeltaFile
+6-14libexec/rc/tests/rc_subr_test.sh
+12-0UPDATING
+2-2libexec/rc/rc.subr
+20-163 files

FreeBSD/src 4ce8f29lib/libsys kqueue.2, lib/libsysdecode flags.c

kqueue: Add NOTE_REAP

Add a NOTE_REAP event for EVFILTER_PROC which provides a notification
when the process is reaped.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D58313

(cherry picked from commit 2bacbbecb165dd761ea7ec2fc35630db61508cdf)
DeltaFile
+8-5sys/kern/kern_event.c
+4-7sys/sys/event.h
+8-2lib/libsys/kqueue.2
+6-3sys/kern/sys_procdesc.c
+2-2lib/libsysdecode/flags.c
+1-0sys/kern/kern_exit.c
+29-196 files

FreeBSD/src e87afadbin/pwait/tests Makefile pwait_reap.c

pwait: Test the new -r option

Test that pwait without -r reports a process as soon as it terminates,
while pwait with -r does not report it until it has been reaped.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D58385

(cherry picked from commit e115066370dcfec410d914362756d09c268a5b4e)
DeltaFile
+188-0bin/pwait/tests/pwait_reap.c
+1-0bin/pwait/tests/Makefile
+189-02 files

FreeBSD/src 236794fbin/pwait pwait.1 pwait.c

pwait: Add a SIGINFO handler

On SIGINFO, print a space-separated list or remaining processes to
standard error.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D58386

(cherry picked from commit eddd8aa99ca84c85faea5761af800b5b089d6ba1)
DeltaFile
+29-7bin/pwait/pwait.c
+13-0bin/pwait/pwait.1
+42-72 files

FreeBSD/src 6eb614cbin/pwait/tests pwait_reap.c

pwait: Fix pwait_normal test case

Reported by:    markj
Fixes:          e115066370dc ("pwait: Test the new -r option")

(cherry picked from commit 51c0cdb04919f776516a7fac8529e7279ea5efad)
DeltaFile
+1-1bin/pwait/tests/pwait_reap.c
+1-11 files

FreeBSD/src 48f7397. UPDATING, bin/pwait pwait.1

Bump dates

Fixes:          c8f5e6819d4d ("pwait: Optionally wait until process is reaped")
Fixes:          eddd8aa99ca8 ("pwait: Add a SIGINFO handler")
Fixes:          356d0b79cf6f ("rc.subr: Fix premature return from wait_for_pids")
(cherry picked from commit 9d852922f6687ce9a699efe5e09e3634923b2b60)
DeltaFile
+1-1lib/libsys/kqueue.2
+1-1bin/pwait/pwait.1
+1-1UPDATING
+3-33 files

FreeBSD/src 600d57dbin/pwait pwait.1 pwait.c

pwait: Optionally wait until process is reaped

If the new -r option is specified, wait until the target process not
only terminates but is reaped.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D58314

(cherry picked from commit c8f5e6819d4d81906c4a1641b5c9f02d8730481c)
DeltaFile
+29-12bin/pwait/pwait.c
+14-3bin/pwait/pwait.1
+43-152 files