FreeBSD/src 4b29bf7release/tools vmimage.subr

Revert "vmimage.subr: pkg autoremove after pkg install"

This reverts commit 6a13aeac3c1f98db7cf156f24a4d6bc8d3c321f6.

The "bogus dependencies being installed" issue was traced down to pkg
confusion surrounding libclang_rt.asan-i386.so linking to a 32-bit
libgcc_s.so.1, and a more minimal workaround of "install clibs-lib32"
has been applied, so this hack is no longer required.

MFC after:      3 days
Sponsored by:   Amazon
DeltaFile
+0-7release/tools/vmimage.subr
+0-71 files

FreeBSD/src 1186997release/tools ec2.conf

EC2: Remove stale comment

MFC after:      3 days
Sponsored by:   Amazon
DeltaFile
+0-4release/tools/ec2.conf
+0-41 files

FreeBSD/src cfe0b7drelease/tools ec2-builder.conf ec2-small.conf

EC2: Add clibs-lib32 pkg to small/builder images

The FreeBSD-clang package on amd64 contains libclang_rt.asan-i386.so,
which links to the 32-bit version of libgcc_s.so.1.  It is not clear
if that file belongs in FreeBSD-clang or if it should be placed into
a different package.

For unknown reasons, pkg *sometimes* recognizes this and decides that
it needs to install a package to supply libgcc_s.so.1:32.

In particular, when we initially install the VM with 'pkg install
[long list of FreeBSD-* packages]', pkg does not recognize that it
wants this; but the *next* time 'pkg install' runs, it decides that
it needs libgcc_s.so.1:32 -- even though that particular library is
not needed by the particular package we're trying to install -- and
goes looking for it... and ends up picking gcc12-devel as a provider.

