FreeBSD/src a8be899 — . Makefile.inc1, release Makefile Makefile.inc1

build: Support got

Add code for using got(1), matching how git(1) is currently used:
1. Determining the git branch,
2. Determining the checked-out hash,
3. Determining the commit count,
4. Determining the timestamp of the most recent commit,
5. Determining if the tree is "dirty",
6. Generating lists of files for the src and src-sys packages, and
7. Excluding .got directories from src.txz and ports.txz.

The release engineer hopes to use this functionality in release builds,
since got's minimalism makes it a far more manageable build tool than
git.

Reviewed by:    naddy
MFC after:      1 week
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D60606
DeltaFile
+33-2sys/conf/newvers.sh
+31-0Makefile.inc1
+27-1release/Makefile.inc1
+2-2release/Makefile
+93-54 files

FreeBSD/src 61bc5cc — .github/workflows cross-bootstrap-tools.yml

.github: Update to use llvm 15

This is the latest supported version in Ubuntu 22.04

Reviewed by:    vexeduxr, imp, emaste
Sponsored by:   Arm Ltd
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1862

(cherry picked from commit cf583997282f962d9e8bf478667d5087f7c1f2da)
DeltaFile
+3-3.github/workflows/cross-bootstrap-tools.yml
+3-31 files

FreeBSD/src 913ef60 — .github/workflows cross-bootstrap-tools.yml

.github: Use make.py's --cross-toolchain option on macOS

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D51749

(cherry picked from commit ad43e7f4721080caedd29a21de9210f9b763ee4d)
DeltaFile
+4-1.github/workflows/cross-bootstrap-tools.yml
+4-11 files

FreeBSD/src efdd4c2 — .github/workflows cross-bootstrap-tools.yml

.github: Update the clang release used for macos

Reviewed by:    emaste, jhb
Sponsored by:   Arm Ltd
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1399

(cherry picked from commit edc692b9052ab0594248104d002f32c657e36057)
DeltaFile
+3-3.github/workflows/cross-bootstrap-tools.yml
+3-31 files

FreeBSD/src c30ae77 — .github/workflows cross-bootstrap-tools.yml

.github: Use the two most recent LTS releases

Ubuntu 24.04 is the most recent LTS release. Use it and the previous
22.04 LTS for cross build testing.

Reported by:    emaste, jhb
Sponsored by:   Arm Ltd
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1399

(cherry picked from commit 386e2dc442f46d2c4b43dc9e767eaa93facdbb42)
DeltaFile
+5-5.github/workflows/cross-bootstrap-tools.yml
+5-51 files

FreeBSD/src 1ba0979 — .github/workflows cross-bootstrap-tools.yml

.github: Enable manually running github actions

Sponsored by:   Arm Ltd

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/878

(cherry picked from commit 78cc45712350d81d848706a77f28f90cc51ebfaf)
DeltaFile
+1-0.github/workflows/cross-bootstrap-tools.yml
+1-01 files

FreeBSD/src c54ffb0 — .github/workflows cross-bootstrap-tools.yml

.github: Update to use llvm 15

This is the latest supported version in Ubuntu 22.04

Reviewed by:    vexeduxr, imp, emaste
Sponsored by:   Arm Ltd
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1862

(cherry picked from commit cf583997282f962d9e8bf478667d5087f7c1f2da)
DeltaFile
+3-3.github/workflows/cross-bootstrap-tools.yml
+3-31 files

FreeBSD/src 19a5023 — .github/workflows checklist.yml

github: Only run the checklist checker for PRs against main

Currently this check is run on every push to stable branches which all
fail since they fail to fetch the non-existent .github/path-rules.txt
from the just-updated branches.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D60709
DeltaFile
+1-0.github/workflows/checklist.yml
+1-01 files

FreeBSD/src 025393b — contrib/llvm-project/compiler-rt/lib/asan asan_allocator.h asan_allocator.cpp, contrib/llvm-project/compiler-rt/lib/hwasan hwasan_allocation_functions.cpp

