crypto: chacha20-generic - don't unnecessarily use atomic walk
authorEric Biggers <ebiggers@google.com>
Sat, 17 Nov 2018 01:26:19 +0000 (17:26 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 20 Nov 2018 06:26:55 +0000 (14:26 +0800)
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>
crypto/chacha20_generic.c

index 3ae96587caf9a4e18216c8a0f1308eb0812eb912..3529521d72a417cac7e7b9a769bb7eddf856d4bc 100644 (file)
@@ -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);