FreeBSD/src b68f2fecontrib/llvm-project/lld/ELF Thunks.cpp Thunks.h, contrib/llvm-project/lld/ELF/Arch PPC.cpp PPC64.cpp

Merge commit 26bf39cdba0b from llvm-project (by Jessica Clarke):

  [ELF][PowerPC] Don't assume TOC pointer is valid in IPLT entries (#207555)

  Unlike normal PLT entries, IPLT entries can be called indirectly even
  when in PIEs/DSOs, and so there's no guarantee on what's in the TOC
  pointer register at that time. Therefore we must emit variants of the
  existing code that work without it, whether r12-relative (playing the
  same role as MIPS's $25) in the same number of instructions, or first
  retrieving PC in an i386-like manner, being careful not to clobber LR.
  On 32-bit PowerPC even direct calls to IPLT entries face the same issue,
  since we'd use the TOC base of the resolver, which may not be the same
  as the caller, even within the same object.

  Normal canonical PLTs still look broken on 64-bit PowerPC as they use
  the TOC pointer register too, and similarly on 32-bit PowerPC for PIEs.
  We should probably treat these cases the same as PIE on i386 (except
  including PDEs for 64-bit PowerPC), where it's an error due to the use
  of %ebx in PLT entries.

    [7 lines not shown]
DeltaFile
+50-19contrib/llvm-project/lld/ELF/Thunks.cpp
+7-6contrib/llvm-project/lld/ELF/Arch/PPC.cpp
+6-3contrib/llvm-project/lld/ELF/Thunks.h
+3-2contrib/llvm-project/lld/ELF/Arch/PPC64.cpp
+1-1lib/clang/include/lld/Common/Version.inc
+67-315 files

FreeBSD/src bcbcd73contrib/llvm-project/lld/ELF Thunks.cpp Thunks.h, contrib/llvm-project/lld/ELF/Arch PPC64.cpp

Merge commit cbf48349e3e1 from llvm-project (by Jessica Clarke):

  [NFC][ELF][PPC64] Pass address not offset to writePPC64LoadAndBranch (#212275)

  Every caller currently subtracts the TOC base in its argument, so move
  that into common code inside writePPC64LoadAndBranch. This will also
  allow a different computation to be used in some cases in a future
  commit.

  Note that offset is now unsigned not signed; even previously, all
  arguments were uint64_t, and all uses are unsigned, so making it signed
  doesn't make much sense.

MFC after:      1 week
DeltaFile
+9-11contrib/llvm-project/lld/ELF/Thunks.cpp
+1-2contrib/llvm-project/lld/ELF/Arch/PPC64.cpp
+1-1contrib/llvm-project/lld/ELF/Thunks.h
+11-143 files

FreeBSD/src e7015a3share/man/man3 pthread_cond_timedwait.3 Makefile

pthread_cond_timedwait.3: document pthread_cond_clockwait(3)

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58463
DeltaFile
+30-2share/man/man3/pthread_cond_timedwait.3
+1-0share/man/man3/Makefile
+31-22 files

FreeBSD/src 10ea230contrib/netbsd-tests/lib/libpthread t_condwait.c

tests/libpthread: add pthread_cond_clockwait(3) tests

Reviewed by:    markj, ngie
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58458
DeltaFile
+92-18contrib/netbsd-tests/lib/libpthread/t_condwait.c
+92-181 files

FreeBSD/src 6d3db07share/man/man3 pthread_cond_timedwait.3

pthread_cond_timedwait.3: use .Fo/.Fc for long arguments list

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58463
DeltaFile
+5-1share/man/man3/pthread_cond_timedwait.3
+5-11 files

FreeBSD/src 149d3e5lib/libthr/thread thr_cond.c

libthr/thread/thr_cond.c: some style

Also use bool for the 'cancel' argument for cond_wait_common().

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58463
DeltaFile
+11-15lib/libthr/thread/thr_cond.c
+11-151 files

FreeBSD/src e1136fbinclude pthread.h, lib/libthr pthread.map

libthr: implement pthread_cond_clockwait(3)

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58463
DeltaFile
+48-16lib/libthr/thread/thr_cond.c
+22-6lib/libthr/thread/thr_umtx.c
+4-2lib/libthr/thread/thr_barrier.c
+5-0include/pthread.h
+2-1lib/libthr/thread/thr_umtx.h
+1-0lib/libthr/pthread.map
+82-256 files

FreeBSD/src f4a05f3lib/libsys _umtx_op.2

_umtx_op.2: document the CVWAIT_UMTX_TIME flag for the UMTX_OP_CV_WAIT_UC request

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58463
DeltaFile
+21-2lib/libsys/_umtx_op.2
+21-21 files

FreeBSD/src 196cc00lib/libthr/thread thr_umtx.c

libthr/thread/thr_umtx.c: style _thr_ucond_wait()

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58463
DeltaFile
+3-3lib/libthr/thread/thr_umtx.c
+3-31 files

FreeBSD/src d738f66sys/kern kern_umtx.c, sys/sys umtx.h

umtx_op(2): add the CVWAIT_UMTX_TIME flag for the UMTX_OP_CV_WAIT_UC request

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58463
DeltaFile
+55-35sys/kern/kern_umtx.c
+1-0sys/sys/umtx.h
+56-352 files

FreeBSD/src 4090d10lib/libsys mknod.2

mknod.2: update the man page

State that FIFOs can be created, document the requirement that
dev must be zero then.  Mention whiteouts.

PR:     297082
Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D58478
DeltaFile
+16-7lib/libsys/mknod.2
+16-71 files

FreeBSD/src 3c6f639share/man/man3 pthread_cond_wait.3

pthread_cond_wait.3: describe spurious wakeups

Reviewed by:    markc
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58458
DeltaFile
+14-1share/man/man3/pthread_cond_wait.3
+14-11 files

FreeBSD/src 2a2705asys/dev/sound/pcm dsp.c

sound: Add missing newline in dsp_make_dev()'s device_printf()

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-1sys/dev/sound/pcm/dsp.c
+1-11 files

FreeBSD/src a46c92asys/dev/sound/pcm dsp.c

sound: Propagate error value from dsp_make_dev()

It is better to propagate it to pcm_register(), and later to the device
drivers, than to simply ignore it and return ENXIO.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-1sys/dev/sound/pcm/dsp.c
+1-11 files

FreeBSD/src 6901cbbsys/fs/nfs nfs_commonkrpc.c

nfs_commonkrpc.c: Handle NFSERR_DELAY for Sequence correctly

Unlike RFC5661 (the original NFSv4.1 RFC), RFC8881 specifies
that a NFS4ERR_DELAY reply to the SEQUENCE operation requires
a reply using the same slot/sequence#.

This patch fixes handling of this case, so it conforms to
RFC8881.

Reported by:    J. David (j.david.lists at gmail.com)
Tested by:      J. David (j.david.lists at gmail.com)
MFC after:      1 week
DeltaFile
+14-1sys/fs/nfs/nfs_commonkrpc.c
+14-11 files

FreeBSD/src cf3eeebkrb5/include Makefile, krb5/util/profile Makefile Makefile.profile

krb5: Install profile.h again

Commit 1876de606eb8 exposed missing symbols that the port security/krb5
installed that the base system did not install. Part of the solution
was to make libprofile.so private (not libprofile.a) just as the port
does, Red Hat Enterprise Linux does, and as installing MIT KRB5 by hand
does. The actual fix for this was to put symbols and their corresponding
functions into the correct librarires, i.e. libkrb5.so and othes, just
as the port, Red Hat, and manually installed via tarball do.

Unfortunately INTERNALLIB disables the include of bsd.incs.mk and the
install of header files. This is still needed to install profile.h into
/usr/include (just as the port installs it into ${LOCALBASE}/include
and RHEL installs it in /usr/include). This commit fixes this by
installing profile.h into /usr/include from the krb5/include Makfile.

Reported by:    fluffy
Tested by:      fluffy
Reviewed by:    fluffy

    [3 lines not shown]
DeltaFile
+1-26krb5/util/profile/Makefile
+26-0krb5/util/profile/Makefile.profile
+11-3krb5/include/Makefile
+38-293 files

FreeBSD/src 1ad1e7btools/build beinstall.sh

beinstall: Avoid chrooting into new world

The new world may use system calls that are not in the currently-running
kernel, so we cannot chroot into the new environment to run `make
installworld`, `etcupdate`, etc.  Partially revert commit 16702050ac95
("beinstall: perform pre-installworld steps") and switch back to using
DESTDIR for installworld and so on.

Reported by:    olivier
Reviewed by:    olivier
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50682

(cherry picked from commit 7fde3e62231ac397a779e4fef729908c5ef6f53a)
DeltaFile
+3-4tools/build/beinstall.sh
+3-41 files

FreeBSD/src b1f3726sys/contrib/dev/mediatek/mt76 zzz_fw_ports_fwget.sh

mt76: update script to to deal with 7921 and 7925 flavors

Update the mt76/zzz_fw_ports_fwget.sh script to set fwget to download
mt7921 and mt7925 rather than the these days non-existent mt792x flavor.

Sponsored by:   The FreeBSD Foundation
MFC after:      30 days
Differential Revision: https://reviews.freebsd.org/D57242
DeltaFile
+17-8sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh
+17-81 files

FreeBSD/src 7925256usr.sbin/fwget/pci pci_network_ittim pci_network_mediatek

fwget: update MediaTek firmware listings to match ports

Update fwget(8) to download wifi-firmware-mt76-kmod-mt7921, and
wifi-firmware-mt76-kmod-mt7925 firmware packages instead of the
no longer available mt792x version.
Add another PCI vendor to recognize ITTIM IDs for mt7921-based
MediaTek cards.

(bz reduced the license in the ittim file to an SPDX tag and updated
the commit message, given this is only half the work from the review)

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57242
DeltaFile
+24-0usr.sbin/fwget/pci/pci_network_ittim
+7-7usr.sbin/fwget/pci/pci_network_mediatek
+1-0usr.sbin/fwget/pci/pci
+32-73 files

FreeBSD/src 9d85292. 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")
DeltaFile
+1-1UPDATING
+1-1bin/pwait/pwait.1
+1-1lib/libsys/kqueue.2
+3-33 files

FreeBSD/src 356d0b7. 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
DeltaFile
+6-14libexec/rc/tests/rc_subr_test.sh
+12-0UPDATING
+2-2libexec/rc/rc.subr
+20-163 files

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

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
DeltaFile
+188-0bin/pwait/tests/pwait_reap.c
+1-0bin/pwait/tests/Makefile
+189-02 files

FreeBSD/src eddd8aabin/pwait pwait.c pwait.1

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
DeltaFile
+29-7bin/pwait/pwait.c
+13-0bin/pwait/pwait.1
+42-72 files

FreeBSD/src c8f5e68bin/pwait pwait.c pwait.1

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
DeltaFile
+29-12bin/pwait/pwait.c
+14-3bin/pwait/pwait.1
+43-152 files

FreeBSD/src 2bacbbelib/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
DeltaFile
+8-5sys/kern/kern_event.c
+4-7sys/sys/event.h
+8-2lib/libsys/kqueue.2
+6-3sys/kern/sys_procdesc.c
+1-1lib/libsysdecode/flags.c
+1-0sys/kern/kern_exit.c
+28-186 files

FreeBSD/src d85e97clibexec/rc/rc.d lockd statd

rc.d: fix lockd and statd flags processing after scvj

The documented flags are named differently than the script name, this
requires special handling of the flags.

The Service Jails feature requires the handling of the variable to be
differently than it was initially. The change back then did not work,
which resulted in the flags to be ignored.

This commit fixes the issue in head. This affects 15.0 and 15.1 too.

PR:             296233
Reported by:    Robert Blayzor <rblayzor at inoc.net>
Tested by:      Robert Blayzor <rblayzor at inoc.net>
Fixes:          f99f0ee14e3af81c2 - rc.d: add a service jails config to all base system services
MFC after:      1 month
MFC to: 15-stable

(cherry picked from commit d05d60e958bca778ea193932facb026c48d7ca0b)
DeltaFile
+2-1libexec/rc/rc.d/lockd
+2-1libexec/rc/rc.d/statd
+4-22 files

FreeBSD/src 407b7bclib/libsysdecode flags.c netlink.c

libsysdecode: decode combined Netlink message flags

Change sysdecode_nlm_flag() to decode Netlink message flags as a
bitmask instead of looking up a single flag value. This correctly
prints combinations of NLM_F_* flags while preserving any unknown
bits in hexadecimal.

Reported by:    androvonx95 <androvonx95 at tutamail.com>
Reviewed by:    kp
Signed-off-by:  Ishan Agrawal <iagrawal9990 at gmail.com>
Sponsored-by:   Google LLC (GSoC 2026)
DeltaFile
+8-3lib/libsysdecode/flags.c
+1-6lib/libsysdecode/netlink.c
+1-1lib/libsysdecode/sysdecode.h
+10-103 files

FreeBSD/src 5c1461alib/libsysdecode flags.c

libsysdecode: use local sysdecode.h

Replace <sysdecode.h> with "sysdecode.h" so local builds use the in-tree header
in lib/libsysdecode instead of a stale installed copy in /usr/include, avoiding
build failures after updating sysdecode.h.

Signed-off-by:  Ishan Agrawal <iagrawal9990 at gmail.com>
Sponsored-by:   Google LLC (GSoC 2026)
Reviewed by:    kp
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2338
DeltaFile
+1-1lib/libsysdecode/flags.c
+1-11 files

FreeBSD/src e3e5623sys/dev/usb/controller xhci.c

xhci: Fix packet xfer larger than 64kb

Previously, multiple frames of xfers are split into many tds. In the
refactor process, we forget to consider this. The td builder is already
allocate with enough numbers of tds. What we need to do is to fill the
normal trbs for muiltiple tds when building trbs.

PR:             297053
Tested by:      phk, oleglelchuk at gmail.com
Fixes:  e0b235ecd4fa ("xhci: Refactor xhci_generic_setup code")
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58465
DeltaFile
+121-69sys/dev/usb/controller/xhci.c
+121-691 files

FreeBSD/src 03c71edusr.bin/mkimg gpt.c scheme.c

mkimg: Add ms-basic-data alias for GPT

While preparing GPT-schemed RaspberryPi images for the NanoBSD
Reimagined GSoC 2026 project, a discrepancy was identified between
mkimg(1) and gpart(8) regarding Microsoft Basic Data partitions (GUID
!ebd0a0a2-b9e5-4433-87c0-68b6b72699c7).

Currently, mkimg(1) relies on the MBR-centric name "ntfs" to identify
this partition type under the GPT scheme.  Conversely, gpart(8)
identifies this type as "ms-basic-data".

To allow automation scripts (such as those consuming from gpart backup)
to use a common partition type across tools, add ALIAS_MS_BASIC_DATA as
a valid alias.

This is part of a larger effort to avoid a custom, MBR-based image
generation logic for embedded SoCs like the Raspberry Pi, standardizing
on GPT layouts across all supported FreeBSD embedded devices.


    [5 lines not shown]
DeltaFile
+1-0usr.bin/mkimg/gpt.c
+1-0usr.bin/mkimg/scheme.c
+1-0usr.bin/mkimg/scheme.h
+3-03 files