mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
libceph: make sure ceph_aes_crypt() IV is aligned
... otherwise the crypto stack will align it for us with a GFP_ATOMIC allocation and a memcpy() -- see skcipher_walk_first(). Signed-off-by: Ilya Dryomov <[email protected]>
This commit is contained in:
parent
6e09d0fb64
commit
124f930b8c
1 changed files with 1 additions and 1 deletions
|
|
@ -214,7 +214,7 @@ static int ceph_aes_crypt(const struct ceph_crypto_key *key, bool encrypt,
|
|||
SKCIPHER_REQUEST_ON_STACK(req, key->tfm);
|
||||
struct sg_table sgt;
|
||||
struct scatterlist prealloc_sg;
|
||||
char iv[AES_BLOCK_SIZE];
|
||||
char iv[AES_BLOCK_SIZE] __aligned(8);
|
||||
int pad_byte = AES_BLOCK_SIZE - (in_len & (AES_BLOCK_SIZE - 1));
|
||||
int crypt_len = encrypt ? in_len + pad_byte : in_len;
|
||||
int ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue