zfs: unbreak aarch64 build with non-gcc compilers
Vendor did not backport this fix into zfs-2.2-release yet.
OpenZFS PR: #16103 35bf25848 Fix: FreeBSD Arm64 does not build currently
(cherry picked from commit b9dee1dca2d74e12e867fd29d2d584fc385078eb)
__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
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]
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)
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)
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]
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
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
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
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)
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)
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
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
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
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
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
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")
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
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
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)