diff mbox series

crypto: salsa20-generic - don't unnecessarily use atomic walk

Message ID 20181215204252.8138-1-ebiggers@kernel.org (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series crypto: salsa20-generic - don't unnecessarily use atomic walk | expand

Commit Message

Eric Biggers Dec. 15, 2018, 8:42 p.m. UTC
From: Eric Biggers <ebiggers@google.com>

salsa20-generic doesn't use SIMD instructions or otherwise disable
preemption, so passing atomic=true to skcipher_walk_virt() is
unnecessary.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 crypto/salsa20_generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Herbert Xu Dec. 23, 2018, 4:03 a.m. UTC | #1
On Sat, Dec 15, 2018 at 12:42:52PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> salsa20-generic doesn't use SIMD instructions or otherwise disable
> preemption, so passing atomic=true to skcipher_walk_virt() is
> unnecessary.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>  crypto/salsa20_generic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/crypto/salsa20_generic.c b/crypto/salsa20_generic.c
index 8c77bc78a09f2..00fce32ae17af 100644
--- a/crypto/salsa20_generic.c
+++ b/crypto/salsa20_generic.c
@@ -159,7 +159,7 @@  static int salsa20_crypt(struct skcipher_request *req)
 	u32 state[16];
 	int err;
 
-	err = skcipher_walk_virt(&walk, req, true);
+	err = skcipher_walk_virt(&walk, req, false);
 
 	salsa20_init(state, ctx, walk.iv);