FreeBSD/src abd8725contrib/libcbor/doc/source requirements.txt, contrib/libcbor/examples cbor2cjson.c

libcbor: vendor update to 0.11.0

Sponsored by:   The FreeBSD Foundation
DeltaFile
+184-17contrib/libcbor/test/pretty_printer_test.c
+123-0contrib/libcbor/examples/cbor2cjson.c
+49-33contrib/libcbor/src/cbor.c
+67-0contrib/libcbor/test/string_test.c
+26-26contrib/libcbor/doc/source/requirements.txt
+19-24contrib/libcbor/src/cbor/streaming.c
+468-10039 files not shown
+762-22945 files

FreeBSD/src b27eb9clib/libc/stdlib cxa_thread_atexit_impl.c

__cxa_thread_call_dtors(3): fix dtor pointer validity check

When checking for the destructor pointer belonging to some still
loaded dso, do not limit the possible dso to the one instantiated the
destructor. For instance, dso could set up the dtr pointer to a function
from libcxx.

PR:     278701
Reported by:    vd
Reviewed by:    dim, emaste, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D45074
DeltaFile
+1-1lib/libc/stdlib/cxa_thread_atexit_impl.c
+1-11 files

FreeBSD/src 548bfc5contrib/bmake bmake.cat1 arch.c, contrib/bmake/unit-tests varmod-match.mk

Merge bmake-20240430

Merge commit '507951f55039f9d1ceae507d510f8cb68225fbc5'
DeltaFile
+1,712-853contrib/bmake/bmake.cat1
+67-183contrib/bmake/arch.c
+107-52contrib/bmake/var.c
+73-2contrib/bmake/ChangeLog
+31-23contrib/bmake/unit-tests/varmod-match.mk
+29-11contrib/bmake/configure
+2,019-1,124124 files not shown
+2,615-1,606130 files

FreeBSD/src 507951f. bmake.cat1 arch.c, unit-tests varmod-match.mk

Import bmake-20240430

Intersting/relevant changes since bmake-20240309

ChangeLog since bmake-20240309

2024-04-30  Simon J Gerraty  <sjg at beast.crufty.net>

        * VERSION (_MAKE_VERSION): 20240430
        Merge with NetBSD make, pick up
        o main.c: ensure '.include <makefile>' respects MAKESYSPATH.
        Dir_FindFile will search .CURDIR first unless ".DOTLAST" is seen.

2024-04-28  Simon J Gerraty  <sjg at beast.crufty.net>

        * VERSION (_MAKE_VERSION): 20240428
        Merge with NetBSD make, pick up
        o simplify freeing of lists
        o arch.c: trim pointless comments

    [98 lines not shown]
DeltaFile
+1,712-853bmake.cat1
+67-183arch.c
+107-52var.c
+73-2ChangeLog
+31-23unit-tests/varmod-match.mk
+29-11configure
+2,019-1,124120 files not shown
+2,599-1,584126 files

FreeBSD/src 5f50d6bdoc/source requirements.txt, examples cbor2cjson.c

Vendor import of libcbor 0.11.0
DeltaFile
+184-17test/pretty_printer_test.c
+123-0examples/cbor2cjson.c
+49-33src/cbor.c
+67-0test/string_test.c
+26-26doc/source/requirements.txt
+19-24src/cbor/streaming.c
+468-10039 files not shown
+762-22945 files

FreeBSD/src 25c2d76share/man/man5 src.conf.5, sys/conf kern.opts.mk

Enable kernel reproducible builds on stable branch

When the stable/13 branch was created the userland knob (in
share/mk/src.opts.mk) was changed to default to yes, but the kernel
default was not changed.  These two should always have the same default.
Regenerate src.conf.5, as the differing defaults previously confused
`makeman`.

Fixes: bfd15705156b ("Create the stable/13 branch")
Sponsored by: The FreeBSD Foundation
Approved by:    re (cperciva)

(cherry picked from commit d8644a5d2458588dd7d8e44bd23c6cacaead19b7)
(cherry picked from commit 3a8e15354ec58abeec2ee2fe96cbabb46083d183)
DeltaFile
+4-4share/man/man5/src.conf.5
+1-1sys/conf/kern.opts.mk
+5-52 files

FreeBSD/src 3a8e153share/man/man5 src.conf.5, sys/conf kern.opts.mk

Enable kernel reproducible builds on stable branch

When the stable/13 branch was created the userland knob (in
share/mk/src.opts.mk) was changed to default to yes, but the kernel
default was not changed.  These two should always have the same default.
Regenerate src.conf.5, as the differing defaults previously confused
`makeman`.

Fixes: bfd15705156b ("Create the stable/13 branch")
Sponsored by: The FreeBSD Foundation
MFS from:       stable/13
MFS to:         releng/14.1

(cherry picked from commit d8644a5d2458588dd7d8e44bd23c6cacaead19b7)
DeltaFile
+4-4share/man/man5/src.conf.5
+1-1sys/conf/kern.opts.mk
+5-52 files

FreeBSD/src 9a5f0cbsys/contrib/openzfs/config ax_python_devel.m4, sys/contrib/openzfs/module/os/linux/zfs vdev_disk.c

zfs: merge openzfs/zfs at 256659204 (zfs-2.2-release) into stable/14

OpenZFS release 2.2.4

Notable upstream pull request merges:
 #15076 fdd97e009 Refactor dmu_prefetch()
 #15225 5972bb856 Use ASSERT0P() to check that a pointer is NULL
 #15381 7ea833100 ZIL: Detect single-threaded workloads
 #15515 8b1a132de ZIO: Optimize zio_flush()
 #15225 d6da6cbd7 Clean up existing VERIFY*() macros
 #15225 5dda8c091 Add VERIFY0P() and ASSERT0P() macros
 #15436 61f3638a3 Add prefetch property
 #15509 6f323353d Add ashift validation when adding devices to a pool
 #15539 ea3f7c12a Extend import_progress kstat with a notes field
 #15635 25ea8ce94 ZIL: Improve next log block size prediction
 #15784 16c223eec Do no use .cfi_negate_ra_state within the assembly on
                  Arm64
 #15839 706307445 vdev probe to slow disk can stall mmp write checker
 #15879 86b39b41a zpool: Fix locale-specific time

    [31 lines not shown]
DeltaFile
+702-215sys/contrib/openzfs/module/os/linux/zfs/vdev_disk.c
+232-118sys/contrib/openzfs/module/zfs/zil.c
+229-112sys/contrib/openzfs/config/ax_python_devel.m4
+241-55sys/contrib/openzfs/module/zfs/dmu_zfetch.c
+146-60sys/contrib/openzfs/module/zfs/zap_micro.c
+205-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/events/zed_slow_io.ksh
+1,755-560152 files not shown
+4,820-1,658158 files

FreeBSD/src 6faf656. RELNOTES

RELNOTES: Document the addition of NVMe over Fabrics support
DeltaFile
+14-0RELNOTES
+14-01 files

FreeBSD/src c2e9c5bsys/dev/tpm tpm_tis.c tpm_tis_core.c

tpm: Refactor TIS and add a SPI attachment

Summary:
Though mostly used in x86 devices, TPM can be used on others, with a
direct SPI attachment.  Refactor the TPM 2.0 driver set to use an
attachment interface, and implement a SPI bus interface.

Test Plan:
Tested on a Raspberry Pi 4, with a GeeekPi TPM2.0 module (SLB9670
TPM) using security/tpm2-tools tpm2_getcaps for very light testing against the
spibus attachment.

Reviewed by:    kd
Obtained from:  Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D45069
DeltaFile
+0-520sys/dev/tpm/tpm_tis.c
+486-0sys/dev/tpm/tpm_tis_core.c
+166-0sys/dev/tpm/tpm_spibus.c
+99-0sys/dev/tpm/tpm_bus.c
+91-0sys/dev/tpm/tpm_tis_spibus.c
+86-0sys/dev/tpm/tpm_tis_acpi.c
+928-5208 files not shown
+1,086-60014 files

FreeBSD/src 227f81clibexec/save-entropy save-entropy.8 Makefile

save-entropy: Add manual page

Succinct manual page for save-entropy(8).

PR:                     223998
Reported by:            AJ Jordan <alex+freebsd at strugee.net>
Reviewed by:            carlavilla@, delphij@, lwhsu@, pauamma_gundo.com
Approved by:            delphi, lwhsu (src)
Differential Revision:  https://reviews.freebsd.org/D41768

(cherry picked from commit 8dc9b10e388da19d63b3dd718a8243e8e969091d)
DeltaFile
+97-0libexec/save-entropy/save-entropy.8
+1-0libexec/save-entropy/Makefile
+98-02 files

FreeBSD/src b95e960contrib/libdiff/lib diff_output.c

libdiff: More type issues.

Sponsored by:   Klara, Inc.
Reviewed by:    allanjude
Differential Revision:  https://reviews.freebsd.org/D45080
DeltaFile
+12-12contrib/libdiff/lib/diff_output.c
+12-121 files

FreeBSD/src b985c9csys/contrib/openzfs/config ax_python_devel.m4, sys/contrib/openzfs/lib/libspl assert.c

zfs: merge openzfs/zfs at 8f1b7a6fa

