linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: salsa20-generic - don't unnecessarily use atomic walk
@ 2018-12-15 20:42 Eric Biggers
  2018-12-23  4:03 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Biggers @ 2018-12-15 20:42 UTC (permalink / raw)
  To: linux-crypto, Herbert Xu

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(-)

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);
 
-- 
2.19.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] crypto: salsa20-generic - don't unnecessarily use atomic walk
  2018-12-15 20:42 [PATCH] crypto: salsa20-generic - don't unnecessarily use atomic walk Eric Biggers
@ 2018-12-23  4:03 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2018-12-23  4:03 UTC (permalink / raw)
  To: Eric Biggers; +Cc: linux-crypto

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.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-23  4:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-15 20:42 [PATCH] crypto: salsa20-generic - don't unnecessarily use atomic walk Eric Biggers
2018-12-23  4:03 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).