Merge commit a5fa4dba6e2e from llvm-project (by PiJoules):

  [compiler-rt] Add interceptors for free_[aligned_]sized for asan+hwasan (#189109)

This avoids a jemalloc assertion when running sanitized applications
against glib, which uses free_sized(3).

PR:             298943
MFC after:      1 week

(cherry picked from commit a3fbf20c0558ee3c2b88adc0c944e66d074cab7b)
DeltaFile
+32-0contrib/llvm-project/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp
+22-0contrib/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp
+13-0contrib/llvm-project/compiler-rt/lib/asan/asan_allocator.cpp
+3-0contrib/llvm-project/compiler-rt/lib/asan/asan_allocator.h
+70-04 files

FreeBSD/src 1abf88d — contrib/llvm-project/compiler-rt/lib/asan asan_malloc_mac.cpp asan_malloc_linux.cpp

Merge commit 681c2ee4dfbf from llvm-project (by Justin King):

  asan: refactor interceptor allocation/deallocation functions (#145087)

  Do some refactoring to allocation/deallocation interceptors. Expose
  explicit per-alloc_type functions and stop accepting explicit AllocType.
  This ensures we do not accidentally mix.

  NOTE: This change rejects attempts to call `operator new(<some_size>,
  static_cast<std::align_val_t>(0))`.

  For https://github.com/llvm/llvm-project/issues/144435

  Signed-off-by: Justin King <jcking at google.com>

This a prerequisite for adding sanitizer interceptors for free_sized(3)
and free_aligned_sized(3).

PR:             298943

    [3 lines not shown]
DeltaFile
+97-10contrib/llvm-project/compiler-rt/lib/asan/asan_allocator.cpp
+32-32contrib/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp
+19-5contrib/llvm-project/compiler-rt/lib/asan/asan_allocator.h
+5-5contrib/llvm-project/compiler-rt/lib/asan/asan_malloc_win.cpp
+4-4contrib/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp
+3-3contrib/llvm-project/compiler-rt/lib/asan/asan_malloc_mac.cpp
+160-591 files not shown
+161-607 files

FreeBSD/src aabb358 — contrib/llvm-project/compiler-rt/lib/sanitizer_common sanitizer_internal_defs.h

compiler-rt: enable use of .preinit_array after ef758b59a44e

After base ef758b59a44e6b5b2d2dc178b97c01cde1b34570 we can enable usage
of .preinit_array in compiler-rt's sanitizers. The comment that stated
"On FreeBSD, .preinit_array functions are called with rtld_bind_lock
writer lock held. It will lead to dead lock ..." can also be removed.

PR:             298943
MFC after:      1 week

(cherry picked from commit 000856156745f1a9a05705f8a499c0fd84f183ca)
DeltaFile
+2-5contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
+2-51 files

FreeBSD/src 37eb7f2 — contrib/llvm-project/compiler-rt/lib/sanitizer_common sanitizer_internal_defs.h

compiler-rt: enable use of .preinit_array after ef758b59a44e

After base ef758b59a44e6b5b2d2dc178b97c01cde1b34570 we can enable usage
of .preinit_array in compiler-rt's sanitizers. The comment that stated
"On FreeBSD, .preinit_array functions are called with rtld_bind_lock
writer lock held. It will lead to dead lock ..." can also be removed.

PR:             298943
MFC after:      1 week

(cherry picked from commit 000856156745f1a9a05705f8a499c0fd84f183ca)
DeltaFile
+2-5contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
+2-51 files

FreeBSD/src d526521 — contrib/llvm-project/compiler-rt/lib/asan asan_allocator.h asan_allocator.cpp, contrib/llvm-project/compiler-rt/lib/hwasan hwasan_allocation_functions.cpp

Merge commit a5fa4dba6e2e from llvm-project (by PiJoules):

  [compiler-rt] Add interceptors for free_[aligned_]sized for asan+hwasan (#189109)

This avoids a jemalloc assertion when running sanitized applications
against glib, which uses free_sized(3).

PR:             298943
MFC after:      1 week

(cherry picked from commit a3fbf20c0558ee3c2b88adc0c944e66d074cab7b)
DeltaFile
+32-0contrib/llvm-project/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp
+22-0contrib/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp
+13-0contrib/llvm-project/compiler-rt/lib/asan/asan_allocator.cpp
+3-0contrib/llvm-project/compiler-rt/lib/asan/asan_allocator.h
+70-04 files

FreeBSD/src 4192a88 — contrib/llvm-project/compiler-rt/lib/asan asan_malloc_mac.cpp asan_malloc_linux.cpp

Merge commit 681c2ee4dfbf from llvm-project (by Justin King):

  asan: refactor interceptor allocation/deallocation functions (#145087)

  Do some refactoring to allocation/deallocation interceptors. Expose
  explicit per-alloc_type functions and stop accepting explicit AllocType.
  This ensures we do not accidentally mix.

  NOTE: This change rejects attempts to call `operator new(<some_size>,
  static_cast<std::align_val_t>(0))`.

  For https://github.com/llvm/llvm-project/issues/144435

  Signed-off-by: Justin King <jcking at google.com>

This a prerequisite for adding sanitizer interceptors for free_sized(3)
and free_aligned_sized(3).

PR:             298943

    [3 lines not shown]
DeltaFile
+97-10contrib/llvm-project/compiler-rt/lib/asan/asan_allocator.cpp
+32-32contrib/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp
+19-5contrib/llvm-project/compiler-rt/lib/asan/asan_allocator.h
+5-5contrib/llvm-project/compiler-rt/lib/asan/asan_malloc_win.cpp
+4-4contrib/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp
+3-3contrib/llvm-project/compiler-rt/lib/asan/asan_malloc_mac.cpp
+160-591 files not shown
+161-607 files

FreeBSD/src 6866177 — sys/compat/linuxkpi/common/include/linux mutex.h kernel.h, sys/compat/linuxkpi/common/src linux_work.c

Revert LinuxKPI: LINUXKPI_DEBUG changes to allow drm-kmod to build

It has been almost a week with an open pull-requests and a follow-up
identified merge from master drm-kmod, as well as a patch supplied
in a PR for the ports to fix the the current build breakage in drm-kmod
and as a result also in nvidia-drm-* ports.

The problem there is that instead of using the kmod.mk supplied
definitions for LINUXKPI and despite using kmod.mk for the build,
the external components have hand-rolled solutions which can get
out of synch with src.git.

This was not discovered early on given that building drm-kmod with
LOCAL_MODULES_DIR= from git sources will not fail as the kernel
build will have provided the new opt_linuxkpi.h file.  In addition
drm-kmod master already had the -include for kconfig.h which the
src tree has had since 2024.

Give the pkgbase/kmod builds and users over the weekend a chance

    [10 lines not shown]
DeltaFile
+1-28sys/compat/linuxkpi/common/include/linux/kconfig.h
+3-5sys/compat/linuxkpi/common/include/linux/spinlock.h
+2-4sys/compat/linuxkpi/common/include/linux/kernel.h
+2-2sys/compat/linuxkpi/common/include/linux/mutex.h
+0-3sys/conf/options
+1-1sys/compat/linuxkpi/common/src/linux_work.c
+9-439 files not shown
+15-5215 files

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

rtld: release rtld_bind_lock around calls to .preinit_array initializers

PR:     298943

(cherry picked from commit ef758b59a44e6b5b2d2dc178b97c01cde1b34570)
DeltaFile
+5-3libexec/rtld-elf/rtld.c
+5-31 files

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

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

Reviewed by:    ziaee
Discussed with: jhb
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60047
DeltaFile
+659-0lib/libsys/x86/sysarch.x86.2
+2-1lib/libsys/x86/Makefile.sys
+2-1lib/libsys/sysarch.2
+663-23 files

FreeBSD/src bfb7ee5 — usr.sbin/tcpsso tcpsso.8

tcpsso.8: fix a cosmetic nit and make mandoc -Tlint happy
DeltaFile
+1-1usr.sbin/tcpsso/tcpsso.8
+1-11 files

FreeBSD/src c7cf285 — usr.sbin/tcpsso tcpsso.c

tcpsso: fix the level error messages

tcpsso incorrectly referred to the optname instead of
the level name/number.

MFC after:      2 weeks
DeltaFile
+3-3usr.sbin/tcpsso/tcpsso.c
+3-31 files

FreeBSD/src d7cf2e7 — sys/net if_bridge.c rtsock.c, sys/netinet ip_icmp.c tcp_subr.c

net*: remove remnants of caddr_t

caddr_t is a typedef for a character pointer (char *) that originated in
Version 7 Unix, released by AT&T in 1979.  It became obsolete in 1989,
when ANSI C introduced void *.

What's left:

* ioctl(9) KPI still uses caddr_t, thus network related ioctl method
  still use it.
* if_clone KPI, to be done separately.
* bpf(4), to be done separately.
* SCTP, let maintainers decide.
* iflib(4), let maintainers decide.

Reviewed by:            zlei
Differential Revision:  https://reviews.freebsd.org/D60738
DeltaFile
+20-20sys/netinet6/icmp6.c
+17-17sys/net/rtsock.c
+15-18sys/netinet/tcp_subr.c
+10-10sys/netinet6/ip6_input.c
+8-9sys/netinet/ip_icmp.c
+8-8sys/net/if_bridge.c
+78-8246 files not shown
+202-20452 files

FreeBSD/src 690c3fb — sys/kern uipc_mbuf.c, sys/sys mbuf.h

mbuf: remove remnants of caddr_t

caddr_t is a typedef for a character pointer (char *) that originated in
Version 7 Unix, released by AT&T in 1979.  It became obsolete in 1989,
when ANSI C introduced void *.

There is a lot of code that uses m->m_data for arithmetics, thus we can't
switch it to void * easily.  Let's at least stop proliferation of caddr_t.
We have developers that are twice younger than obsoletion of this type.

Reviewed by:            zlei, tuexen, adrian
Differential Revision:  https://reviews.freebsd.org/D60736
DeltaFile
+15-12sys/kern/uipc_mbuf.c
+5-5sys/sys/mbuf.h
+20-172 files

FreeBSD/src 9bcc1e9 — sys/netpfil/ipfw ip_fw_compat.c ip_dummynet.c, sys/netpfil/ipfw/nat64 ip_fw_nat64.c

ipfw: cleanup SYSINIT(9)s

Make them all belong to SI_SUB_PROTO_FIREWALL and explicitly specify
order.  Prefer SYSINIT() over modevent, for those subsystems that don't
have dependencies.  All subsystems just depend on the main module and they
don't depend on each other, except dummynet which also has submodules.
Thus, keep DECLARE_MODULE() only for the main module and dummynet.

Differential Revision:  https://reviews.freebsd.org/D60685
DeltaFile
+11-49sys/netpfil/ipfw/ip_fw2.c
+6-38sys/netpfil/ipfw/ip_fw_nat.c
+4-32sys/netpfil/ipfw/nat64/ip_fw_nat64.c
+6-12sys/netpfil/ipfw/nptv6/ip_fw_nptv6.c
+5-5sys/netpfil/ipfw/ip_dummynet.c
+2-7sys/netpfil/ipfw/ip_fw_compat.c
+34-1431 files not shown
+35-1447 files

FreeBSD/src a44c119 — sys/net if_loop.c

loopback: set MTU to IF_MAXMTU

It was temporarily reduced in af78195e0024 in 1994 to hide some bugs with
signed short overflow.  We believe all these bugs were sorted out by
today. :)

Note that earlier ba582a82b0e36 reduced the MTU be rounded to a longword
with a reference "NFS likes it to be rounded".  We have had several
refactors of the NFS code since that.

Reviewed by:            pouria, zlei, tuexen
Differential Revision:  https://reviews.freebsd.org/D59450
DeltaFile
+1-9sys/net/if_loop.c
+1-91 files

FreeBSD/src 4f2f26f — sys/compat/linuxkpi/common/include/linux hardirq.h

linuxkpi: implement irqs_disabled

This adds a function which is used from various places in drm-kmod
to detect if the code can sleep or not. Currently, these locations
(such as intel_guc_send_busy_loop) are ifdeffed to freebsd specific
solutions (usually drm_can_sleep).

This change implements irqs_disabled. We check td_pinned as spinlocks
will call sched_pin, and td_critnest to check if we are in a critical
section.

Approved by:    wulf, khng (mentor)
Differential Revision:  https://reviews.freebsd.org/D57782
DeltaFile
+20-0sys/compat/linuxkpi/common/include/linux/hardirq.h
+20-01 files

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

linux: preserve epoll descriptors across fork using KQUEUE_CPONFORK

Linuxulator implements epoll instances using kqueues. Currently,
epoll_create_common() creates the backing kqueue with copy-on-fork
disabled. When fork() copies the descriptor table, the kqueue is
omitted from the child's table.

This differs from Linux, where an epoll descriptor survives fork(),
including when it was created with EPOLL_CLOEXEC. That flag controls
descriptor lifetime across exec(), not fork().

The missing descriptor breaks dbus-daemon daemonization. The daemon
creates its epoll instance before forking and continues using the
saved descriptor number in the child. F_GETFD initially fails with
EBADF. Once another open reuses that number, subsequent epoll_ctl()
calls fail with EINVAL because the descriptor no longer refers to
an epoll instance. The daemon then exits, preventing applications
that depend on the session bus from starting correctly.


    [31 lines not shown]
DeltaFile
+1-1sys/compat/linux/linux_event.c
+1-11 files

FreeBSD/src 43c79c6 — sys/amd64/include floatingpoint.h, sys/arm/include floatingpoint.h

machine/floatingpoing.h: harmonize all arches

Reported by:    fluffy
Reviewed by:    jhibbits (previous version)
Discussed with: imp
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60255
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 495bc19 — sys/dev/pty pty.c

pty: preserve O_NONBLOCK when opening /dev/ptmx

ptmx_fdopen() masks the supplied file flags to FREAD | FWRITE before
passing them to pts_alloc(). This discards FNONBLOCK even when the
caller explicitly requests O_NONBLOCK.

As a result, open("/dev/ptmx", O_RDWR | O_NOCTTY | O_NONBLOCK) succeeds,
but the returned file is blocking. F_GETFL reports O_NONBLOCK cleared,
and a subsequent read can block instead of returning EAGAIN when no
data is available.

This causes Linux xfce4-terminal/VTE running under Linuxulator to
freeze. VTE opens the PTY master with O_NONBLOCK and relies on
nonblocking reads while draining terminal output. Once the available
data has been consumed, the main UI thread blocks in ptsdev_read(),
leaving the window unresponsive even though the child shell has
started successfully.

Include FNONBLOCK in the flags passed to pts_alloc(). Blocking opens

    [20 lines not shown]
DeltaFile
+1-1sys/dev/pty/pty.c
+1-11 files

FreeBSD/src 38479a4 — sys/netinet sctp_indata.c

sctp: improve locking validation

Ensure that the TCB lock is hold in sctp_calc_rwnd().

Reviewed by:    tuexen
MFC after:      1 week
MFC to:         stable/14
MFC to:         stable/15
DeltaFile
+2-0sys/netinet/sctp_indata.c
+2-01 files

FreeBSD/src 294dc04 — sys/netpfil/pf pf_ioctl.c

pf: only log that we're not creating a tag in verbose mode

While here get rid of the aesthetically unpleasing '== false' construct.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+3-2sys/netpfil/pf/pf_ioctl.c
+3-21 files

FreeBSD/src 32a9814 — sys/kern uipc_ktls.c

ktls: Fix capability checks in ktls_reset_receive_tag()

IFCAP2_RXTLS4 and IFCAP2_RXTLS6 are bit numbers, not masks, so
ktls_reset_receive_tag() tested if_capenable2 against 0 for IPv4 and against the
RXTLS4 bit for IPv6. An IPv4 connection with NIC receive TLS offload thus never
got a new receive tag after its packets moved to another interface, and fell
back to software decryption for good.
c721694 fixed the same checks in ktls_alloc_rcv_tag(); use IFCAP2_BIT() here
as well.

Fixes: fe8c78f ("ktls: Add full support for TLS RX offloading via network interface.")

Approved by:    gallatin, kib
Sponsored by:   Netflix
Differential Revision:  https://reviews.freebsd.org/D60757
DeltaFile
+2-2sys/kern/uipc_ktls.c
+2-21 files