FROMGIT: 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)
committerEric Biggers <ebiggers@google.com>
Wed, 5 Dec 2018 20:30:44 +0000 (12:30 -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>
(cherry picked from commit 5e04542a0e0763294e9fced73a149c38c4e0cee5
 https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master)
Bug: 112008522
Test: As series, see Ic61c13b53facfd2173065be715a7ee5f3af8760b
Change-Id: I28a63d6f8aa59f60aed8d35107b3c546ca5152f7
Signed-off-by: Eric Biggers <ebiggers@google.com>
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);