-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge zfs-2.1.6 #98
Merge zfs-2.1.6 #98
Commits on Sep 13, 2022
-
Fix use-after-free in btree code
Coverty static analysis found these. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Neal Gompa <ngompa@datto.com> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes openzfs#10989 Closes openzfs#13861
Configuration menu - View commit details
-
Copy full SHA for 8131a96 - Browse repository at this point
Copy the full SHA 8131a96View commit details
Commits on Sep 14, 2022
-
rpm: Use the correct version-release information in dependencies
This tightly links the subpackages together and ensures that everything is upgraded together. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Neal Gompa <ngompa@datto.com> Closes openzfs#13489
Configuration menu - View commit details
-
Copy full SHA for e1b49e3 - Browse repository at this point
Copy the full SHA e1b49e3View commit details -
rpm: Silence "unversioned Obsoletes" warnings on EL 9
Get rid of RPM warnings on AlmaLinux 9: "It's not recommended to have unversioned Obsoletes" Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#13584 Closes openzfs#13638
Configuration menu - View commit details
-
Copy full SHA for f48d9b4 - Browse repository at this point
Copy the full SHA f48d9b4View commit details -
zed: Ignore false 'atari' partitions in autoreplace
libudev will sometimes falsely identify an 'atari' partition on a blank disk, preventing it from being used in an autoreplace. This seems to be a known issue. The workaround is to just ignore the fake partition and continue with the autoreplace. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#13497 Closes openzfs#13632
Configuration menu - View commit details
-
Copy full SHA for acd7464 - Browse repository at this point
Copy the full SHA acd7464View commit details -
zed: Look for NVMe DEVPATH if no ID_BUS
We tried replacing an NVMe drive using autoreplace, only to see zed reject it with: zed[27955]: zed_udev_monitor: /dev/nvme5n1 no devid source This happened because ZED saw that ID_BUS was not set by udev for the NVMe drive, and thus didn't think it was "real drive". This commit allows NVMe drives to be autoreplaced even if ID_BUS is not set. Reviewed-by: Don Brady <don.brady@intel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#13512 Closes openzfs#13646
Configuration menu - View commit details
-
Copy full SHA for 65f8f92 - Browse repository at this point
Copy the full SHA 65f8f92View commit details -
`zpool_expand_001_pos` was often failing due to not seeing autoexpand commands in the `zpool history`. During testing, I found this to be unreliable (sometimes the "online" wouldn't appear in `zpool history`) and unnecessary, as we could simply check that the pool increased in size. This commit revamps the test to check for the expanded pool size and corresponding new free space. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#13743
Configuration menu - View commit details
-
Copy full SHA for b1be0a5 - Browse repository at this point
Copy the full SHA b1be0a5View commit details -
Importing from cachefile can trip assertion
When importing from cachefile, it is possible that the builtin retry logic will trip an assertion because it also fails to find the pool. This fix addresses that case and returns the correct error message to the user. Reviewed-by: Richard Yao <ryao@gentoo.org> Reviewed-by: Serapheim Dimitropoulos <serapheim@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: George Wilson <gwilson@delphix.com> Closes openzfs#13781
Configuration menu - View commit details
-
Copy full SHA for 15b64fb - Browse repository at this point
Copy the full SHA 15b64fbView commit details -
Apply arc_shrink_shift to ARC above arc_c_min
It makes sense to free memory in smaller chunks when approaching arc_c_min to let other kernel subsystems to free more, since after that point we can't free anything. This also matches behavior on Linux, where to shrinker reported only the size above arc_c_min. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Allan Jude <allan@klarasystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Closes openzfs#13794
Configuration menu - View commit details
-
Copy full SHA for b6ebf27 - Browse repository at this point
Copy the full SHA b6ebf27View commit details -
FreeBSD: Mark ZFS_MODULE_PARAM_CALL as MPSAFE
ZFS_MODULE_PARAM_CALL handlers implement their own locking if needed and do not require Giant. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes openzfs#13756
Configuration menu - View commit details
-
Copy full SHA for 78206a2 - Browse repository at this point
Copy the full SHA 78206a2View commit details -
Fix column width in 'zpool iostat -v' and 'zpool list -v'
This commit fixes a minor spacing issue caused when enumerating vdev names, which originated from openzfs#13031 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Akash B <akash-b@hpe.com> Signed-off-by: Samuel Wycliffe <samuelwycliffe@gmail.com> Closes openzfs#13811
Configuration menu - View commit details
-
Copy full SHA for aa9e887 - Browse repository at this point
Copy the full SHA aa9e887View commit details -
Add xattr_handler support for Android kernels
Some ARM BSPs run the Android kernel, which has a modified xattr_handler->get() function signature. This adds support to compile against these kernels. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Walter Huf <hufman@gmail.com> Closes openzfs#13824
Configuration menu - View commit details
-
Copy full SHA for 2010c18 - Browse repository at this point
Copy the full SHA 2010c18View commit details -
zed: Fix config_sync autoexpand flood
Users were seeing floods of `config_sync` events when autoexpand was enabled. This happened because all "disk status change" udev events invoke the autoexpand codepath, which calls zpool_relabel_disk(), which in turn cause another "disk status change" event to happen, in a feedback loop. Note that "disk status change" happens every time a user calls close() on a block device. This commit breaks the feedback loop by only allowing an autoexpand to happen if the disk actually changed size. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes: openzfs#7132 Closes: openzfs#7366 Closes openzfs#13729
Configuration menu - View commit details
-
Copy full SHA for 7bbfac9 - Browse repository at this point
Copy the full SHA 7bbfac9View commit details -
config: check for parallel(1), use it for cstyle
Before: $ time make cstyle real 0m23.118s user 0m23.002s sys 0m0.114s After: $ time make cstyle real 0m4.577s user 0m31.487s sys 0m0.699s Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Issue openzfs#12899
Configuration menu - View commit details
-
Copy full SHA for c8f795b - Browse repository at this point
Copy the full SHA c8f795bView commit details -
Introduce a tunable to exclude special class buffers from L2ARC
Special allocation class or dedup vdevs may have roughly the same performance as L2ARC vdevs. Introduce a new tunable to exclude those buffers from being cacheable on L2ARC. Reviewed-by: Don Brady <don.brady@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: George Amanakis <gamanakis@gmail.com> Closes openzfs#11761 Closes openzfs#12285
Configuration menu - View commit details
-
Copy full SHA for 8bd3dca - Browse repository at this point
Copy the full SHA 8bd3dcaView commit details
Commits on Sep 15, 2022
-
Add physical device size to SIZE column in 'zpool list -v'
Add physical device size/capacity only for physical devices in 'zpool list -v' instead of displaying "-" in the SIZE column. This would make it easier to see the individual device capacity and to determine which spares are large enough to replace which devices. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Dipak Ghosh <dipak.ghosh@hpe.com> Signed-off-by: Akash B <akash-b@hpe.com> Closes openzfs#12561 Closes openzfs#13106
Configuration menu - View commit details
-
Copy full SHA for 03fa3ef - Browse repository at this point
Copy the full SHA 03fa3efView commit details -
vdev_draid_lookup_map() should not iterate outside draid_maps
Coverity reported this as an out-of-bounds read. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Neal Gompa <ngompa@datto.com> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes openzfs#13865
Configuration menu - View commit details
-
Copy full SHA for 3f7c174 - Browse repository at this point
Copy the full SHA 3f7c174View commit details -
make DMU_OT_IS_METADATA and DMU_OT_IS_ENCRYPTED return B_TRUE or B_FALSE
Without this patch, the ASSERT3U(dbuf_is_metadata(db), ==, arc_is_metadata(buf)); at the beginning of dbuf_assign_arcbuf can panic if the object type is a DMU_OT_NEWTYPE that has DMU_OT_METADATA set. While we're at it, fix DMU_OT_IS_ENCRYPTED as well. Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Christian Schwarz <christian.schwarz@nutanix.com> Closes openzfs#13842
Configuration menu - View commit details
-
Copy full SHA for cde04ba - Browse repository at this point
Copy the full SHA cde04baView commit details
Commits on Sep 19, 2022
-
zfs recv hangs if max recordsize is less than received recordsize
- Some optimizations for bqueue enqueue/dequeue. - Added a fix to prevent deadlock when both bqueue_enqueue_impl() and bqueue_dequeue() waits for signal to be triggered. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ameer Hamza <ahamza@ixsystems.com> Closes openzfs#13855
Configuration menu - View commit details
-
Copy full SHA for a5b0d42 - Browse repository at this point
Copy the full SHA a5b0d42View commit details
Commits on Sep 21, 2022
-
include: move SPA_MINBLOCKSHIFT and zio_encrypt to sys/fs/zfs.h
These are used by userspace, so should live in a public header Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#12116
Configuration menu - View commit details
-
Copy full SHA for faa1e40 - Browse repository at this point
Copy the full SHA faa1e40View commit details -
zfs recv hangs if max recordsize is less than received recordsize
- Some optimizations for bqueue enqueue/dequeue. - Added a fix to prevent deadlock when both bqueue_enqueue_impl() and bqueue_dequeue() waits for signal to be triggered. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ameer Hamza <ahamza@ixsystems.com> Closes openzfs#13855
Configuration menu - View commit details
-
Copy full SHA for d5105f0 - Browse repository at this point
Copy the full SHA d5105f0View commit details -
Delay ZFS_PROP_SHARESMB property to handle it for encrypted raw receive
For encrypted raw receive, objset creation is delayed until a call to dmu_recv_stream(). ZFS_PROP_SHARESMB property requires objset to be populated when calling zpl_earlier_version(). To correctly handle the ZFS_PROP_SHARESMB property for encrypted raw receive, this change delays setting the property. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ameer Hamza <ahamza@ixsystems.com> Closes openzfs#13878
Configuration menu - View commit details
-
Copy full SHA for 035e52f - Browse repository at this point
Copy the full SHA 035e52fView commit details -
Fix incorrect size given to bqueue_enqueue() call in dmu_redact.c
We pass sizeof (struct redact_record *) rather than sizeof (struct redact_record). Passing the pointer size is wrong. Coverity caught this in two places. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes openzfs#13885
Configuration menu - View commit details
-
Copy full SHA for 5096ed3 - Browse repository at this point
Copy the full SHA 5096ed3View commit details -
Add zfs_btree_verify_intensity kernel module parameter
I see a few issues in the issue tracker that might be aided by being able to turn this on. We have no module parameter for it, so I would like to add one. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes openzfs#13874
Configuration menu - View commit details
-
Copy full SHA for b66f8d3 - Browse repository at this point
Copy the full SHA b66f8d3View commit details -
Revert "Reduce dbuf_find() lock contention"
This reverts commit 34dbc61. While this change resolved the lock contention observed for certain workloads, it inadventantly reduced the maximum hash inserts/removes per second. This appears to be due to the slightly higher acquisition cost of a rwlock vs a mutex. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Configuration menu - View commit details
-
Copy full SHA for 91e0215 - Browse repository at this point
Copy the full SHA 91e0215View commit details -
Optimize txg_kick() process (openzfs#12274)
Use dp_dirty_pertxg[] for txg_kick(), instead of dp_dirty_total in original code. Extra parameter "txg" is added for txg_kick(), thus it knows which txg to kick. Also txg_kick() call is moved from dsl_pool_need_dirty_delay() to dsl_pool_dirty_space() so that we can know the txg number assigned for txg_kick(). Some unnecessary code regarding dp_dirty_total in txg_sync_thread() is also cleaned up. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: jxdking <lostking2008@hotmail.com> Closes openzfs#12274
Configuration menu - View commit details
-
Copy full SHA for 999830a - Browse repository at this point
Copy the full SHA 999830aView commit details -
Add Module Parameter Regarding Log Size Limit
zfs_wrlog_data_max The upper limit of TX_WRITE log data. Once it is reached, write operation is blocked, until log data is cleared out after txg sync. It only counts TX_WRITE log with WR_COPIED or WR_NEED_COPY. Reviewed-by: Prakash Surya <prakash.surya@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: jxdking <lostking2008@hotmail.com> Closes openzfs#12284
Configuration menu - View commit details
-
Copy full SHA for d05f303 - Browse repository at this point
Copy the full SHA d05f303View commit details -
Ask libtool to stop hiding some errors
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
Configuration menu - View commit details
-
Copy full SHA for ebbbe01 - Browse repository at this point
Copy the full SHA ebbbe01View commit details -
Improve too large physical ashift handling
When iterating through children physical ashifts for vdev, prefer ones above the maximum logical ashift, that we can actually use, but within the administrator defined maximum. When selecting top-level vdev ashift, do not set it to the defined maximum in case physical ashift is even higher, but just ignore one. Using the maximum does not prevent misaligned writes, but reduces space efficiency. Since ZFS tries to write data sequentially and aggregates the writes, in many cases large misanigned writes may be not as bad as the space penalty otherwise. Allow internal physical ashifts for vdevs higher than SHIFT_MAX. May be one day allocator or aggregation could benefit from that. Reduce zfs_vdev_max_auto_ashift default from 16 (64KB) to 14 (16KB), so that ZFS may still use bigger ashifts up to SHIFT_MAX (64KB), but only if it really has to or explicitly told to, but not as an "optimization". There are some read-intensive NVMe SSDs that report Preferred Write Alignment of 64KB, and attempt to build RAIDZ2 of those leads to a space inefficiency that can't be justified. Instead these changes make ZFS fall back to logical ashift of 12 (4KB) by default and only warn user that it may be suboptimal for performance. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes openzfs#13798
Configuration menu - View commit details
-
Copy full SHA for 44cec45 - Browse repository at this point
Copy the full SHA 44cec45View commit details
Commits on Sep 26, 2022
-
Original Log Size Limit implementation blocked all writes in case of limit reached until the TXG is committed and the log is freed. It caused huge delays and following speed spikes in application writes. This implementation instead smoothly throttles writes, using exactly the same mechanism as used for dirty data. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: jxdking <lostking2008@hotmail.com> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored-By: iXsystems, Inc. Issue openzfs#12284 Closes openzfs#13476
Configuration menu - View commit details
-
Copy full SHA for 33223cb - Browse repository at this point
Copy the full SHA 33223cbView commit details
Commits on Sep 27, 2022
-
Linux: Fix uninitialized variable usage in zio_do_crypt_data()
Coverity complained about this. An error from `hkdf_sha512()` before uio initialization will cause pointers to uninitialized memory to be passed to `zio_crypt_destroy_uio()`. This is a regression that was introduced by cf63739. Interestingly, this never affected FreeBSD, since the FreeBSD version never had that patch ported. Since moving uio initialization to the top of this function would slow down the qat_crypt() path, we only move the `memset()` calls to the top of the function. This is sufficient to fix this problem. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Neal Gompa <ngompa@datto.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes openzfs#13944
Configuration menu - View commit details
-
Copy full SHA for 835e036 - Browse repository at this point
Copy the full SHA 835e036View commit details -
Apply the fix from upstream. http://www.lua.org/bugs.html#5.2.2-1 https://www.opencve.io/cve/CVE-2014-5461 It should be noted that exploiting this requires the `SYS_CONFIG` privilege, and anyone with that privilege likely has other opportunities to do exploits, so it is unlikely that bad actors could exploit this unless system administrators are executing untrusted ZFS Channel Programs. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes openzfs#13949
Configuration menu - View commit details
-
Copy full SHA for c973929 - Browse repository at this point
Copy the full SHA c973929View commit details
Commits on Sep 28, 2022
-
FreeBSD: Ignore symlink to i386 includes
A symlink to i386 includes is created in the build dir on amd64 since freebsd/freebsd-src@d07600c Tell git to ignore it like the other include links. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes openzfs#13719
Configuration menu - View commit details
-
Copy full SHA for 8dcd6af - Browse repository at this point
Copy the full SHA 8dcd6afView commit details -
FreeBSD: Fix integer conversion for vnlru_free{,_vfsops}()
When reviewing openzfs#13875, I noticed that our FreeBSD code has an issue where it converts from `int64_t` to `int` when calling `vnlru_free{,_vfsops}()`. The result is that if the int64_t is `1 << 36`, the int will be 0, since the low bits are 0. Even when some low bits are set, a value such as `((1 << 36) + 1)` would truncate to 1, which is wrong. There is protection against this on 32-bit platforms, but on 64-bit platforms, there is no check to protect us, so we add a check. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes openzfs#13882
Configuration menu - View commit details
-
Copy full SHA for 55816c6 - Browse repository at this point
Copy the full SHA 55816c6View commit details -
FreeBSD: stop passing LK_INTERLOCK to VOP_LOCK
There is an ongoing effort to eliminate this feature. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Closes openzfs#13908
Configuration menu - View commit details
-
Copy full SHA for 2c8e3e4 - Browse repository at this point
Copy the full SHA 2c8e3e4View commit details -
Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Closes openzfs#13909
Configuration menu - View commit details
-
Copy full SHA for eec942c - Browse repository at this point
Copy the full SHA eec942cView commit details -
See https://cgit.FreeBSD.org/src/commit/?id=a75d1ddd74312f5dd79bc1e965f7077679659f2e Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Closes openzfs#13910
Configuration menu - View commit details
-
Copy full SHA for 63d4838 - Browse repository at this point
Copy the full SHA 63d4838View commit details -
zpool: Don't print "repairing" on force faulted drives
If you force fault a drive that's resilvering, it's scan stats can get frozen in time, giving the false impression that it's being resilvered. This commit checks the vdev state to see if the vdev is healthy before reporting "resilvering" or "repairing" in zpool status. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#13927 Closes openzfs#13930
Configuration menu - View commit details
-
Copy full SHA for a2705b1 - Browse repository at this point
Copy the full SHA a2705b1View commit details
Commits on Sep 29, 2022
-
Clang's static analyzer found a bad free caused by skein_mac_atomic(). It will allocate a context on the stack and then pass it to skein_final(), which attempts to free it. Upon inspection, skein_digest_atomic() also has the same problem. These functions were created to match the OpenSolaris ICP API, so I was curious how we avoided this in other providers and looked at the SHA2 code. It appears that SHA2 has a SHA2Final() helper function that is called by the exported sha2_mac_final()/sha2_digest_final() as well as the sha2_mac_atomic() and sha2_digest_atomic() functions. The real work is done in SHA2Final() while some checks and the free are done in sha2_mac_final()/sha2_digest_final(). We fix the use after free in the skein code by taking inspiration from the SHA2 code. We introduce a skein_final_nofree() that does most of the work, and make skein_final() into a function that calls it and then frees the memory. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes openzfs#13954
Configuration menu - View commit details
-
Copy full SHA for 566e908 - Browse repository at this point
Copy the full SHA 566e908View commit details -
META file and changelog updated. Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Configuration menu - View commit details
-
Copy full SHA for 6a6bd49 - Browse repository at this point
Copy the full SHA 6a6bd49View commit details
Commits on Oct 11, 2022
-
ZFS Version 2.1.6 Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Ryan Moeller authored and Ryan Moeller committedOct 11, 2022 Configuration menu - View commit details
-
Copy full SHA for 4ee7ed5 - Browse repository at this point
Copy the full SHA 4ee7ed5View commit details -
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Ryan Moeller authored and Ryan Moeller committedOct 11, 2022 Configuration menu - View commit details
-
Copy full SHA for 2a383a9 - Browse repository at this point
Copy the full SHA 2a383a9View commit details -
FreeBSD: Fix a pair of bugs in zfs_fhtovp()
- Add a zfs_exit() call in an error path, otherwise a lock is leaked. - Remove the fid_gen > 1 check. That appears to be Linux-specific: zfsctl_snapdir_fid() sets fid_gen to 0 or 1 depending on whether the snapshot directory is mounted. On FreeBSD it fails, making snapshot dirs inaccessible via NFS. Fixes: 43dbf88 ("FreeBSD: vfsops: use setgen for error case") Signed-off-by: Mark Johnston <markj@FreeBSD.org> (cherry picked from commit ffea814)
Configuration menu - View commit details
-
Copy full SHA for f81b9b9 - Browse repository at this point
Copy the full SHA f81b9b9View commit details