projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
crypto: chacha20-simd - Use generic code for small requests
[cascardo/linux.git]
/
arch
/
x86
/
crypto
/
chacha20_glue.c
diff --git
a/arch/x86/crypto/chacha20_glue.c
b/arch/x86/crypto/chacha20_glue.c
index
2d5c2e0
..
f910d1d
100644
(file)
--- a/
arch/x86/crypto/chacha20_glue.c
+++ b/
arch/x86/crypto/chacha20_glue.c
@@
-70,7
+70,7
@@
static int chacha20_simd(struct blkcipher_desc *desc, struct scatterlist *dst,
struct blkcipher_walk walk;
int err;
- if (!may_use_simd())
+ if (
nbytes <= CHACHA20_BLOCK_SIZE ||
!may_use_simd())
return crypto_chacha20_crypt(desc, dst, src, nbytes);
state = (u32 *)roundup((uintptr_t)state_buf, CHACHA20_STATE_ALIGN);