Skip to content

Commit

Permalink
crypto: chacha20-generic - don't unnecessarily use atomic walk
Browse files Browse the repository at this point in the history
chacha20-generic doesn't use SIMD instructions or otherwise disable
preemption, so passing atomic=true to skcipher_walk_virt() is
unnecessary.

Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Martin Willi <martin@strongswan.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Eric Biggers authored and Herbert Xu committed Nov 20, 2018
1 parent dd33344 commit 5e04542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/chacha20_generic.c
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ int crypto_chacha20_crypt(struct skcipher_request *req)
u32 state[16];
int err;

err = skcipher_walk_virt(&walk, req, true);
err = skcipher_walk_virt(&walk, req, false);

crypto_chacha20_init(state, ctx, walk.iv);

0 comments on commit 5e04542

Please sign in to comment.