diff options
author | Martin Matuska <mm@FreeBSD.org> | 2021-06-08 14:48:37 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2021-06-08 14:52:44 +0000 |
commit | 1603881667360c015f6685131f2f25474fa67a72 (patch) | |
tree | 1e2793b4b19eabab1534c3dd2074e3ca022c5e76 /sys/contrib/openzfs/module/icp | |
parent | ed9215c8e05f06c00683bb0624e82644796d4385 (diff) | |
parent | 75b4cbf62590c23fac3667537961a2a75fdc2cc3 (diff) | |
download | src-1603881667360c015f6685131f2f25474fa67a72.tar.gz src-1603881667360c015f6685131f2f25474fa67a72.zip |
zfs: merge openzfs/zfs@75b4cbf62 (master) into main
Notable upstream pull request merges:
#11710 Allow zfs to send replication streams with missing snapshots
#11751 Avoid taking global lock to destroy zfsdev state
#11786 Ratelimit deadman zevents as with delay zevents
#11803 ZFS traverse_visitbp optimization to limit prefetch
#11813 Allow pool names that look like Solaris disk names
#11822 Atomically check and set dropped zevent count
#11822 Don't scale zfs_zevent_len_max by CPU count
#11833 Refactor zfsdev state init/destroy to share common code
#11837 zfs get -p only outputs 3 columns if "clones" property is empty
#11843 libzutil: zfs_isnumber(): return false if input empty
#11849 Use dsl_scan_setup_check() to setup a scrub
#11861 Improvements to the 'compatibility' property
#11862 cmd/zfs receive: allow dry-run (-n) to check property args
#11864 receive: don't fail inheriting (-x) properties on wrong dataset type
#11877 Combine zio caches if possible
#11881 FreeBSD: use vnlru_free_vfsops if available
#11883 FreeBSD: add support for lockless symlink lookup
#11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr
#11896 Fix crash in zio_done error reporting
#11905 zfs-send(8): Restore sorting of flags
#11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir
#11930 vdev_mirror: don't scrub/resilver devices that can't be read
#11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines
#11955 zfs get: don't lookup mount options when using "-s local"
#11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl
#11959 vdev_id: variable not getting expanded under map_slot()
#11966 Scale worker threads and taskqs with number of CPUs
#11994 Clean up use of zfs_log_create in zfs_dir
#11997 FreeBSD: Don't force xattr mount option
#11997 FreeBSD: Implement xattr=sa
#11997 FreeBSD: Use SET_ERROR to trace xattr name errors
#11998 Simplify/fix dnode_move() for dn_zfetch
#12003 FreeBSD: Initialize/destroy zp->z_lock
#12010 Fix dRAID self-healing short columns
#12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots"
#12040 Reinstate the old zpool read label logic as a fallback
#12046 Improve scrub maxinflight_bytes math
#12049 FreeBSD: avoid memory allocation in arc_prune_async
#12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI
#12061 Fix dRAID sequential resilver silent damage handling
#12072 Let zfs diff be more permissive
#12077 FreeBSD: Retry OCF ENOMEM errors.
#12088 Propagate vdev state due to invalid label corruption
#12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat
#12097 FreeBSD: Update dataset_kstats for zvols in dev mode
#12104 FreeBSD boot code reminder after zpool upgrade
#12114 Introduce write-mostly sums
Obtained from: OpenZFS
OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3
Diffstat (limited to 'sys/contrib/openzfs/module/icp')
6 files changed, 81 insertions, 8 deletions
diff --git a/sys/contrib/openzfs/module/icp/Makefile.in b/sys/contrib/openzfs/module/icp/Makefile.in index 7a01b2f08b8e..858c5a610c26 100644 --- a/sys/contrib/openzfs/module/icp/Makefile.in +++ b/sys/contrib/openzfs/module/icp/Makefile.in @@ -45,7 +45,6 @@ $(MODULE)-objs += algs/aes/aes_modes.o $(MODULE)-objs += algs/edonr/edonr.o $(MODULE)-objs += algs/sha1/sha1.o $(MODULE)-objs += algs/sha2/sha2.o -$(MODULE)-objs += algs/sha1/sha1.o $(MODULE)-objs += algs/skein/skein.o $(MODULE)-objs += algs/skein/skein_block.o $(MODULE)-objs += algs/skein/skein_iv.o @@ -70,6 +69,12 @@ $(MODULE)-$(CONFIG_X86) += algs/aes/aes_impl_x86-64.o # utility tries to interpret them as opcodes and obviously fails doing so. OBJECT_FILES_NON_STANDARD_aesni-gcm-x86_64.o := y OBJECT_FILES_NON_STANDARD_ghash-x86_64.o := y +# Suppress objtool "unsupported stack pointer realignment" warnings. We are +# not using a DRAP register while aligning the stack to a 64 byte boundary. +# See #6950 for the reasoning. +OBJECT_FILES_NON_STANDARD_sha1-x86_64.o := y +OBJECT_FILES_NON_STANDARD_sha256_impl.o := y +OBJECT_FILES_NON_STANDARD_sha512_impl.o := y ICP_DIRS = \ api \ diff --git a/sys/contrib/openzfs/module/icp/algs/edonr/edonr.c b/sys/contrib/openzfs/module/icp/algs/edonr/edonr.c index 7c677095f1ef..ee96e692ef00 100644 --- a/sys/contrib/openzfs/module/icp/algs/edonr/edonr.c +++ b/sys/contrib/openzfs/module/icp/algs/edonr/edonr.c @@ -337,7 +337,7 @@ Q256(size_t bitlen, const uint32_t *data, uint32_t *restrict p) * * Checksum functions like this one can go over the stack frame size check * Linux imposes on 32-bit platforms (-Wframe-larger-than=1024). We can - * safely ignore the compiler error since we know that in ZoL, that + * safely ignore the compiler error since we know that in OpenZFS, that * the function will be called from a worker thread that won't be using * much stack. The only function that goes over the 1k limit is Q512(), * which only goes over it by a hair (1248 bytes on ARM32). diff --git a/sys/contrib/openzfs/module/icp/algs/modes/gcm.c b/sys/contrib/openzfs/module/icp/algs/modes/gcm.c index 23686c59e8ce..7332834cbe37 100644 --- a/sys/contrib/openzfs/module/icp/algs/modes/gcm.c +++ b/sys/contrib/openzfs/module/icp/algs/modes/gcm.c @@ -1399,7 +1399,7 @@ gcm_decrypt_final_avx(gcm_ctx_t *ctx, crypto_data_t *out, size_t block_size) } datap += done; } - /* Decrypt remainder, which is less then chunk size, in one go. */ + /* Decrypt remainder, which is less than chunk size, in one go. */ kfpu_begin(); if (bleft >= GCM_AVX_MIN_DECRYPT_BYTES) { done = aesni_gcm_decrypt(datap, datap, bleft, @@ -1415,7 +1415,7 @@ gcm_decrypt_final_avx(gcm_ctx_t *ctx, crypto_data_t *out, size_t block_size) ASSERT(bleft < GCM_AVX_MIN_DECRYPT_BYTES); /* - * Now less then GCM_AVX_MIN_DECRYPT_BYTES bytes remain, + * Now less than GCM_AVX_MIN_DECRYPT_BYTES bytes remain, * decrypt them block by block. */ while (bleft > 0) { diff --git a/sys/contrib/openzfs/module/icp/asm-x86_64/sha1/sha1-x86_64.S b/sys/contrib/openzfs/module/icp/asm-x86_64/sha1/sha1-x86_64.S index cb923784a730..fc844cd8c74f 100644 --- a/sys/contrib/openzfs/module/icp/asm-x86_64/sha1/sha1-x86_64.S +++ b/sys/contrib/openzfs/module/icp/asm-x86_64/sha1/sha1-x86_64.S @@ -69,16 +69,27 @@ sha1_block_data_order(SHA1_CTX *ctx, const void *inpp, size_t blocks) #define _ASM #include <sys/asm_linkage.h> ENTRY_NP(sha1_block_data_order) +.cfi_startproc + mov %rsp,%rax +.cfi_def_cfa_register %rax push %rbx +.cfi_offset %rbx,-16 push %rbp +.cfi_offset %rbp,-24 push %r12 - mov %rsp,%rax +.cfi_offset %r12,-32 mov %rdi,%r8 # reassigned argument +.cfi_register %rdi, %r8 sub $72,%rsp mov %rsi,%r9 # reassigned argument +.cfi_register %rsi, %r9 and $-64,%rsp mov %rdx,%r10 # reassigned argument +.cfi_register %rdx, %r10 mov %rax,64(%rsp) +# echo ".cfi_cfa_expression %rsp+64,deref,+8" | +# openssl/crypto/perlasm/x86_64-xlate.pl +.cfi_escape 0x0f,0x06,0x77,0xc0,0x00,0x06,0x23,0x08 mov 0(%r8),%edx mov 4(%r8),%esi @@ -1337,10 +1348,15 @@ ENTRY_NP(sha1_block_data_order) sub $1,%r10 jnz .Lloop mov 64(%rsp),%rsp - pop %r12 - pop %rbp - pop %rbx +.cfi_def_cfa %rsp,8 + movq -24(%rsp),%r12 +.cfi_restore %r12 + movq -16(%rsp),%rbp +.cfi_restore %rbp + movq -8(%rsp),%rbx +.cfi_restore %rbx ret +.cfi_endproc SET_SIZE(sha1_block_data_order) .data diff --git a/sys/contrib/openzfs/module/icp/asm-x86_64/sha2/sha256_impl.S b/sys/contrib/openzfs/module/icp/asm-x86_64/sha2/sha256_impl.S index 766b75355f0b..28b048d2db24 100644 --- a/sys/contrib/openzfs/module/icp/asm-x86_64/sha2/sha256_impl.S +++ b/sys/contrib/openzfs/module/icp/asm-x86_64/sha2/sha256_impl.S @@ -83,12 +83,21 @@ SHA256TransformBlocks(SHA2_CTX *ctx, const void *in, size_t num) #include <sys/asm_linkage.h> ENTRY_NP(SHA256TransformBlocks) +.cfi_startproc + movq %rsp, %rax +.cfi_def_cfa_register %rax push %rbx +.cfi_offset %rbx,-16 push %rbp +.cfi_offset %rbp,-24 push %r12 +.cfi_offset %r12,-32 push %r13 +.cfi_offset %r13,-40 push %r14 +.cfi_offset %r14,-48 push %r15 +.cfi_offset %r15,-56 mov %rsp,%rbp # copy %rsp shl $4,%rdx # num*16 sub $16*4+4*8,%rsp @@ -99,6 +108,9 @@ ENTRY_NP(SHA256TransformBlocks) mov %rsi,16*4+1*8(%rsp) # save inp, 2nd arg mov %rdx,16*4+2*8(%rsp) # save end pointer, "3rd" arg mov %rbp,16*4+3*8(%rsp) # save copy of %rsp +# echo ".cfi_cfa_expression %rsp+88,deref,+56" | +# openssl/crypto/perlasm/x86_64-xlate.pl +.cfi_escape 0x0f,0x06,0x77,0xd8,0x00,0x06,0x23,0x38 #.picmeup %rbp # The .picmeup pseudo-directive, from perlasm/x86_64_xlate.pl, puts @@ -2026,14 +2038,28 @@ ENTRY_NP(SHA256TransformBlocks) jb .Lloop mov 16*4+3*8(%rsp),%rsp +.cfi_def_cfa %rsp,56 pop %r15 +.cfi_adjust_cfa_offset -8 +.cfi_restore %r15 pop %r14 +.cfi_adjust_cfa_offset -8 +.cfi_restore %r14 pop %r13 +.cfi_adjust_cfa_offset -8 +.cfi_restore %r13 pop %r12 +.cfi_adjust_cfa_offset -8 +.cfi_restore %r12 pop %rbp +.cfi_adjust_cfa_offset -8 +.cfi_restore %rbp pop %rbx +.cfi_adjust_cfa_offset -8 +.cfi_restore %rbx ret +.cfi_endproc SET_SIZE(SHA256TransformBlocks) .data diff --git a/sys/contrib/openzfs/module/icp/asm-x86_64/sha2/sha512_impl.S b/sys/contrib/openzfs/module/icp/asm-x86_64/sha2/sha512_impl.S index 6e37618761b2..746c85a98566 100644 --- a/sys/contrib/openzfs/module/icp/asm-x86_64/sha2/sha512_impl.S +++ b/sys/contrib/openzfs/module/icp/asm-x86_64/sha2/sha512_impl.S @@ -84,12 +84,21 @@ SHA512TransformBlocks(SHA2_CTX *ctx, const void *in, size_t num) #include <sys/asm_linkage.h> ENTRY_NP(SHA512TransformBlocks) +.cfi_startproc + movq %rsp, %rax +.cfi_def_cfa_register %rax push %rbx +.cfi_offset %rbx,-16 push %rbp +.cfi_offset %rbp,-24 push %r12 +.cfi_offset %r12,-32 push %r13 +.cfi_offset %r13,-40 push %r14 +.cfi_offset %r14,-48 push %r15 +.cfi_offset %r15,-56 mov %rsp,%rbp # copy %rsp shl $4,%rdx # num*16 sub $16*8+4*8,%rsp @@ -100,6 +109,9 @@ ENTRY_NP(SHA512TransformBlocks) mov %rsi,16*8+1*8(%rsp) # save inp, 2nd arg mov %rdx,16*8+2*8(%rsp) # save end pointer, "3rd" arg mov %rbp,16*8+3*8(%rsp) # save copy of %rsp +# echo ".cfi_cfa_expression %rsp+152,deref,+56" | +# openssl/crypto/perlasm/x86_64-xlate.pl +.cfi_escape 0x0f,0x06,0x77,0x98,0x01,0x06,0x23,0x38 #.picmeup %rbp # The .picmeup pseudo-directive, from perlasm/x86_64_xlate.pl, puts @@ -2027,14 +2039,28 @@ ENTRY_NP(SHA512TransformBlocks) jb .Lloop mov 16*8+3*8(%rsp),%rsp +.cfi_def_cfa %rsp,56 pop %r15 +.cfi_adjust_cfa_offset -8 +.cfi_restore %r15 pop %r14 +.cfi_adjust_cfa_offset -8 +.cfi_restore %r14 pop %r13 +.cfi_adjust_cfa_offset -8 +.cfi_restore %r13 pop %r12 +.cfi_adjust_cfa_offset -8 +.cfi_restore %r12 pop %rbp +.cfi_adjust_cfa_offset -8 +.cfi_restore %rbp pop %rbx +.cfi_adjust_cfa_offset -8 +.cfi_restore %rbx ret +.cfi_endproc SET_SIZE(SHA512TransformBlocks) .data |