Later in the EC2 image building process, we run 'pkg autoremove' (which
was added during 15.0 to get rid of the "bogus dependencies" which were

    [19 lines not shown]
DeltaFile
+1-0release/tools/ec2-builder.conf
+1-0release/tools/ec2-small.conf
+2-02 files

FreeBSD/src b1f72ddsbin/tunefs tunefs.c tunefs.8

tunefs: Don't combine GEOM journaling with SU

GEOM journaling shouldn't be used at the same time as soft updates, so
don't enable one if the other is already in use.

MFC after:      1 week
PR:             293896
Reviewed by:    mckusick
Differential Revision:  https://reviews.freebsd.org/D56002
DeltaFile
+13-4sbin/tunefs/tunefs.c
+6-2sbin/tunefs/tunefs.8
+19-62 files

FreeBSD/src 092687asys/amd64/conf FIRECRACKER GENERIC, sys/arm64/conf std.arm64

kernel: Be clearer about what ZSTDIO is for

ZSTDIO is not just for core dumps, and it is now required by ZFS, so
move it (and GZIO, which is still just for dumps) to a new “Compression
support” section in GENERIC, and add them both to MINIMAL.

MFC after:      1 week
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D55940
DeltaFile
+4-2sys/arm64/conf/std.arm64
+4-2sys/riscv/conf/GENERIC
+4-2sys/amd64/conf/FIRECRACKER
+4-2sys/amd64/conf/GENERIC
+4-2sys/powerpc/conf/GENERIC
+4-2sys/powerpc/conf/GENERIC64
+24-125 files not shown
+42-1811 files

FreeBSD/src e30fcdasbin/newfs newfs.8 newfs.c

newfs: Don't combine GEOM journaling with SU

GEOM journaling shouldn't be used at the same time as soft updates, so
don't enable soft updates if GEOM journaling has been requested, and
error out if both are explicitly requested.

MFC after:      1 week
PR:             293896
Reviewed by:    mckusick
Differential Revision:  https://reviews.freebsd.org/D55999
DeltaFile
+10-4sbin/newfs/newfs.8
+3-1sbin/newfs/newfs.c
+13-52 files

FreeBSD/src 81d2c7dshare/man/man3 alloca.3

alloca.3: Add entry about defining VLAs in same block as alloca() to BUGS

Refer to alloca() as a (builtin) function or macro, as it could be
defined as either depending on the compiler.

Paragraph about bug comes from Darwin's libc, and example added to
illustrate it.

Reviewed by:    bnovkov
Approved by:    bnovkov
MFC after:      3 days
Obtained from:  https://github.com/apple-oss-distributions/libc (partially)
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D55370

(cherry picked from commit 4da237aee328f368cd85b659854c4556a39f15ef)
DeltaFile
+29-11share/man/man3/alloca.3
+29-111 files

FreeBSD/src a87bde8sys/dev/acpica acpi_spmc.c

acpi_spmc: Simplify constraint freeing

We don't need to check for NULL before calling free().

Sponsored by:   The FreeBSD Foundation
DeltaFile
+3-7sys/dev/acpica/acpi_spmc.c
+3-71 files

FreeBSD/src 2547f97share/man/man4 acpi.4

acpi.4: Update sysctl descriptions for new stypes

The previous S1-S5 options are still accepted for compatibility, but
they are now deprecated in favour of the new generic sleep types.

Reported by:    markj
Reviewed by:    markj
Approved by:    markj
Fixes:          97d152698f48 ("acpi: Use sleep types defined in sys/power.h")
Event:          AsiaBSDCon 2026
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56008
DeltaFile
+14-13share/man/man4/acpi.4
+14-131 files

FreeBSD/src 66447absys/dev/acpica acpi.c

acpi: Print sysctl name in deprecated sleep type warning

Reported by:    markj
Fixes:          97d152698f48 ("acpi: Use sleep types defined in sys/power.h")
Event:          AsiaBSDCon 2026
Sponsored by:   The FreeBSD Foundation
DeltaFile
+3-3sys/dev/acpica/acpi.c
+3-31 files

FreeBSD/src 8cc1c0fsys/amd64/amd64 trap.c

amd64 trap.c: provide tag for the struct sfhandlers definition

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+4-2sys/amd64/amd64/trap.c
+4-21 files

FreeBSD/src 23dc485sys/amd64/include md_var.h

amd64: add prototype for ia32_syscall()

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+2-0sys/amd64/include/md_var.h
+2-01 files

FreeBSD/src acce5fasys/amd64/amd64 fpu.c

amd64: remove assertion about sizeof(struct pcb)

We no longer put pcb on stack, it is part of the struct thread.
Similarly, we do not put user fpu save area on stack.  There is no
constraints on the pcb size due to the XSAVE area required alignment.

Reviewed by:    jhb, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55931
DeltaFile
+0-7sys/amd64/amd64/fpu.c
+0-71 files

FreeBSD/src 6275cd7sys/sys param.h

sys/param.h: bump __FreeBSD_version for amd64 struct trapframe size change

Requested by:   jhb
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+2-1sys/sys/param.h
+2-11 files

FreeBSD/src 8892176sys/amd64/amd64 exec_machdep.c, sys/amd64/ia32 ia32_signal.c

amd64: check that %cs and %ss values from ucontext fit into registers

This change only checks that the values from the user-supplied context
are not truncated by C implicit type convertions.  The validity of the
segment selectors is still checked by hardware.

Reviewed by:    jhb, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55861
DeltaFile
+28-0sys/amd64/ia32/ia32_signal.c
+19-0sys/amd64/amd64/exec_machdep.c
+47-02 files

FreeBSD/src e18449fsys/amd64/amd64 trap.c

amd64: move code to check for traps with interrupts disabled into helpers

Reviewed by:    jhb, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55809
DeltaFile
+58-38sys/amd64/amd64/trap.c
+58-381 files

FreeBSD/src e909506sys/amd64/amd64 trap.c, sys/x86/include frame.h

x86 FRED: add hardware definitions for the trap frames fields

as provided by the Intel document 346446-009 AKA FRED 8.0 and SDM v90,
February 2026.

Note that the layout of the struct trapframe does not change with
FRED. The differences are in addition of two fields at the end of the
structure. Other members are carved from existing tf_cs and tf_ss by
limiting hw-written segments to 16 bits officially, and reusing rest
from the doubleword for the new data.

Reviewed by:    jhb, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55831
DeltaFile
+49-6sys/x86/include/frame.h
+9-8sys/amd64/amd64/trap.c
+58-142 files

FreeBSD/src 67b918esecure/lib/libcrypto/modules Makefile.inc

Revert "libcrypto: compile all PIC objects with -DOPENSSL_PIC"

This commit broke the build with some build options.

Some validation needs to be done to confirm that moving the preprocessor
argument to `secure/lib/libcrypto/Makefile.inc` works without breaking
the build, but revert for now until a `tinderbox` run can be done with
the change.

PR:             293934
Reported by:    Jenkins, Trond Endrestøl

This reverts commit 14b9955e57cc28b61e785165b9effcbe620edb46.
DeltaFile
+0-2secure/lib/libcrypto/modules/Makefile.inc
+0-21 files

FreeBSD/src e296211. Makefile.inc1

Makefile.inc1: Don't force LLVM_BINUTILS off for cross-tools

Because of this setting we were still using ELF Tool Chain tools for
buildworld.  The sets of binary utilities are largely equivalent and
this went unnoticed after commit 1cae7121c667 ("Enable LLVM_BINUTILS
by default").

This was discovered recently because ELF Tool Chain objcopy produces
standalone debug files without phdrs and this caused an issue with a
3rd party ELF parser [1].  Remove the forced setting so that we use
LLVM's binutils to build the system.

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=33876

Re-commit after fixing a bootstrapping issue with LLVM binutils (in
17494c6e6b7d "build: Boostrap LLVM_BINUTILS for cross-tools").

Reviewed by:    imp, jhb
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55650
DeltaFile
+0-1Makefile.inc1
+0-11 files

FreeBSD/src 1fd43eesys/dev/tpm tpm20.c tpm_tis_core.c

tpm: fix multi-threaded access with per-open state

The TPM driver currently has a single buffer per instance to hold the
result of a command, and does not allow subsequent commands to be sent
until the current result is read by the same OS thread that sent the
command, with a timeout to throw away the result after a while if the
result is not read in a timely fashion.  This has a couple problems:

 - The timeout code has a bug which causes all subsequent commands to
   hang forever if a different OS thread tries to read the result
   before the OS thread which sent the command, and the OS thread
   which sent the command never tries to read the result.

 - Even if the first problem is fixed, applications expect to be able
   to read the result from a different OS thread than the OS thread
   which sent the command. The particular case that we saw was a go
   application where the go runtime scheduled the goroutine which read
   the result to a different OS thread from one where the goroutine
   that sent the command ran, and there's no way to force these to

    [11 lines not shown]
DeltaFile
+46-70sys/dev/tpm/tpm20.c
+14-14sys/dev/tpm/tpm_tis_core.c
+9-10sys/dev/tpm/tpm_crb.c
+7-6sys/dev/tpm/tpm20.h
+5-0sys/dev/tpm/tpm_if.m
+81-1005 files

FreeBSD/src 632ddb8krb5/lib/kdb Makefile, krb5/lib/kprop_util Makefile

krb5: append to LDFLAGS instead of replacing

Sponsored by:   Netflix
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D55335
DeltaFile
+1-1krb5/lib/kdb/Makefile
+1-1krb5/lib/kprop_util/Makefile
+1-1krb5/lib/krad/Makefile
+1-1krb5/lib/krb5/Makefile
+1-1krb5/plugins/audit/Makefile
+1-1krb5/plugins/k5tls/Makefile
+6-614 files not shown
+20-2020 files

FreeBSD/src 03b7b77sys/netinet/tcp_stacks rack_bbr_common.c

tcp/rack: don't call call tcp_state_change() before tcp_close()

Reviewed by:            tuexen, rrs
Differential Revision:  https://reviews.freebsd.org/D55969
DeltaFile
+0-1sys/netinet/tcp_stacks/rack_bbr_common.c
+0-11 files

FreeBSD/src 0798ad8sys/netinet tcp_usrreq.c

tcp: remove extraneous code

The tcp_close() will perform both actions.

Reviewed by:            pouria, tuexen, rrs
Differential Revision:  https://reviews.freebsd.org/D55965
DeltaFile
+0-5sys/netinet/tcp_usrreq.c
+0-51 files

FreeBSD/src 3bfda6flibexec/nuageinit nuageinit.7

nuageinit.7: fix cloud-config header line

This updates the nuageinit man page by aligning mentions of the
cloud-config header line with the cloud-init documentation[0], removing
an unwanted "!" character.

[0] https://docs.cloud-init.io/en/latest/explanation/about-cloud-config.html#how-do-i-create-a-cloud-config-file

Signed-off-by: Jonathan Matthews <freebsd at hello.jonathanmatthews.com>
Differential Revision:  https://reviews.freebsd.org/D53706
(cherry picked from commit 4ab2d625e1462e9a78cb8086906c1a3da3aa6713)
DeltaFile
+2-2libexec/nuageinit/nuageinit.7
+2-21 files

FreeBSD/src 3d218b6sys/cam/scsi scsi_all.c

cam (scsi): silence "Medium not present" SCSI sense logging for removable media

Change SS_FATAL to SS_FAIL for SCSI sense code 0x3A (Medium not present)
to suppress console spam when card readers or other removable media
devices have no media inserted.

The error is still returned to callers (ENXIO), but no longer prints to
dmesg during boot/probe.

Verified with Apple SD Card Reader - reduced boot messages from 4 to 2.

Reviewed by:    emaste, imp
Differential Revision: https://reviews.freebsd.org/D55287
DeltaFile
+3-3sys/cam/scsi/scsi_all.c
+3-31 files

FreeBSD/src 8475cd9share/man/man4/man4.arm dwcotg.4 Makefile

dwcotg.4: Initial manual page

Create visibility in apropos and the Hardware Release Notes.

MFC after:              3 days
Reviewed by:            pauamma, ray
Differential Revision:  https://reviews.freebsd.org/D53287
DeltaFile
+29-0share/man/man4/man4.arm/dwcotg.4
+1-0share/man/man4/man4.arm/Makefile
+30-02 files

FreeBSD/src 0661997stand/efi/loader main.c

loader(8): embedded MD should be the most preferred currdev

A loader built with MD_IMAGE_SIZE is almost always meant for use with
its embedded image and should try that as currdev before anything else.
Recent changes (d69fc3a9dc71, 784150fd2535) seem to have relaxed the ZFS
code's search for a rootfs and exposed this problem.

Reviewed by:    imp, tsoome
MFC after:      1 week
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D55979
DeltaFile
+9-9stand/efi/loader/main.c
+9-91 files

FreeBSD/src 17494c6. Makefile.inc1, share/man/man5 src.conf.5

build: Boostrap LLVM_BINUTILS for cross-tools

Reported by:    vexeduxr, jrtc27
Reviewed by:    imp
Sponsored by:   The FreeBSD Foundation
Pull request:   https://github.com/freebsd/freebsd-src/pull/2084
Differential Revision: https://reviews.freebsd.org/D55923
DeltaFile
+17-2Makefile.inc1
+13-0share/man/man5/src.conf.5
+12-0tools/build/options/WITHOUT_LLVM_BINUTILS_BOOTSTRAP
+1-0share/mk/src.opts.mk
+43-24 files

FreeBSD/src 6a808cdsys/compat/freebsd32 freebsd32_misc.c

compat32: Zero struct to avoid stack disclosure

Reported by:    Adam Crosser, Praetorian
Reviewed by:    philip
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55811

(cherry picked from commit 097cb4e9f0432c543c704cec712ce1cd3302335c)
(cherry picked from commit 4551ea3b3f04650cd5300a9eae8994bdb080db91)
DeltaFile
+1-1sys/compat/freebsd32/freebsd32_misc.c
+1-11 files

FreeBSD/src a347e6esys/compat/linux linux_misc.c

compat/linux: Avoid waitid() kernel stack disclosure

Reported by:    Adam Crosser, Praetorian
Reviewed by:    philip
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55812

(cherry picked from commit 9a9f93bcf1aa0059d759b2f3ea6faeb2760a11bd)
(cherry picked from commit 9f8db9cc67fb86eeb2b645ce7f8aa748e99241a9)
DeltaFile
+1-0sys/compat/linux/linux_misc.c
+1-01 files