| 3166bb7c | 30-Nov-2023 |
Mark Johnston <[email protected]> |
ossl: Add AES-GCM support for NEON-enabled armv7
This provides substantially higher throughput than the fallback implementation.
Reviewed by: jhb MFC after: 3 months Sponsored by: Klara, Inc. Spons
ossl: Add AES-GCM support for NEON-enabled armv7
This provides substantially higher throughput than the fallback implementation.
Reviewed by: jhb MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D41305
(cherry picked from commit 629a72376d51aad812d6f1279403bc81c38c35d2)
show more ...
|
| 13d39efe | 28-Aug-2023 |
John Baldwin <[email protected]> |
blake2: Remove dieing flag and rw lock
crypto_unregister_all already disables new sessions and waits for existing sessions to be destroyed before returning.
Reviewed by: markj Differential Revision
blake2: Remove dieing flag and rw lock
crypto_unregister_all already disables new sessions and waits for existing sessions to be destroyed before returning.
Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41581
(cherry picked from commit 79aeecc89f5c740f2a3b0c30238233d2a6bb7ec7)
show more ...
|
| f7e5bdbc | 31-Aug-2023 |
Zachary Leaf <[email protected]> |
armv8_crypto: fix recursive fpu_kern_enter call
Now armv8_crypto is using FPU_KERN_NOCTX, this results in a kernel panic in armv8_crypto.c:armv8_crypto_cipher_setup:
panic: recursive fpu_kern_e
armv8_crypto: fix recursive fpu_kern_enter call
Now armv8_crypto is using FPU_KERN_NOCTX, this results in a kernel panic in armv8_crypto.c:armv8_crypto_cipher_setup:
panic: recursive fpu_kern_enter while in PCB_FP_NOSAVE state
This is because in armv8_crypto.c:armv8_crypto_cipher_process, directly after calling fpu_kern_enter() a call is made to armv8_crypto_cipher_setup(), resulting in nested calls to fpu_kern_enter() without the required fpu_kern_leave() in between.
Move fpu_kern_enter() in armv8_crypto_cipher_process() after the call to armv8_crypto_cipher_setup() to resolve this.
Reviewed by: markj, andrew Fixes: 6485286f536f ("armv8_crypto: Switch to using FPU_KERN_NOCTX") Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41671
(cherry picked from commit 565c887a775284bfb1a15eadee2c3f312d288c01)
show more ...
|
| 7945b99a | 28-Aug-2023 |
John Baldwin <[email protected]> |
armv8_crypto: Remove dieing flag and rw lock
crypto_unregister_all already disables new sessions and waits for existing sessions to be destroyed before returning.
Reviewed by: markj Differential Re
armv8_crypto: Remove dieing flag and rw lock
crypto_unregister_all already disables new sessions and waits for existing sessions to be destroyed before returning.
Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41579
(cherry picked from commit fdd51760c278302773edbd2466d35b35b865f5d9)
show more ...
|
| 27666649 | 29-Aug-2023 |
Mark Johnston <[email protected]> |
aesni: Push FPU sections down further
After commit 937b4473be21 aesni_cipher_crypt() and aesni_cipher_mac() execute in a FPU_KERN_NOCTX section, which means that they must run with preemption disabl
aesni: Push FPU sections down further
After commit 937b4473be21 aesni_cipher_crypt() and aesni_cipher_mac() execute in a FPU_KERN_NOCTX section, which means that they must run with preemption disabled. These functions handle discontiguous I/O buffers by allocating a contiguous buffer and copying as necessary, but this allocation cannot happen with preemption disabled. Fix the problem by pushing the FPU section down into aesni_cipher_crypt() and aesni_cipher_mac(). In particular, encrypt-then-auth transforms need not be handled with a single FPU section.
Reported by: [email protected] Discussed with: jhb Fixes: 937b4473be21 ("aesni: Switch to using FPU_KERN_NOCTX.")
(cherry picked from commit 6b635c74fd4135eaae68970bfc5aad9ae905fec7)
show more ...
|
| 118b866d | 29-Nov-2023 |
Mark Johnston <[email protected]> |
ossl: Fix some bugs in the fallback AES-GCM implementation
gcm_*_aesni() are used when the AVX512 implementation is not available. Fix two bugs which manifest when handling operations spanning multi
ossl: Fix some bugs in the fallback AES-GCM implementation
gcm_*_aesni() are used when the AVX512 implementation is not available. Fix two bugs which manifest when handling operations spanning multiple segments: - Avoid underflow when the length of the input is smaller than the residual. - In gcm_decrypt_aesni(), ensure that we begin the operation at the right offset into the input and output buffers.
Reviewed by: jhb Fixes: 9b1d87286c78 ("ossl: Add a fallback AES-GCM implementation using AES-NI") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42838
(cherry picked from commit 47d767dab54895f3ba8abac6ab2295797394659e)
show more ...
|
| 84ef0a84 | 29-Nov-2023 |
Mark Johnston <[email protected]> |
ossl: Keep mutable AES-GCM state on the stack
ossl(4)'s AES-GCM implementation keeps mutable state in the session structure, together with the key schedule. This was done for convenience, as both a
ossl: Keep mutable AES-GCM state on the stack
ossl(4)'s AES-GCM implementation keeps mutable state in the session structure, together with the key schedule. This was done for convenience, as both are initialized together. However, some OCF consumers, particularly ZFS, assume that requests may be dispatched to the same session in parallel. Without serialization, this results in incorrect output.
Fix the problem by explicitly copying per-session state onto the stack at the beginning of each operation.
PR: 275306 Reviewed by: jhb Fixes: 9a3444d91c70 ("ossl: Add a VAES-based AES-GCM implementation for amd64") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42783
(cherry picked from commit 5c0dac0b7a012f326edab06ad85aee5ad68ff120)
show more ...
|