| 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 ...
|
| 26b08c5d | 16-Feb-2022 |
Mark Johnston <[email protected]> |
armv8crypto: Use cursors to access crypto buffer data
Currently armv8crypto copies the scheme used in aesni(9), where payload data and output buffers are allocated on the fly if the crypto buffer is
armv8crypto: Use cursors to access crypto buffer data
Currently armv8crypto copies the scheme used in aesni(9), where payload data and output buffers are allocated on the fly if the crypto buffer is not virtually contiguous. This scheme is simple but incurs a lot of overhead: for an encryption request with a separate output buffer we have to - allocate a temporary buffer to hold the payload - copy input data into the buffer - copy the encrypted payload to the output buffer - zero the temporary buffer before freeing it
We have a handy crypto buffer cursor abstraction now, so reimplement the armv8crypto routines using that instead of temporary buffers. This introduces some extra complexity, but gallatin@ reports a 10% throughput improvement with a KTLS workload without additional CPU usage. The driver still allocates an AAD buffer for AES-GCM if necessary.
Reviewed by: jhb Tested by: gallatin Sponsored by: Ampere Computing LLC Submitted by: Klara Inc. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D28950
show more ...
|
| 7509b677 | 08-Feb-2021 |
Mark Johnston <[email protected]> |
armv8crypto: Extract GCM state into a structure
This makes it easier to refactor the GCM code to operate on crypto_buffer_cursors rather than plain contiguous buffers, with the aim of minimizing the
armv8crypto: Extract GCM state into a structure
This makes it easier to refactor the GCM code to operate on crypto_buffer_cursors rather than plain contiguous buffers, with the aim of minimizing the amount of copying and zeroing done today.
No functional change intended.
Reviewed by: jhb MFC after: 1 week Sponsored by: Ampere Computing Submitted by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D28500
show more ...
|