FreeBSD/src b409b78usr.sbin/freebsd-update freebsd-update.sh

freebsd-update: Add some diagnositic information for a failure case

Users report freebsd-update failing with "The update metadata index is
correctly signed, but failed an integrity check."  Add a hint at which
of the cases is failing to help track down the issue.

PR:             264205
Reviewed by:    dch
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52222

(cherry picked from commit af4ba95daf75cf1b1624dd57038cfaa3ed2753e7)
(cherry picked from commit d653eca0ef889a8e3fa1e370d2b3ce7b031441a2)
DeltaFile
+8-8usr.sbin/freebsd-update/freebsd-update.sh
+8-81 files

FreeBSD/src bac4d3f. UPDATING

UPDATING: Add an entry for f27afc476551
DeltaFile
+4-0UPDATING
+4-01 files

FreeBSD/src 33d1524sys/sys param.h

param.h: Bump __FreeBSD_version to 1500502

Commit f27afc476551 changes the internal KAPI between the
NFS modules.  As such, all must be recompiled from sources.
Bump __FreeBSD_version to 1500502 for this.
DeltaFile
+1-1sys/sys/param.h
+1-11 files

FreeBSD/src f27afc4sys/fs/nfs nfs_commonsubs.c nfs_var.h, sys/fs/nfsclient nfs_clvnops.c nfs_clstate.c

nfs: Add support for the new _PC_CASE_INSENSITIVE name

Commit d6864221d8 added support for the _PC_CASE_INSENSITIVE
name for pathconf, to indicate if case insensitive lookups
are configured.

This patch adds support for it for both NFSv4 and
NFSv3.

It also adds a fsidp argument to nfsv4_fillattr() which
will be used in future commit(s) related to NFSv4.n
directory delegations.

(cherry picked from commit e5aa60d0695803c83dc0af08c057b82c463da3f2)
DeltaFile
+22-9sys/fs/nfs/nfs_commonsubs.c
+12-6sys/fs/nfsserver/nfs_nfsdport.c
+7-2sys/fs/nfsserver/nfs_nfsdserv.c
+6-2sys/fs/nfsclient/nfs_clvnops.c
+2-2sys/fs/nfs/nfs_var.h
+2-1sys/fs/nfsclient/nfs_clstate.c
+51-221 files not shown
+52-237 files

FreeBSD/src 52159ddlib/libsys pathconf.2

pathconf.2: Document the new _PC_CASE_INSENSITIVE name

Commit d6864221d8 added support for the _PC_CASE_INSENSITIVE
name for pathconf, to indicate if case insensitive lookups
are configured.

This patch documents this new name and also updates
the description for _PC_HAS_HIDDENSYSTEM to also
include UF_ARCHIVE.

This is a content change.

(cherry picked from commit b473bb274cef37d45940cad4624b5d3b7fc96e01)
DeltaFile
+6-2lib/libsys/pathconf.2
+6-21 files

FreeBSD/src 3289baccontrib/llvm-project/clang/lib/Driver/ToolChains FreeBSD.h, lib/clang freebsd_cc_version.h

Reapply "Merge commit e24f90190c77 from llvm git (by Brad Smith):"

    [Driver] Enable outline atomics for FreeBSD/aarch64 (#156089)

The compiler_rt helper functions have been built since 12.4, 13.1, 14
and anything newer.

This reverts commit bd27bd1f51d049538cc7a0053be9d99110a53ae1.

Only some people (including the release manager, unfortunately) ran into
build issues with the previous iteration of this commit, because they
were bootstrapping the compiler, either via the WITHOUT_SYSTEM_COMPILER
src.conf(5) setting, or because the build system determined that their
base system compiler was out of date.

The bootstrapped compiler would then enable outline atomics and compile
libgcc_s with these, but because libgcc_s is linked with -nodefaultlibs,
it could not find the helper routines in libcompiler_rt.a.


    [15 lines not shown]
DeltaFile
+5-0contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h
+2-0lib/libgcc_s/Makefile
+1-1lib/clang/freebsd_cc_version.h
+8-13 files

FreeBSD/src d06b141etc/mtree BSD.debug.dist

mtree: Add missing flua/freebsd/sys entry

Reviewed by:    imp
Approved by:    emaste (mentor)
Fixes:  de1d7d7b87cf ("flua: add freebsd module implementing kldload/kldunload")
Differential Revision:  https://reviews.freebsd.org/D48838

(cherry picked from commit c587e4c7e4c28354634b4e13f30743ccdd3fbf91)
DeltaFile
+4-0etc/mtree/BSD.debug.dist
+4-01 files

FreeBSD/src 11c5b90share/man/man4 mgb.4 muge.4

mgb.4, muge.4: Use standard HARDWARE introduction

Release notes are generated using this text.

I used "interfaces" not "adapters" in these pages as the listed devices
are the controller ICs, not end-user projects.

Reviewed by:    ziaee
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53846

(cherry picked from commit a4aa7df767e0df49ca3294d2b578be25812364d8)
DeltaFile
+1-1share/man/man4/mgb.4
+1-1share/man/man4/muge.4
+2-22 files

FreeBSD/src fa1c56bcontrib/llvm-project/lldb/source/Host/freebsd Host.cpp

lldb: Fix Architecture parsing by reading the ELF header. (#162811)

Currently, LLDB in FreeBSD host sets the Process Architecture used by
lldbserver as Default one. Which cause problem when trying to debug a
32bit binary on amd64 platform since the lldb itself will found mismatch
architecture with lldbserver's return.

Notice that this patch is only a partial fix for the debugging problem.
We are still unable to debug x86 on x86_64 so that we don't provide
testcase in this patch.

PR:             289945
Obtained from:  llvm-project 394e7ded8b6bcff1382468b407ca620a2837f41b
DeltaFile
+28-13contrib/llvm-project/lldb/source/Host/freebsd/Host.cpp
+28-131 files

FreeBSD/src 1d1a2e6contrib/llvm-project/lldb/source/Plugins/Process/Utility RegisterContextFreeBSD_x86_64.cpp

lldb: Fix empty register set when trying to get size of register

The register set information is stored as a singleton in
GetRegisterInfo_i386. However, other functions later access this
information assuming it is stored in GetSharedRegisterInfoVector. To
resolve this inconsistency, we remove the original construction logic
and instead initialize the singleton using llvm::call_once within the
appropriate function (GetSharedRegisterInfoVector_i386).

PR:             289945
Obtained from:  llvm-project 41859c27842eeda1ef6ff18f3b2fb269388c0857
DeltaFile
+20-24contrib/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp
+20-241 files

FreeBSD/src fb9252eshare/keys/pkgbase-15/trusted Makefile backup-signing-15

Add backup pkgbase signing key held by security-officer.

This key was generated by gordon@ (aka security-officer@) on an offline
system as a backup key should anything happen to the AWS Key
Management Service that is currently in use for signing pkgbase
repositories for FreeBSD 15.x.

Approved by:    re (cperciva)
Reviewed by:    cperciva
With hat:       so

(cherry picked from commit 12ec49d8fac2eacd40ad235bf73cc585736ee77a)
(cherry picked from commit 696b0e2209ee81c5a0b27c327cf66eb3c9cfc584)
DeltaFile
+2-1share/keys/pkgbase-15/trusted/Makefile
+2-0share/keys/pkgbase-15/trusted/backup-signing-15
+4-12 files

FreeBSD/src 54808d5bin/cp cp.c, bin/cp/tests cp_test.sh

cp: Fix copying the root directory

When the source of the copy operation is the root directory, we should
neither append it to the destination path on FTS_D nor trim it back off
on FTS_DP.

Approved by:    re (cperciva)
PR:             291132
MFC after:      3 days
Fixes:          82fc0d09e862 ("cp: Partly restore symlink folllowing.")
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53863

(cherry picked from commit fe836c50120daed3e4084f43c27d8d650d36dee8)
(cherry picked from commit c4843e5805dec10ee552d21f19c8da7707c1fcbc)
DeltaFile
+15-0bin/cp/tests/cp_test.sh
+6-1bin/cp/cp.c
+21-12 files

FreeBSD/src d84de55stand/man loader.8

loader.8: Document module commands

Begin documenting module loader commands in loader(8), where the reader
would look for them. Segregate them by their availability in individual
loader implementations, like build(7) targets.
These details were graciously donated by kevans.

Approved by:    re (cperciva)
MFC after:              3 days
Reviewed by:            kevans
Co-authored-by:         Kyle Evans <kevans at freebsd.org>
Differential Revision:  https://reviews.freebsd.org/D50727

(cherry picked from commit 6fb0d67819f730e8def56e139f780eff3c0cab0f)
(cherry picked from commit 513b9db1a829b4efba91c86f280ba97b26c82c1f)
DeltaFile
+47-1stand/man/loader.8
+47-11 files

FreeBSD/src bba7812stand/defaults loader.conf.5, stand/man loader_simp.8

loader manuals: Clarify console and boot_serial

console=comconsole is for the loader and boot_serial is for the kernel.

I think we should centralize documentation on the loader settings in one
manual, such a loader.8. The current proliferation is not obvious where
to find the documentation. To the user, these are all set in loader.conf
or at the loader prompt.

Approved by:    re (cperciva)
MFC after:              3 days
Differential Revision:  https://reviews.freebsd.org/D53695

(cherry picked from commit 09ffaa4e07d749c83cc1db13829505f21b025f29)
(cherry picked from commit 3035855815c2fdbe27b65b9ec0374f4583ceb3f5)
DeltaFile
+2-2stand/man/loader_simp.8
+3-0stand/defaults/loader.conf.5
+5-22 files

FreeBSD/src f7fd040usr.bin/fortune/datfiles freebsd-tips

freebsd-tips: Add a shell function for laptops

Approved by:    re (cperciva)
MFC after:              3 days
Reviewed by:            pauamma_gundo.com
Differential Revision:  https://reviews.freebsd.org/D53748

(cherry picked from commit 42d9ae4945f281d12f3ef96cdbd7356e067f8b18)
(cherry picked from commit f0bb9d28eb3cb29b6e8f2ecd7de4e743dfbebc98)
DeltaFile
+8-0usr.bin/fortune/datfiles/freebsd-tips
+8-01 files

FreeBSD/src 56f49ddshare/man/man4 vt.4

vt.4: Document increasing scrollback size

Approved by:    re (cperciva)
MFC:                    immediately as 2 llms say this is impossible
Reviewed by:            adrian, emaste
Differential Revision:  https://reviews.freebsd.org/D53860

(cherry picked from commit a8740ba860bfc35879f886b80b30327d0d3b16bd)
(cherry picked from commit 2da71ee296add6c39e26e8b103dd24a12e8ce320)
DeltaFile
+8-1share/man/man4/vt.4
+8-11 files

FreeBSD/src a14c4d0sbin/dmesg dmesg.8

dmesg.8: Index kern.msgbuf_show_timestamp

This is the only place this important debugging tunable is documented.
Mark it up with the Va macro according to style.mdoc(5) so that people
can find it via `apropos Va=kern.msg`, the standard syntax to search
the FreeBSD manual for sysctls and tunables.

Approved by:    re (cperciva)
Fixes:  6910fee62e77 (dmesg: Document kern.msgbuf_show_timestamp)
(cherry picked from commit e13664f6a44b4970ea5e8378b8e1a4879fa5d5a0)
(cherry picked from commit 1c0668c5b33d32724c6596b42bc08d22c63c0ee0)
DeltaFile
+1-1sbin/dmesg/dmesg.8
+1-11 files

FreeBSD/src 5cc34a8sys/dev/sound/pcm channel.c channel.h

Revert "sound: Merge chn_intr() with chn_intr_locked()"

It turns out that snd_uaudio(4) uses sound(4)'s channel lock for its USB
transfer callbacks. I will try to address this at some point, because
this is layering violation, but for now we need to revert the commit, as
it causes a lock recursion panic with USB audio devices.

This reverts commit e254ef87a30bfcaabc6e4d8e0ecf05f6949a4f06.
DeltaFile
+18-2sys/dev/sound/pcm/channel.c
+1-0sys/dev/sound/pcm/channel.h
+19-22 files

FreeBSD/src d5335bdsys/fs/nfsclient nfs_clvfsops.c

nfs_clvfsops.c: Allow long directory mount paths

Without this patch, the NFS client code for mounts has
an arbitrary 100 character limit for the directory path
being mounted on the server.

Someone reported this quite a while ago, but I cannot
find the email or bugzilla PR.

This patch fixes the problem by increasing the directory
path length limit to MNAMELEN, allocated via malloc() to
avoid using too much stack.

(cherry picked from commit 8d5a88ac95b23b0a8c4943be0aef1f93e3902bfb)
DeltaFile
+5-3sys/fs/nfsclient/nfs_clvfsops.c
+5-31 files

FreeBSD/src c8cf5a9release/scripts pkg-stage.sh

release: Ship DVD with only emacs at nox flavour

Contrary to the claim made in a previous commit, removing KDE and
adding all of vim and emacs results in an image which does not fit
into 4.7 GB; to be specific, it lands at 4.722 GB rather than the
claimed 4.689 GB.  (This descrepancy resulted from doing test DVD
image builds using an out-of-date tree, and became visible when the
15.0-RC3 images were built.)

Limit the emacs packages shipped on the DVD to the "nox" flavor;
this brings the disk image down to 4.407 GB, aka under the 4.7 GB
limit for standard DVDs.

Fixes:  6cc6beb4c889 ("release: Remove KDE from dvd1.iso")
MFC after:      1 day (for 15.0-RC4)
DeltaFile
+1-1release/scripts/pkg-stage.sh
+1-11 files

FreeBSD/src f0b9cf9stand/libsa Makefile, sys/crypto md5c.c

sys/crypto: import md5c.c C rewrite

The reimplementation is a bit cleaner than the original code,
although it is also slightly slower. This shouldn't matter too
much as we will have asm code for the major platforms.

The code is unrolled when built in the kernel or user space, but
not when in libsa, as to reduce the code size.

Differential Revision:  https://reviews.freebsd.org/D45670
Reviewed by:    jrtc27, imp
Approved by:    markj (mentor)
MFC after:      1 month

(cherry picked from commit 90fa789cfab54294d4c3a0ac74e01747ce074386)
DeltaFile
+283-307sys/crypto/md5c.c
+1-0stand/libsa/Makefile
+284-3072 files

FreeBSD/src f7874falib/libmd/aarch64 md5block.S

lib/libmd: import aarch64 md5 SIMD implementation

Reviewed by:    andrew, imp
Approved by:    markj (mentor)
Differential Revision:  https://reviews.freebsd.org/D45670
MFC after:      1 month

(cherry picked from commit c1135b2b54bf46709120d98c90ff4d28a77b896c)
DeltaFile
+206-0lib/libmd/aarch64/md5block.S
+206-01 files

FreeBSD/src 28a0f0clib/libmd Makefile, lib/libmd/amd64 md5block.S md5dispatch.c

lib/libmd: import md5 amd64 kernels

Differential Revision:  https://reviews.freebsd.org/D45670
Reviewed by:    imp
Approved by:    markj (mentor)
MFC after:      1 month

(cherry picked from commit d92e987421001c365216b039f8c3303939c195f7)
DeltaFile
+363-0lib/libmd/amd64/md5block.S
+41-0lib/libmd/amd64/md5dispatch.c
+7-0lib/libmd/Makefile
+411-03 files

FreeBSD/src 5a56661sys/conf files, sys/crypto md5c.c md4c.c

sys: move sys/kern/md[45].c to sys/crypto

Both files are used by kernel and userspace.
Move them to sys/crypto where they belong.

No functional changes intended.

In preparation of D45670.

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

(cherry picked from commit 73a9b273d3d315716304c2cc237fef3141a93f2a)
DeltaFile
+341-0sys/crypto/md5c.c
+0-341sys/kern/md5c.c
+0-298sys/kern/md4c.c
+298-0sys/crypto/md4c.c
+2-2sys/conf/files
+2-2sys/modules/smbfs/Makefile
+643-6432 files not shown
+645-6468 files

FreeBSD/src a36c71asys/fs/nfs nfs_commonsubs.c

nfs_commonsubs.c: Get rid of variable used as a constant

The variable ncl_mbuf_mhlen is set to MHLEN and only
used in one place.  This patch simply deletes it and
replaces it with MHLEN.

This patch should not affect semantics.

Spotted while fixing cases that could do large
NFSM_DISSECT() sizes.

(cherry picked from commit 73551cd6eac29a6707c802c7d7fafcb560bf5e2b)
DeltaFile
+1-2sys/fs/nfs/nfs_commonsubs.c
+1-21 files

FreeBSD/src 696b0e2share/keys/pkgbase-15/trusted Makefile backup-signing-15

Add backup pkgbase signing key held by security-officer.

This key was generated by gordon@ (aka security-officer@) on an offline
system as a backup key should anything happen to the AWS Key
Management Service that is currently in use for signing pkgbase
repositories for FreeBSD 15.x.

Reviewed by:    cperciva
With hat:       so

(cherry picked from commit 12ec49d8fac2eacd40ad235bf73cc585736ee77a)
DeltaFile
+2-1share/keys/pkgbase-15/trusted/Makefile
+2-0share/keys/pkgbase-15/trusted/backup-signing-15
+4-12 files

FreeBSD/src 12ec49dshare/keys/pkgbase-15/trusted Makefile backup-signing-15

Add backup pkgbase signing key held by security-officer.

This key was generated by gordon@ (aka security-officer@) on an offline
system as a backup key should anything happen to the AWS Key
Management Service that is currently in use for signing pkgbase
repositories for FreeBSD 15.x.

Reviewed by:    cperciva
With hat:       so
DeltaFile
+2-1share/keys/pkgbase-15/trusted/Makefile
+2-0share/keys/pkgbase-15/trusted/backup-signing-15
+4-12 files

FreeBSD/src 9128380sys/arm64/arm64 mp_machdep.c

Revert "arm64: Move intr_pic_init_secondary earlier"

It's not clear what the race described in the commit actually is, nor
how it could arise, but this commit is definitely wrong; curthread is no
longer set for intr_pic_init_secondary, and gic_v3's pic_init_secondary
uses mutex(9) in some places, which requires curthread, so it has led to
panics. Revert this change until the original issue this was intended to
be fixed can be more thorougly investigated and a better fix made.

Reported by:    Herbert J. Skuhra <herbert at gojira.at>, jhb

This reverts commit a695ac2ce8bc8e8b989359002659063f2e056dcf.
DeltaFile
+2-2sys/arm64/arm64/mp_machdep.c
+2-21 files

FreeBSD/src c4843e5bin/cp cp.c, bin/cp/tests cp_test.sh

cp: Fix copying the root directory

When the source of the copy operation is the root directory, we should
neither append it to the destination path on FTS_D nor trim it back off
on FTS_DP.

PR:             291132
MFC after:      3 days
Fixes:          82fc0d09e862 ("cp: Partly restore symlink folllowing.")
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D53863

(cherry picked from commit fe836c50120daed3e4084f43c27d8d650d36dee8)
DeltaFile
+15-0bin/cp/tests/cp_test.sh
+6-1bin/cp/cp.c
+21-12 files

FreeBSD/src 1b5cc3csys/dev/nvme nvme_ctrlr.c nvme_ns.c

nvme: add support for DIOCGIDENT

Add support for the DIOCGIDENT ioctl to both nvme controller device
nodes and namespace device nodes.

This information was already available via the nda(4) device node.
However, mapping /dev/nvmeX to /dev/ndaY device nodes is not
straightforward, so it's better to get it directly from the /dev/nvme
device node.

PR:             290259
Sponsored by:   ConnectWise
Submitted by:   imp (mostly)
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1875

(cherry picked from commit 6d0001d44490becdd20d627ce663c72a30b9aac3)
DeltaFile
+24-0sys/dev/nvme/nvme_ctrlr.c
+5-0sys/dev/nvme/nvme_ns.c
+1-0sys/dev/nvme/nvme_private.h
+30-03 files