Otherwise the field is left uninitialized, leading to a possible kernel
memory disclosure to userspace or to the network. Use the same
initialization value we use in zfsctl_common_getattr().
Reported-by: KMSAN
Sponsored-by: The FreeBSD Foundation
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ed Maste <emaste@FreeBSD.org>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
(cherry picked from commit 11656234b560c401dec6a16e1bf048b20fd31aac)
OpenZFS release 2.2.2
Notable upstream pull request merges:
#15532e4985bf5a zdb: Fix zdb '-O|-r' options with -e/exported zpool
#1553389fcb8c6f Revert "Tune zio buffer caches and their alignments"
#15541d702f86ea brt: lift internal definitions into _impl header
#1554356a2a0981 ZIL: Do not encrypt block pointers in lr_clone_range_t
#15551349fb77f1 FreeBSD: Fix the build on FreeBSD 12
#15563522414da3 FreeBSD: Fix ZFS so that snapshots under .zfs/snapshot are
NFS visible
#155662a953e0ac dmu_buf_will_clone: fix race in transition back to NOFILL
#155719b9b09f45 dnode_is_dirty: check dnode and its data for dirtiness
#15603a8c256046 ZIL: Call brt_pending_add() replaying TX_CLONE_RANGE
Obtained from: OpenZFS
OpenZFS commit: 494aaaed89
OpenZFS tag: zfs-2.2.2
Various reports recently hit the "Invalid TXQ id" in iwlwifi again.
Unconditionally enable logging and add a note to report to a specific
PR in the log message for now.
Along with 018d93ece16b this will hopefully help us to understand what
is going on.
Sponsored by: The FreeBSD Foundation
PR: 274382
(cherry picked from commit ad134f8ab768e3b1d2db203f1cc963bdf0eea857)
#15566 688514e47 dmu_buf_will_clone: fix race in transition back to NOFILL
Obtained from: OpenZFS
(cherry picked from commit 688514e4704bdee4551d25960febd322ac26f297)
#15543 27d8c23c5 ZIL: Do not encrypt block pointers in lr_clone_range_t
Obtained from: OpenZFS
(cherry picked from commit 27d8c23c582056a23509a7b80844a1b6435750b0)
#15571 30d581121 dnode_is_dirty: check dnode and its data for dirtiness
Obtained from: OpenZFS
(cherry picked from commit 30d581121bb122c90959658e7b28b1672d342897)
OpenZFS release 2.2.1
Notable upstream pull request merges:
#143786d693e20a Large sync writes perform worse with slog
#1524378fd79eac Add zfs_prepare_disk script for disk firmware install
#15356b76724ae4 FreeBSD: Improve taskq wrapper
#15360f9a9aea12 Add mutex_enter_interruptible() for interruptible
sleeping IOCTLs
#15371e82e68400 DMU: Do not pre-read holes during write
#1539079f7de575 Remove lock from dsl_pool_need_dirty_delay()
#153976e41aca51 Trust ARC_BUF_SHARED() more
#15402eaa62d995 Properly pad struct tx_cpu to cache line
#154051cc1bf4fa Set spa_ccw_fail_time=0 when expanding a vdev
#15416edebca5df FreeBSD: taskq: Remove unused declaration
#154517aef672b7 Read prefetched buffers from L2ARC
#15452bd7a02c25 Tune zio buffer caches and their alignments
#154563ec4ea68d Unify arc_prune_async() code
#15465459c99ff2 Fix block cloning between unencrypted and encrypted
datasets
#1547876663fe37 Fix accounting error for pending sync IO ops in zpool
iostat
#1552987e9e8286 Add a tunable to disable BRT support
Obtained from: OpenZFS
OpenZFS commit: 55dd24c4cc
OpenZFS tag: zfs-2.2.1
#15465 763ca47f Fix block cloning between unencrypted and encrypted
datasets
Fixes a kernel panic when block cloning is enabled and system is trying
to read data from a file copied using copy_file_range(2), e.g. with cp(1)
from an unencrypted dataset into an encrypted dataset on the same ZFS pool.
As the file has not been encrypted, to fix the filesystem inconsistency
and to avoid future panics it must be deleted (metadata is readable).
Obtained from: OpenZFS
OpenZFS commit: 763ca47fa81808be62ab5e02357e896233f24abc
#15405 ea30b5a9e Set spa_ccw_fail_time=0 when expanding a vdev
Fixes 5-minute autoexpand delay on ZFS-root VM images.
Requested by: cperciva
Co-Authored-By: Colin Percival <cperciva@FreeBSD.org>
Obtained from: OpenZFS
OpenZFS commit: ea30b5a9e0d266baa13398ed8f9435de050f4b25
Notable upstream pull request merges:
#1529033d7c2d16 import: require force when cachefile hostid doesn't
match on-disk
#15319bcd010d3a Reduce number of metaslab preload taskq threads
#153391611b8e56 Add BTI landing pads to the AArch64 SHA2 assembly
#15340bc77a0c85 ARC: Remove b_cv from struct l1arc_buf_hdr
#153473158b5d71 ARC: Drop different size headers for crypto
#15350ba7797c8d ARC: Remove b_bufcnt/b_ebufcnt from ARC headers
#153539be8ddfb3 ZIL: Reduce maximum size of WR_COPIED to 7.5K
#153628495536f7 zfsconcepts: add description of block cloning
Obtained from: OpenZFS
OpenZFS commit: 2407f30bda
OpenZFS tag: zfs-2.2.0-rc5
This is a combined version of updates of the rtw88 driver based
on wireless-testing
(wt-2023-05-11) 711dca0ca3d77414f8f346e564e9c8640147f40d (after v6.4-rc1),
(wt-2023-06-09) 7bd20e011626ccc3ad53e57873452b1716fcfaaa (after v6.4-rc5),
(wt-2023-07-24) 62e409149b62a285e89018e49b2e115757fb9022 (after v6.5-rc3),
(wt-2023-08-06) 2a220a15be657a24868368892e3e2caba2115283 (after v6.5-rc4).
This update follows other currently disconnected LinuxKPI based wireless
drivers to lift them all to a same version in case someone else wants to
work on this driver in parallel to predominant iwlwifi efforts.
While debugging some funky register reads of 0xaeaea from RF_CFGCH
resulting in "rtw880: [TXGAPK] unknown channel 234!!" more of these
reads came to my attention hidden by using the register index rather
than the defined value. Make this more grep-able.
(cherry picked from commit 90aac0d83bc9645f51ef0c2aeae6f9c0540bb031)
(cherry picked from commit 4f3b2bba240b6e0603b5cbb47155fd8215bcbcb3)
In order for the FreeBSD-specific sysctl (which gives us a full list of
PCI device IDs/names/and firmware prefixes) to be in the proper namespace
add a LINUXKPI_PARAM_PREFIX definition to the file as well.
The sysctl can now be used as:
sysctl -n compat.linuxkpi.iwlwifi_pci_ids_name
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 0a22677bce28bc9ad39f219b726b5791852d84ba)
Firmware was obtained from linux-firmware at
dfa11466cf000120d1551146fd5bf78c44941eda.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 027768a21217499dd85aba8608715a5bf66a7857)
This is a combined versions of updates of the iwlwifi driver based
on wireless-testing
(wt-2023-05-11) 711dca0ca3d77414f8f346e564e9c8640147f40d (after v6.4-rc1).
(wt-2023-06-09) 7bd20e011626ccc3ad53e57873452b1716fcfaaa (after v6.4-rc5).
(wt-2023-07-24) 62e409149b62a285e89018e49b2e115757fb9022 (after v6.5-rc3).
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 9af1bba44e1ce9b0296ae56760b564d67ab7a1cf)
Update ieee80211_request_smps() to the new number of arguments in
LinuxKPI (which was already prepared) and update the one call in the
older iwlwifi driver version.
This will allow iwlwifi as-is now and rtw88 to compile in case someone
else wants to work on the latter in parallel to predominant efforts on
the former.
Unconditionally enable the other changes for newer drivers, as needed by
iwlwifi (and others).
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 815b7436a7c6302365b6514194d27d41cb736227)
(cherry picked from commit 3e1f5cc9a81a6065ddc371eea5755b4e207d72f8)
Rather than always comparing a given SSID to the first SSID of the
IE list, compare it to the the iterator one. That way duplicates can
be found.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit ee7077f24f5b02bde8cf5c202848128f18733398)
Notable upstream pull request merges:
#15240e9dc31c74 Update the behavior of mountpoint property
#15240c53bc3837 Improve the handling of sharesmb,sharenfs properties
#152980ce1b2ca1 Invoke zdb by guid to avoid import errors
#153010aabd6b48 ZIL: Avoid dbuf_read() in ztest_get_data()
#15308 9e36c576f Don't allocate from new metaslabs
#15312229ca7d73 Fix ENOSPC for extended quota
#153213079bf2e6 Restrict short block cloning requests
#153228015e2ea6 Add '-u' - nomount flag for zfs set
#15324b34bf2d5f Tweak rebuild in-flight hard limit
#15331608741d06 Report ashift of L2ARC devices in zdb
#153330d870a177 Fix invalid pointer access in trace_dbuf.h
Obtained from: OpenZFS
OpenZFS commit: 8015e2ea66
This is intended to be used with the upcoming updated ice(4) version
1.38.16-k.
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Sponsored by: Intel Corporation
(cherry picked from commit e04c4b4a369df3f1dcbebbdf726193f02af60801)
Notable upstream pull request merges:
#15024 Add missed DMU_PROJECTUSED_OBJECT prefetch
#15029 Do not request data L1 buffers on scan prefetch
#15036 FreeBSD: catch up to __FreeBSD_version 1400093
#15039 Fix raw receive with different indirect block size
#15047 FreeBSD: Fix build on stable/13 after 1302506
#15049 Fix the ZFS checksum error histograms with larger record sizes
#15052 Reduce bloat in ereport.fs.zfs.checksum events
#15056 Avoid extra snprintf() in dsl_deadlist_merge()
#15061 Ignore pool ashift property during vdev attachment
#15063 Don't panic if setting vdev properties is unsupported for this
vdev type
#15067 spa_min_alloc should be GCD, not min
#15071 Add explicit prefetches to bpobj_iterate()
#15072 Adjust prefetch parameters
#15079 set autotrim default to 'off' everywhere
#15080 ZIL: Fix config lock deadlock
#15088 metaslab: tuneable to better control force ganging
#15096 Avoid waiting in dmu_sync_late_arrival()
#15097 BRT should return EOPNOTSUPP
#15103 Remove zl_issuer_lock from zil_suspend()
#15107 Remove fastwrite mechanism
#15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1
#15122 ZIL: Second attempt to reduce scope of zl_issuer_lock
#15129 zpool_vdev_remove() should handle EALREADY error return
#15132 ZIL: Replay blocks without next block pointer
#15148 zfs_clone_range should return descriptive error codes
#15153 ZIL: Avoid dbuf_read() before dmu_sync()
#15161 Make zoned/jailed zfsprops(7) make more sense
#15172 copy_file_range: fix fallback when source create on same txg
#15180 Update outdated assertion from zio_write_compress
#15216 Relax error reporting in zpool import and zpool split
#15227 ZIL: Tune some assertions
#15228 ZIL: Revert zl_lock scope reduction
#15233 ZIL: Change ZIOs issue order
Obtained from: OpenZFS
OpenZFS commit: 32949f2560
Approved by: re (gjb)
This is a set of updates of the rtw89 driver based on wireless-testing
(wt-2023-05-11) 711dca0ca3d77414f8f346e564e9c8640147f40d (after v6.4-rc1).
(wt-2023-06-09) 7bd20e011626ccc3ad53e57873452b1716fcfaaa (after v6.4-rc5).
(wt-2023-07-24) 62e409149b62a285e89018e49b2e115757fb9022 (after v6.5-rc3).
(wt-2023-08-06) 2a220a15be657a24868368892e3e2caba2115283 (after v6.5-rc4).
(wt-2023-08-13) 81e147b1317ee7cde8b624ee8c0501b470d7e91c (after v6.5-rc5).
MFC after: 20 days
This is a set of updates of the mt76 driver based on wireless-testing
(wt-2023-05-11) 711dca0ca3d77414f8f346e564e9c8640147f40d (after v6.4-rc1),
This adds support for mt7996 as well.
(wt-2023-06-09) 7bd20e011626ccc3ad53e57873452b1716fcfaaa (after v6.4-rc5),
(wt-2023-07-24) 62e409149b62a285e89018e49b2e115757fb9022 (after v6.5-rc3),
(wt-2023-08-06) 2a220a15be657a24868368892e3e2caba2115283 (after v6.5-rc4).
The current version of LinuxKPI lacks support for "page pool" which
needs enhancing and updating a decade or so old shortcut mapping
struct page directly to struct vm_page.
MFC after: 20 days
Import BSD-3-Clause-Clear ath12k driver based on wireless-testing
(wt-2023-05-11) 711dca0ca3d77414f8f346e564e9c8640147f40d (after v6.4-rc1)
with further updates based on
(wt-2023-06-09) 7bd20e011626ccc3ad53e57873452b1716fcfaaa (after v6.4-rc5),
(wt-2023-07-24) 62e409149b62a285e89018e49b2e115757fb9022 (after v6.5-rc3),
(wt-2023-08-06) 2a220a15be657a24868368892e3e2caba2115283 (after v6.5-rc4),
(wt-2023-08-13) 81e147b1317ee7cde8b624ee8c0501b470d7e91c (after v6.5-rc5).
Complement the driver to make compile on FreeBSD
using LinuxKPI with changes covered by #ifdef (__FreeBSD__).
Add the module build framework but keep disconnected from the
build for now.
The current driver (or rather LinuxKPI) lacks support for some
"qcom" bits needed in order to get things working (as does ath11k).
There was interest by various people to enhance support further
for ath11k which will equally benefit ath12k.
Given the lack of full license texts on the files this is
imported under the draft policy for handling SPDX files (D29226)
and with approval for BSD-3-Clause-Clear. [1]
Approved by: core (jhb, 2023-05-11) [1]
MFC after: 20 days
This is a set of updates of the ath11k driver based on wireless-testing
(wt-2023-05-11) 711dca0ca3d77414f8f346e564e9c8640147f40d (after v6.4-rc1),
(wt-2023-06-09) 7bd20e011626ccc3ad53e57873452b1716fcfaaa (after v6.4-rc5),
(wt-2023-07-24) 62e409149b62a285e89018e49b2e115757fb9022 (after v6.5-rc3),
(wt-2023-08-06) 2a220a15be657a24868368892e3e2caba2115283 (after v6.5-rc4).
MFC after: 20 days
This is a set of updates of the ath10k driver based on wireless-testing
(wt-2023-05-11) 711dca0ca3d77414f8f346e564e9c8640147f40d (after v6.4-rc1),
(wt-2023-06-09) 7bd20e011626ccc3ad53e57873452b1716fcfaaa (after v6.4-rc5),
(wt-2023-07-24) 62e409149b62a285e89018e49b2e115757fb9022 (after v6.5-rc3),
(wt-2023-08-06) 2a220a15be657a24868368892e3e2caba2115283 (after v6.5-rc4).
MFC after: 20 days
During the last import a (debug) workaround to avoid an early firmware
crash was imported. In order to remember and to separate it from
upstream sources put it under #ifdef
MFC after: 20 days
Vendor PR:
#15103 Remove zl_issuer_lock from zil_suspend()
Obtained from: OpenZFS
OpenZFS commit: 2848de11e516a2ef2e6baa574a60d77a6fb47023
Note: full vendor imports will continue when stable/14 has been branched
Vendor PR:
#15080 ZIL: Fix config lock deadlock
Obtained from: OpenZFS
OpenZFS commit: 2cb992a99ccadb78d97049b40bd442eb4fdc549d
Note: full vendor imports will continue when stable/14 has been branched
All of these are obsoleted by the general removal of MIPS support.
Actually, corresponding to the removed AH_SUPPORT_x, there is more
superfluous support sprinkled across the HAL source. However, that
code is left in place for now in order to ease a sync to NetBSD.
Reviewed by: emaste (w/ man page fix)
Approved by: adrian
Differential Revision: https://reviews.freebsd.org/D41355
As it turns out having autotrim default to 'on' on FreeBSD never really
worked due to mess with defines where userland and kernel module were
getting different default values (userland was defaulting to 'off',
module was thinking it's 'on').
PR: 264234
Reviewed by: mav (zfs)
Differential Revision: https://reviews.freebsd.org/D41056
Under COMPAT_32BIT we are compiling 32-bit code and so __LP64__ is not
defined, __ILP32__ is, and thus the check is completely redundant.
Reviewed by: brooks, jhb, imp
Differential Revision: https://reviews.freebsd.org/D40917
Notable upstream pull request merges:
#14654 Pack our DDT ZAPs a bit denser
#14979 Again fix race between zil_commit() and zil_suspend()
#14985 Some ZIO micro-optimizations
#15000 Fix remount when setting multiple properties
#15004 ddt_addref: remove unnecessary phys fill when refcount is 0
#15007 Do not report bytes skipped by scan as issued
#15023 Enable tuning of ZVOL open timeout value
Obtained from: OpenZFS
OpenZFS commit: 009d3288de
OpenZFS tag: zfs-2.2.0-rc1
Further testing (sadly, after committing) shows that I missed the fact
that IN_BASE is used as userland/kernel delimiter (and not just for
FreeBSD-specific code unlike the IN_FREEBSD_BASE). Revert until I have
a full (and proper) fix.
This reverts commit d2a45e9e81.
Consistently use IN_BASE to allow libzfs to get the same default
autotrim value as kernel does.
Note that this does not change the default value itself, rather
fixing the source of value and the value itself in e.g. zpool get
output if it was not set explicitly. (And as a reminder, default
value of autotrim on FreeBSD is 'on', despite what zpoolprops(7)
says currently.)
PR: 264234
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D40075
Notable upstream pull request merges:
#14925 Another set of vdev queue optimizations
#14964 Use big transactions for small recordsize writes
#14999 ZIL: Fix another use-after-free
Obtained from: OpenZFS
OpenZFS commit: a9d6b0690b
These symlinks are broken. They point to files that don't exist, and
rely on having them be built using a 'in-tree' build that FreeBSD
doesn't use. They also show up as errors on grep -r. Since they are
broken and can't possibly work, remove them for now since non-functional
symlinks matching an upstrem repo that can't work in our repo aren't
worth the error messages.
Though one could argue the whole debian directory should be removed, I
did the minimal change necessary. These can return when the fundamental
issue is fixed and the contrib/debian tree is useful on FreeBSD systems.