Notable upstream pull request merges:
 #15839 c3f2f1aa2 vdev probe to slow disk can stall mmp write checker
 #15888 5044c4e3f Fast Dedup: ZAP Shrinking
 #15996 db499e68f Overflowing refreservation is bad
 #16118 67d13998b Make more taskq parameters writable
 #16128 21bc066ec Fix updating the zvol_htable when renaming a zvol
 #16130 645b83307 Improve write issue taskqs utilization
 #16131 8fd3a5d02 Slightly improve dnode hash
 #16134 a6edc0adb zio: try to execute TYPE_NULL ZIOs on the current task
 #16141 b28461b7c Fix arcstats for FreeBSD after zfetch support

Obtained from:  OpenZFS
OpenZFS commit: 8f1b7a6fa6762ea4c89198ceb11c521f80b92ddc
DeltaFile
+229-112sys/contrib/openzfs/config/ax_python_devel.m4
+328-8sys/contrib/openzfs/module/zfs/zap.c
+140-51sys/contrib/openzfs/module/zfs/spa.c
+97-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmp/mmp_write_slow_disk.ksh
+91-2sys/contrib/openzfs/lib/libspl/assert.c
+81-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/zap_shrink/zap_shrink_001_pos.ksh
+966-17343 files not shown
+1,332-27149 files

FreeBSD/src 04ea5e9sys/amd64/conf MINIMAL, sys/i386/conf MINIMAL

MINIMAL: Grow minimal to support ata, scsi and nvme

Until the boot loader automatically loads these things (including the
CAM dependency), we need to have them in the minimal kernel since they
are needed to boot. These aren't strictly required to be in the kernel,
since modules work, but are high enough demand items that until we sort
out boot loader automation, I'm adding them here. These devices are also
common in vm environments. The delta is relatively small in size. Once
the boot loader automation arrives, these and a lot of other things can
be trimmed. It's less than ideal, but is a good middle ground for the
moment.

Sponsored by:           Netflix
Reviewed by:            kevans, emaste
Differential Revision:  https://reviews.freebsd.org/D45012
DeltaFile
+12-0sys/amd64/conf/MINIMAL
+12-0sys/i386/conf/MINIMAL
+24-02 files

FreeBSD/src eea5f8dusr.bin/diff diffreg_new.c diff.c

diff: Sort headers.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D45078
DeltaFile
+9-5usr.bin/diff/diffreg_new.c
+2-2usr.bin/diff/diff.c
+1-1usr.bin/diff/diffdir.c
+12-83 files

FreeBSD/src 0549218contrib/libdiff/lib diff_main.c

libdiff: Fix type issues.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    allanjude, markj
Differential Revision:  https://reviews.freebsd.org/D45077
DeltaFile
+3-2contrib/libdiff/lib/diff_main.c
+3-21 files

FreeBSD/src ea2d874sys/geom/stripe g_stripe.c g_stripe.h

geom_stripe: Cascade cantrim just like we do for gmirror

If any of the disks can support trim, cascade that up the
stack. Otherwise, trims won't pass through striped raid setups.

PR: 277673
Reviewed by: imp (minor style tweaks from bug report)
DeltaFile
+20-1sys/geom/stripe/g_stripe.c
+3-0sys/geom/stripe/g_stripe.h
+23-12 files

FreeBSD/src 12117d0sys/cam/scsi scsi_da.c

da: Update trim stats for WRITE SAME and ATA TRIM

The scsi UNMAP path updated trim stats in the da sysctl, but the ATA
TRIM passthru and WRITE SAME paths did not. Add code so they do.

PR: 277637
Reviewed by: imp (tweaked WS path to update ranges)
DeltaFile
+6-0sys/cam/scsi/scsi_da.c
+6-01 files

FreeBSD/src 0c0146ctests/sys/kern sendfile_helper.c sendfile_test.sh

tests/sendfile: test operation on unix/stream socket

Although there are already multiple tests in the tests collection
that utilize sendfile(2) support over unix/stream socket, they all
don't exercise the asynchronous part of the operation.  This test
framework, however, uses a trick to toggle true async operation and
guarantee that pr_ready method of unix/stream is also tested.

Reviewed by:            chs
Differential Revision:  https://reviews.freebsd.org/D45055
DeltaFile
+30-9tests/sys/kern/sendfile_helper.c
+24-0tests/sys/kern/sendfile_test.sh
+54-92 files

FreeBSD/src c368d3ftests/sys/kern sendfile_helper.c

tests/sendfile: factor out tcp_socketpair()

It creates a pair of connected TCP sockets for later testing.  No
functional change.

Reviewed by:            chs
Differential Revision:  https://reviews.freebsd.org/D45054
DeltaFile
+65-54tests/sys/kern/sendfile_helper.c
+65-541 files

FreeBSD/src a25e0balib/libarchive Makefile.inc

libarchive: fix thread autodetermination for zstd compression format

The libarchive code uses sysconf(3) to determine the number of threads
when 0 has been given as the number of thread to use

MFC after:      3 days
DeltaFile
+2-1lib/libarchive/Makefile.inc
+2-11 files

FreeBSD/src 7206f7csys/compat/linuxkpi/common/include/asm set_memory.h

linuxkpi: Fix set_memory_*

set_memory_* is currently implemented using PHYS_TO_DMAP but not all
architectures have a DMAP.  Looking at how this function is used the
given address isn't physical but virtual so the PHYS_TO_DMAP call can
simply be removed.

Also cast numpages before shifting it to avoid overflow.

Reviewed by:    kib, markj
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D45057
DeltaFile
+6-15sys/compat/linuxkpi/common/include/asm/set_memory.h
+6-151 files

FreeBSD/src 95032b5usr.bin/split split.c

Tighten boundary check in split(1) to prevent a potential buffer overflow.

Before increasing sufflen, make sure the current name plus two (including
the terminating NUL character and the to-be-added character) does not
exceed the fixed buffer length, and stop immediately if this would occur.

In worst case scenario the code would write an nul character beyond the
boundary, however it would be caught by open(2) and based on the memory
layout, we do not believe this would constitute a security vulnerability.

MFC after:      3 days
DeltaFile
+4-0usr.bin/split/split.c
+4-01 files

FreeBSD/src bf89881tests/sys/netpfil/pf nat66.py

pf tests: fix REQUIRED_MODULES typo

This ensures we don't try to run the nat66 tests if pf is not loaded.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-1tests/sys/netpfil/pf/nat66.py
+1-11 files

FreeBSD/src aa48259usr.sbin/periodic periodic.conf, usr.sbin/periodic/etc/security 200.chkmounts 800.loginfail

periodic.conf: remove long deprecated security_daily_compat_var()

This function is documented to be gone in after 11. Time to remove this
compat shim.

PR:             275296
Reviewed by:    jrm (mentor)
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D44796
DeltaFile
+0-22usr.sbin/periodic/periodic.conf
+0-4usr.sbin/periodic/etc/security/200.chkmounts
+0-3usr.sbin/periodic/etc/security/800.loginfail
+0-3usr.sbin/periodic/etc/security/900.tcpwrap
+0-3usr.sbin/periodic/etc/security/security.functions
+0-2usr.sbin/periodic/etc/security/500.ipfwdenied
+0-3710 files not shown
+0-5716 files

FreeBSD/src 7b082bdsys/conf newvers.sh, sys/sys param.h

Post-14.1-branch updates

Rename stable/14 to -STABLE

Bump __FreeBSD_version

Approved by:    re (implicit)
Sponsored by:   https://www.patreon.com/cperciva
DeltaFile
+1-1sys/conf/newvers.sh
+1-1sys/sys/param.h
+2-22 files

FreeBSD/src 3f5f387release/pkg_repos release-dvd.conf, sys/conf newvers.sh

14.1: create releng/14.1 branch

Update from PRERELEASE to BETA1
Switch pkg(8) configuration to use the quarterly repository
Bump __FreeBSD_version

Approved by:    re (implicit)
Sponsored by:   https://www.patreon.com/cperciva
DeltaFile
+1-1release/pkg_repos/release-dvd.conf
+1-1sys/conf/newvers.sh
+1-1sys/sys/param.h
+3-33 files

FreeBSD/src c4d0e1fcontrib/libarchive/libarchive archive_string.c archive_match.c, contrib/libarchive/unzip/test test_I.c

libarchive: merge bugfixes from vendor branch

 #2147 archive_string: clean up strncat_from_utf8_to_utf8 (36047967a)
 #2153 archive_match: check archive_read_support_format_raw()
       return value (0ce1b4c38)
 #2154 archive_match: turn counter into flag (287e05d53)
 #2155 lha: Do not allow negative file sizes (93b11caed)
 #2156 tests: setenv LANG to en_US.UTF-8 in bsdunzip test_I.c (83e8b0ea8)

(cherry picked from commit c0b58e65deca1e5e2c434ede7e64f03af6044be8)
DeltaFile
+42-54contrib/libarchive/libarchive/archive_string.c
+9-9contrib/libarchive/libarchive/archive_match.c
+8-0contrib/libarchive/unzip/test/test_I.c
+2-0contrib/libarchive/libarchive/archive_read_support_format_lha.c
+61-634 files

FreeBSD/src cf2750bsys/kern sys_generic.c

kcmp_pget(): do not accept TIDs

(cherry picked from commit 5b3e5c6ce3e552dae3e84d6bc781bc9f53c22d71)
DeltaFile
+2-1sys/kern/sys_generic.c
+2-11 files

FreeBSD/src d9ec850libexec/rtld-elf rtld_printf.c

rtld snprintf: do not erronously skip a char at the buffer boundary

(cherry picked from commit 56ee5fc43c40479e2651b21862e299bcf73017ae)
DeltaFile
+3-4libexec/rtld-elf/rtld_printf.c
+3-41 files