diff options
author | Brian Behlendorf <[email protected]> | 2019-10-24 10:17:33 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2019-10-24 10:17:33 -0700 |
commit | 10fa254539ec41c6b043785d4e7ab34bce383b9f (patch) | |
tree | c26798d9a42546096cb5bf2b0afeb4ef5257d48e /include/sys/zio_crypt.h | |
parent | b834b58ae61063f526ce82df348440e31c58c232 (diff) |
Linux 4.14, 4.19, 5.0+ compat: SIMD save/restore
Contrary to initial testing we cannot rely on these kernels to
invalidate the per-cpu FPU state and restore the FPU registers.
Nor can we guarantee that the kernel won't modify the FPU state
which we saved in the task struck.
Therefore, the kfpu_begin() and kfpu_end() functions have been
updated to save and restore the FPU state using our own dedicated
per-cpu FPU state variables.
This has the additional advantage of allowing us to use the FPU
again in user threads. So we remove the code which was added to
use task queues to ensure some functions ran in kernel threads.
Reviewed-by: Fabian Grünbichler <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #9346
Closes #9403
Diffstat (limited to 'include/sys/zio_crypt.h')
-rw-r--r-- | include/sys/zio_crypt.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/sys/zio_crypt.h b/include/sys/zio_crypt.h index c3d165c8b..a02912791 100644 --- a/include/sys/zio_crypt.h +++ b/include/sys/zio_crypt.h @@ -107,11 +107,11 @@ void zio_crypt_key_destroy(zio_crypt_key_t *key); int zio_crypt_key_init(uint64_t crypt, zio_crypt_key_t *key); int zio_crypt_key_get_salt(zio_crypt_key_t *key, uint8_t *salt_out); -int zio_crypt_key_wrap(spa_t *spa, crypto_key_t *cwkey, zio_crypt_key_t *key, - uint8_t *iv, uint8_t *mac, uint8_t *keydata_out, uint8_t *hmac_keydata_out); -int zio_crypt_key_unwrap(spa_t *spa, crypto_key_t *cwkey, uint64_t crypt, - uint64_t version, uint64_t guid, uint8_t *keydata, uint8_t *hmac_keydata, - uint8_t *iv, uint8_t *mac, zio_crypt_key_t *key); +int zio_crypt_key_wrap(crypto_key_t *cwkey, zio_crypt_key_t *key, uint8_t *iv, + uint8_t *mac, uint8_t *keydata_out, uint8_t *hmac_keydata_out); +int zio_crypt_key_unwrap(crypto_key_t *cwkey, uint64_t crypt, uint64_t version, + uint64_t guid, uint8_t *keydata, uint8_t *hmac_keydata, uint8_t *iv, + uint8_t *mac, zio_crypt_key_t *key); int zio_crypt_generate_iv(uint8_t *ivbuf); int zio_crypt_generate_iv_salt_dedup(zio_crypt_key_t *key, uint8_t *data, uint_t datalen, uint8_t *ivbuf, uint8_t *salt); @@ -132,11 +132,11 @@ int zio_crypt_do_hmac(zio_crypt_key_t *key, uint8_t *data, uint_t datalen, uint8_t *digestbuf, uint_t digestlen); int zio_crypt_do_objset_hmacs(zio_crypt_key_t *key, void *data, uint_t datalen, boolean_t byteswap, uint8_t *portable_mac, uint8_t *local_mac); -int zio_do_crypt_data(spa_t *spa, boolean_t encrypt, zio_crypt_key_t *key, +int zio_do_crypt_data(boolean_t encrypt, zio_crypt_key_t *key, dmu_object_type_t ot, boolean_t byteswap, uint8_t *salt, uint8_t *iv, uint8_t *mac, uint_t datalen, uint8_t *plainbuf, uint8_t *cipherbuf, boolean_t *no_crypt); -int zio_do_crypt_abd(spa_t *spa, boolean_t encrypt, zio_crypt_key_t *key, +int zio_do_crypt_abd(boolean_t encrypt, zio_crypt_key_t *key, dmu_object_type_t ot, boolean_t byteswap, uint8_t *salt, uint8_t *iv, uint8_t *mac, uint_t datalen, abd_t *pabd, abd_t *cabd, boolean_t *no_crypt); |