Loading drivers/md/dm-req-crypt.c +15 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ #define DM_REQ_CRYPT_ERROR -1 #define DM_REQ_CRYPT_ERROR_AFTER_PAGE_MALLOC -2 #define FDE_CRYPTO_DEVICE 0 struct req_crypt_result { struct completion completion; Loading Loading @@ -196,6 +197,13 @@ static void req_cryptd_crypt_read_convert(struct req_dm_crypt_io *io) ablkcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, req_crypt_cipher_complete, &result); init_completion(&result.completion); err = qcrypto_cipher_set_device(req, FDE_CRYPTO_DEVICE); if (err != 0) { DMERR("%s qcrypto_cipher_set_device failed with err %d\n", __func__, err); error = DM_REQ_CRYPT_ERROR; goto ablkcipher_req_alloc_failure; } qcrypto_cipher_set_flag(req, QCRYPTO_CTX_USE_PIPE_KEY | QCRYPTO_CTX_XTS_DU_SIZE_512B); crypto_ablkcipher_clear_flags(tfm, ~0); Loading Loading @@ -322,6 +330,13 @@ static void req_cryptd_crypt_write_convert(struct req_dm_crypt_io *io) req_crypt_cipher_complete, &result); init_completion(&result.completion); error = qcrypto_cipher_set_device(req, FDE_CRYPTO_DEVICE); if (error != 0) { DMERR("%s qcrypto_cipher_set_device failed with error %d\n", __func__, error); error = DM_REQ_CRYPT_ERROR; goto ablkcipher_req_alloc_failure; } qcrypto_cipher_set_flag(req, QCRYPTO_CTX_USE_PIPE_KEY | QCRYPTO_CTX_XTS_DU_SIZE_512B); crypto_ablkcipher_clear_flags(tfm, ~0); Loading Loading
drivers/md/dm-req-crypt.c +15 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ #define DM_REQ_CRYPT_ERROR -1 #define DM_REQ_CRYPT_ERROR_AFTER_PAGE_MALLOC -2 #define FDE_CRYPTO_DEVICE 0 struct req_crypt_result { struct completion completion; Loading Loading @@ -196,6 +197,13 @@ static void req_cryptd_crypt_read_convert(struct req_dm_crypt_io *io) ablkcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, req_crypt_cipher_complete, &result); init_completion(&result.completion); err = qcrypto_cipher_set_device(req, FDE_CRYPTO_DEVICE); if (err != 0) { DMERR("%s qcrypto_cipher_set_device failed with err %d\n", __func__, err); error = DM_REQ_CRYPT_ERROR; goto ablkcipher_req_alloc_failure; } qcrypto_cipher_set_flag(req, QCRYPTO_CTX_USE_PIPE_KEY | QCRYPTO_CTX_XTS_DU_SIZE_512B); crypto_ablkcipher_clear_flags(tfm, ~0); Loading Loading @@ -322,6 +330,13 @@ static void req_cryptd_crypt_write_convert(struct req_dm_crypt_io *io) req_crypt_cipher_complete, &result); init_completion(&result.completion); error = qcrypto_cipher_set_device(req, FDE_CRYPTO_DEVICE); if (error != 0) { DMERR("%s qcrypto_cipher_set_device failed with error %d\n", __func__, error); error = DM_REQ_CRYPT_ERROR; goto ablkcipher_req_alloc_failure; } qcrypto_cipher_set_flag(req, QCRYPTO_CTX_USE_PIPE_KEY | QCRYPTO_CTX_XTS_DU_SIZE_512B); crypto_ablkcipher_clear_flags(tfm, ~0); Loading