Skip to content
This repository was archived by the owner on Dec 27, 2019. It is now read-only.

Commit 402eb65

Browse files
committed
chacha20poly1305: relax simd between sg chunks
1 parent 2cf74f2 commit 402eb65

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/crypto/zinc/chacha20poly1305.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ bool chacha20poly1305_encrypt_sg(struct scatterlist *dst,
122122
walk.src.virt.addr, chunk_len, simd_context);
123123
poly1305_update(&poly1305_state, walk.dst.virt.addr,
124124
chunk_len, simd_context);
125+
simd_relax(simd_context);
125126
ret = blkcipher_walk_done(&chacha20_desc, &walk,
126127
walk.nbytes % CHACHA20_BLOCK_SIZE);
127128
}
@@ -264,6 +265,7 @@ bool chacha20poly1305_decrypt_sg(struct scatterlist *dst,
264265
chunk_len, simd_context);
265266
chacha20(&chacha20_state, walk.dst.virt.addr,
266267
walk.src.virt.addr, chunk_len, simd_context);
268+
simd_relax(simd_context);
267269
ret = blkcipher_walk_done(&chacha20_desc, &walk,
268270
walk.nbytes % CHACHA20_BLOCK_SIZE);
269271
}

0 commit comments

Comments
 (0)