FreeBSD/src 10e342csbin/fsck_msdosfs fat.c

fsck_msdosfs: fix FAT header correction not persisting in cache mode

When fsck_msdosfs runs with FAT32 cache mode (used for large
filesystems that cannot be mmap'd), a detected FAT header correction
was written into the in-memory buffer but the corresponding cache
entry (fat32_cache_allentries[0]) was never marked dirty.  As a
result, fat_flush_fat32_cache_entry() skipped it, the corrected
bytes were never written to disk, and copyfat() propagated the
uncorrected on-disk data to all backup FAT copies.  Every subsequent
fsck run would repeat the same "FAT starts with odd byte sequence /
FIXED" cycle indefinitely.

Fix by marking fat32_cache_allentries[0].dirty = true after applying
the in-memory correction, ensuring the chunk is flushed before
copyfat() runs.

Obtained from:  https://android-review.googlesource.com/c/platform/external/fsck_msdos/+/4047981
MFC after:      3 days
DeltaFile
+11-0sbin/fsck_msdosfs/fat.c
+11-01 files

FreeBSD/src 1bef553sys/dev/cxgbe t4_main.c, sys/dev/cxgbe/common t4_regs.h

cxgbe(4): Updates to the hw and fw headers and config file

MFC after:      1 week
Sponsored by:   Chelsio Communications
DeltaFile
+99-8sys/dev/cxgbe/firmware/t4fw_interface.h
+22-29sys/dev/cxgbe/common/t4_regs.h
+11-8sys/dev/cxgbe/firmware/t7fw_cfg_uwire.txt
+11-8sys/dev/cxgbe/firmware/t7fw_cfg.txt
+11-4sys/dev/cxgbe/t4_main.c
+154-575 files

FreeBSD/src 9432351sys/arm/include _types.h, sys/arm64/include _types.h

types: provide __SIZEOF_{INT{8,16,32,64},TIME,TIME32}_T

Suggested by:   kib
Reviewed by:    imp, kib
Discussed with: emaste, jrtc27
Differential Revision:  https://reviews.freebsd.org/D56783
DeltaFile
+5-0sys/sys/_types.h
+2-0sys/x86/include/_types.h
+2-0sys/sys/abi_types.h
+1-0sys/riscv/include/_types.h
+1-0sys/arm64/include/_types.h
+1-0sys/arm/include/_types.h
+12-01 files not shown
+13-07 files

FreeBSD/src 324d53csys/sys time.h

sys/time: rework saturation ifdef to avoid direct arch ref

Suggested by:   kib
Reviewed by:    imp, kib
Differential Revision:  https://reviews.freebsd.org/D56401
DeltaFile
+2-2sys/sys/time.h
+2-21 files

FreeBSD/src d9b272acontrib/llvm-project/clang/lib/Sema AnalysisBasedWarnings.cpp

Merge commit 871038759afb from llvm git (by Marco Elver):

  Thread Safety Analysis: Fix pointer handling of variables with deprecated attributes (#148974)

  de10e44b6fe7 ("Thread Safety Analysis: Support warning on
  passing/returning pointers to guarded variables") added checks for
  passing pointer to guarded variables. While new features do not
  necessarily need to support the deprecated attributes (`guarded_var`,
  and `pt_guarded_var`), we need to ensure that such features do not cause
  the compiler to crash.

  As such, code such as this:

          struct {
            int v __attribute__((guarded_var));
          } p;

          int *g() {
            return &p.v;  // handleNoMutexHeld() with POK_ReturnPointer

    [24 lines not shown]
DeltaFile
+20-5contrib/llvm-project/clang/lib/Sema/AnalysisBasedWarnings.cpp
+20-51 files

FreeBSD/src cab150fsys/sys time.h

sys/time: appease gcc -Wtype-limits

In environments where time_t is 32 bits, including the 32-bit library
build on amd64, the overflow being tested for cannot happen, and gcc
complains with -Wtype-limits, causing the gcc build to fail.  Work
around this by ifdef'ing out the saturation code on i386.

Reviewed by:    imp, jfree
Discussed with: markj
Fixes:  e3799530b3ba ("sys/time: Add saturating sbt conversions")
Differential Revision:  https://reviews.freebsd.org/D56369

(cherry picked from commit 00dccc3164c6dff38350a1baeeea7238acf2efc3)
DeltaFile
+4-0sys/sys/time.h
+4-01 files

FreeBSD/src bd1e789. Makefile.inc1

Make "make update-packages" idempotent

If the user runs "make update-packages" without bumping BRANCH, then it
isn't possible to copy packages from the old location to the new one
(because the two locations are the same).  So just skip that step.

Sponsored by:           ConnectWise
PR:                     295085
MFC after:              1 week
Reviewed by:            ivy, emaste
Differential Revision:  https://reviews.freebsd.org/D56872
DeltaFile
+3-1Makefile.inc1
+3-11 files

FreeBSD/src 57efbb1sys/arm/include _stdint.h, sys/arm64/include _stdint.h

Define stdint.h macros unconditionally

Similar to glibc, define all the stdint.h macros such as `SIZE_MAX`,
`UINT64_C`, etc unconditionally. I.e. no longer check whether
`__STDC_CONSTANT_MACROS` or `__STDC_LIMIT_MACROS` are defined. See also
<https://sourceware.org/bugzilla/show_bug.cgi?id=15366>.

This is part of reverting base 00bee6fcd77f, which reverted an upstream
libc++ commit that eliminated libc++'s stdint.h wrapper header.

Submitted by:   Nikolas Klauser <nikolasklauser at berlin.de>
MFC after:      1 week
Reviewed by:    imp
Differential Revision: https://reviews.freebsd.org/D56746

(cherry picked from commit 966fb94cb3575ccd39da211165d0858fd0eb0ef2)
DeltaFile
+0-8sys/arm/include/_stdint.h
+0-8sys/arm64/include/_stdint.h
+0-8sys/powerpc/include/_stdint.h
+0-8sys/riscv/include/_stdint.h
+0-8sys/x86/include/_stdint.h
+0-405 files

FreeBSD/src 9a69511sys/powerpc/include _stdint.h, sys/riscv/include _stdint.h

Remove extraneous tab characters at EOL in various _stdint.h files

MFC after:      3 days

(cherry picked from commit daeab702f9adbbb718ecf48e17de8dd619cfe7b8)
DeltaFile
+2-2sys/powerpc/include/_stdint.h
+1-1sys/riscv/include/_stdint.h
+1-1sys/x86/include/_stdint.h
+4-43 files

FreeBSD/src 4699fffsys/powerpc/include _stdint.h, sys/riscv/include _stdint.h

Remove extraneous tab characters at EOL in various _stdint.h files

MFC after:      3 days

(cherry picked from commit daeab702f9adbbb718ecf48e17de8dd619cfe7b8)
DeltaFile
+2-2sys/powerpc/include/_stdint.h
+1-1sys/riscv/include/_stdint.h
+1-1sys/x86/include/_stdint.h
+4-43 files

FreeBSD/src c70f196sys/arm/include _stdint.h, sys/arm64/include _stdint.h

Define stdint.h macros unconditionally

Similar to glibc, define all the stdint.h macros such as `SIZE_MAX`,
`UINT64_C`, etc unconditionally. I.e. no longer check whether
`__STDC_CONSTANT_MACROS` or `__STDC_LIMIT_MACROS` are defined. See also
<https://sourceware.org/bugzilla/show_bug.cgi?id=15366>.

This is part of reverting base 00bee6fcd77f, which reverted an upstream
libc++ commit that eliminated libc++'s stdint.h wrapper header.

Submitted by:   Nikolas Klauser <nikolasklauser at berlin.de>
MFC after:      1 week
Reviewed by:    imp
Differential Revision: https://reviews.freebsd.org/D56746

(cherry picked from commit 966fb94cb3575ccd39da211165d0858fd0eb0ef2)
DeltaFile
+0-8sys/arm/include/_stdint.h
+0-8sys/arm64/include/_stdint.h
+0-8sys/powerpc/include/_stdint.h
+0-8sys/riscv/include/_stdint.h
+0-8sys/x86/include/_stdint.h
+0-405 files

FreeBSD/src eba1c36sys/arm/include _stdint.h, sys/arm64/include _stdint.h

Define stdint.h macros unconditionally

Similar to glibc, define all the stdint.h macros such as `SIZE_MAX`,
`UINT64_C`, etc unconditionally. I.e. no longer check whether
`__STDC_CONSTANT_MACROS` or `__STDC_LIMIT_MACROS` are defined. See also
<https://sourceware.org/bugzilla/show_bug.cgi?id=15366>.

This is part of reverting base 00bee6fcd77f, which reverted an upstream
libc++ commit that eliminated libc++'s stdint.h wrapper header.

Submitted by:   Nikolas Klauser <nikolasklauser at berlin.de>
MFC after:      1 week
Reviewed by:    imp
Differential Revision: https://reviews.freebsd.org/D56746

(cherry picked from commit 966fb94cb3575ccd39da211165d0858fd0eb0ef2)
DeltaFile
+0-8sys/arm/include/_stdint.h
+0-8sys/arm64/include/_stdint.h
+0-8sys/powerpc/include/_stdint.h
+0-8sys/riscv/include/_stdint.h
+0-8sys/x86/include/_stdint.h
+0-405 files

FreeBSD/src a4d15efsys/powerpc/include _stdint.h, sys/riscv/include _stdint.h

Remove extraneous tab characters at EOL in various _stdint.h files

MFC after:      3 days

(cherry picked from commit daeab702f9adbbb718ecf48e17de8dd619cfe7b8)
DeltaFile
+2-2sys/powerpc/include/_stdint.h
+1-1sys/riscv/include/_stdint.h
+1-1sys/x86/include/_stdint.h
+4-43 files

FreeBSD/src 076e448share/man/man9 uio.9 Makefile

uio.9: Document uiomove_fromphys()

Reviewed by:    kib
Discussed with: markj, royger
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54070
DeltaFile
+34-11share/man/man9/uio.9
+1-0share/man/man9/Makefile
+35-112 files

FreeBSD/src 6933fdcsys/kern uipc_shm.c

uipc_shm.c: make large page allocation interruptible

(cherry picked from commit 839d3266d8c6f6471cb92a3c0ae32eb16d117427)
DeltaFile
+8-0sys/kern/uipc_shm.c
+8-01 files

FreeBSD/src c335dafsys/kern uipc_shm.c

uipc_shm.c: make large page allocation interruptible

(cherry picked from commit 839d3266d8c6f6471cb92a3c0ae32eb16d117427)
DeltaFile
+8-0sys/kern/uipc_shm.c
+8-01 files

FreeBSD/src b3f9be4sys/conf newvers.sh

15.1: Update to BETA2

Approved by:    re (implicit)
Sponsored by:   OpenSats Initiative
DeltaFile
+1-1sys/conf/newvers.sh
+1-11 files

FreeBSD/src 7781f5esys/cddl/compat/opensolaris/kern opensolaris_cmn_err.c

dtrace: Improve dmesg kernel message prefix

Provide intuitive log search keywords and increased system consistency.

Approved by:    re (cperciva)
MFC after:              2 weeks
Reported by:            mav
Reviewed by:            0mp, dteske
OpenZFS change:         d45c8d648 (Improve dmesg kernel message prefix)
Differential Revision:  https://reviews.freebsd.org/D55765

(cherry picked from commit 49e9b3061df036a73e8bc424c026158f3f57b183)
(cherry picked from commit b5f45474517646c3df377a75e50260026742ee92)
DeltaFile
+7-7sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c
+7-71 files

FreeBSD/src df38b41share/man/man7 build.7

build.7: Explain update-packages repo signing

Approved by:    re (cperciva)
MFC after:              3 days
Reported by:            kevans
Reviewed by:            kevans, ngie
Differential Revision:  https://reviews.freebsd.org/D56607

(cherry picked from commit ab98fd3234304ea10db3dee70205828d372c443a)
(cherry picked from commit dd926806a723b99c9184ce44ab68b83c03fdc173)
DeltaFile
+10-1share/man/man7/build.7
+10-11 files

FreeBSD/src bf5ca5cusr.sbin/bsdinstall/scripts auto

bsdinstall: Improve auto-partition message

Manually tuning ZFS for systems with <8GB ram hasn't been necessary at
least since the switch to OpenZFS. We have users reporting using 1GB RAM
with no manual tuning/issues. Further, the page this links to is a stale
wiki page, which is causing complaints. Remove this misleading note and
replace it with a similar message for UFS. While here, reword that note
to be a bit clearer.

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

(cherry picked from commit 5ed26c21e4ff1d478d4611abbf3dc14cc1b77244)
(cherry picked from commit 5702d242429f1f791e05a720a9a411b1e64212dc)
DeltaFile
+2-2usr.sbin/bsdinstall/scripts/auto
+2-21 files

FreeBSD/src 1b5b786share/man/man7 ports.7

ports.7/FILES: Expand and refactor into 3 tables

Add make.conf, CHANGES, CONTRIBUTING.Md, UPDATING, and Tools/scripts.
Refactor the FILES section of the ports reference manual into a bigger
table with three sections separated by root directory. Remove preceeding
article from all but "the big Kahuna", and root dirs where reasonable.

Approved by:    re (cperciva)
MFC after:              3 days
Relnotes:               yes
Reported by:            adamw, arrowd, linimon
Differential Revision:  https://reviews.freebsd.org/D55441

(cherry picked from commit 28deec9b7e2b08b00160eb39de84ade6f27eb125)
(cherry picked from commit aa519edfe50a65db516e62752914cb6922b3227f)
DeltaFile
+29-18share/man/man7/ports.7
+29-181 files

FreeBSD/src 519c687usr.sbin/nvram nvram.8

nvram.8: Align option list and tag SPDX

Approved by:    re (cperciva)
MFC after:      3 days

(cherry picked from commit 33fbfceeb4d9daf1145089a10ce7b25110d8840f)
(cherry picked from commit 8318c2f613bea98573aa4cd9ef7a4249d5010dd3)
DeltaFile
+4-2usr.sbin/nvram/nvram.8
+4-21 files

FreeBSD/src b3027c2share/man/man4 ocs_fc.4

ocs_fc.4: Cleanup

+ more consistent document description
+ enumerate available options in synopsis in vt.4 style
+ tag spdx
+ tweak list rendering
+ cleanup HARDWARE
+ reflow excessively long lines silencing linter warnings
+ fix link macros

Approved by:    re (cperciva)
MFC after:              3 days
Reported by:            michaelo (hardware notes)
Differential Revision:  https://reviews.freebsd.org/D56753

(cherry picked from commit dd97c3d83f9a92bbeb9740ceff4c1c74c451293e)
(cherry picked from commit 4da464b1ec4669e658a9839c8ed33f11342b0296)
DeltaFile
+55-38share/man/man4/ocs_fc.4
+55-381 files

FreeBSD/src a9b681e. ObsoleteFiles.inc, usr.sbin/apm Makefile

man: Kill off MANSUBDIRs

Three architecture dependent manuals are installed to MANSUBDIRs,
creating at least two empty manual page directories on everyone's
boxxen. Move those manuals to their canonical area, enhancing clarity,
grepability, removing useless inodes, and increasing consistency with
the rest of the architecture dependent manuals which are unconditionally
installed, and noted at the top of the rendered manual.

Approved by:    re (cperciva)
MFC after: 3 days

(cherry picked from commit 809504f331fd3588e36b54255196379bdb59890a)
(cherry picked from commit 55709c8a46a470af78c0c818b36ac90615728c44)
DeltaFile
+9-0ObsoleteFiles.inc
+0-1usr.sbin/apm/Makefile
+0-1usr.sbin/apmd/Makefile
+0-1usr.sbin/nvram/Makefile
+9-34 files

FreeBSD/src 1d24638sys/kern uipc_usrreq.c, sys/sys ucred.h

Fix LOCAL_PEERCRED in 32-bit compat mode

Previously the cr_pid field would be incorrectly copied to userland, due
to a size mismatch between the structure as defined in 32-bit vs 64-bit
builds.  Fix it by converting the structure before copying it to
userland.

PR:             294833
Sponsored by:   ConnectWise
MFC after:      1 week
Reviewed by:    emaste
Differential Revision: https://reviews.freebsd.org/D56675
DeltaFile
+19-2sys/kern/uipc_usrreq.c
+11-0sys/sys/ucred.h
+30-22 files

FreeBSD/src 5dca0c8tests/sys/netinet socket_afinet.c

tests/socket_afinet: Remove a conditional skip

The test runs without any unexpected results when mac_portacl is loaded.

Approved by:    re (cperciva)
PR:             238781
MFC after:      1 week

(cherry picked from commit 9f6041fb579106aa6fa358071a14eddabd581998)
(cherry picked from commit ae6c11642b54f304490434ec5fe1eb2b470ff620)
DeltaFile
+0-3tests/sys/netinet/socket_afinet.c
+0-31 files

FreeBSD/src 87054cetests/sys/posixshm posixshm_test.c

tests/posixshm: Check for hardware support in largepage_pkru

Approved by:    re (cperciva)
MFC after:      3 days
Fixes:          ca87c0b8e396 ("pkru: Fix handling of 1GB largepage mappings")

(cherry picked from commit 75c66218401c00f4728d5312e2b933b8d3aefde1)
(cherry picked from commit 8988b4de4e3b85baa97fd76254e00da7d3304b35)
DeltaFile
+10-0tests/sys/posixshm/posixshm_test.c
+10-01 files

FreeBSD/src fdd8f30sys/fs/nullfs null_vnops.c, sys/kern vfs_inotify.c

nullfs: Clear inotify flags during reclaim

The inotify flags are copied from the lower vnode into the nullfs vnode
so that the INOTIFY() macro will invoke VOP_INOTIFY on the nullfs vnode;
this is then bypassed to the lower vnode.  However, when a nullfs vnode
is reclaimed we should clear these flags, as the vnode is now doomed and
no longer forwards VOPs to the lower vnode.

Add regression tests.  Remove a test in vn_inotify_revoke() which is no
longer needed after this change.

Approved by:    re (cperciva)
PR:             292495
Reviewed by:    kib
Reported by:    Jed Laundry <jlaundry at jlaundry.com>
Fixes:          f1f230439fa4 ("vfs: Initial revision of inotify")
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56639


    [2 lines not shown]
DeltaFile
+112-0tests/sys/kern/inotify_test.c
+12-0sys/fs/nullfs/null_vnops.c
+0-4sys/kern/vfs_inotify.c
+124-43 files

FreeBSD/src a096a97sys/kern uipc_socket.c

so_splice: Fix the KTLS check for the sink socket in so_splice()

Approved by:    re (cperciva)
Reviewed by:    gallatin
Reported by:    Claude Sonnet 4.6
Fixes:          1000cc4a0d39 ("so_splice: Disallow splicing with KTLS-enabled sockets")
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56385

(cherry picked from commit d88a159da42a75dbd46ea4f6f9c8059975dab5e8)
(cherry picked from commit 43b1de5970d1246aa54d8e34b0f211511cc2b103)
DeltaFile
+1-1sys/kern/uipc_socket.c
+1-11 files

FreeBSD/src 88e12cctests/sys/netinet socket_afinet.c

tests/socket_afinet: Fix the bind_connected_port test

The test verifies that a socket can bind to a local address assigned by
connect(2) to a different socket.  It was however trying to bind to the
wrong address, and the check of the result was inverted, so this went
unnoticed.  It also needs to set SO_REUSEADDR for this to succeed.

Approved by:    re (cperciva)
Reported by:    glebius
MFC after:      1 week

(cherry picked from commit d3d0466cae546254c50c80cf3e0c060bbbbba53c)
(cherry picked from commit 9e8d7d83ecfbf8b34b785d7981a29dda567d0bc6)
DeltaFile
+7-7tests/sys/netinet/socket_afinet.c
+7-71 files