Skip to contentSkip to conversation

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

PATCH In review Eric Biggers 2 participants 2 messages Dec 15, 2018 – Dec 23, 2018 Crypto API

lore
Share & tools
lore
#0 lore raw

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

From: Eric Biggers <[email protected]>

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

---
 crypto/salsa20_generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/salsa20_generic.c +1 -1
index 8c77bc78a09f2..00fce32ae17af 100644
@@ -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);
 
Signature · 1 line
2.19.2
maintainer
#1 lore raw
Quoted 10 lines · Eric Biggers

From: Eric Biggers <[email protected]>

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

---
 crypto/salsa20_generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt