Hello all,
This is v2 of what is now a complete glue code consolidation series
for generic, x86, arm and arm64 implementations of SHA-1, SHA-224/256
and SHA-384/512.
The base layer implements all the update and finalization logic around
the block transforms, where the prototypes of the latter loo
To reduce the number of copies of boilerplate code throughout
the tree, this patch implements generic glue for the SHA-512
algorithm. This allows a specific arch or hardware implementation
to only implement the special handling that it needs.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig
This updates the generic SHA-256 implementation to use the
new shared SHA-256 glue code.
It also implements a .finup hook crypto_sha256_finup() and exports
it to other modules.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig | 1 +
crypto/sha256_generic.c | 139 ++---
To reduce the number of copies of boilerplate code throughout
the tree, this patch implements generic glue for the SHA-1
algorithm. This allows a specific arch or hardware implementation
to only implement the special handling that it needs.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig
This updated the generic SHA-512 implementation to use the
generic shared SHA-512 glue code.
It also implements a .finup hook crypto_sha512_finup() and exports
it to other modules.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig | 1 +
crypto/sha512_generic.c | 126 ++---
This updated the generic SHA-1 implementation to use the generic
shared SHA-1 glue code.
It also implements a .finup hook crypto_sha1_finup() and exports
it to other modules.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig| 1 +
crypto/sha1_generic.c | 105 ---
Signed-off-by: Ard Biesheuvel
---
arch/arm64/crypto/Kconfig| 1 +
arch/arm64/crypto/sha2-ce-core.S | 11 +-
arch/arm64/crypto/sha2-ce-glue.c | 211 ++-
3 files changed, 40 insertions(+), 183 deletions(-)
diff --git a/arch/arm64/crypto/Kconfig b/arch
Signed-off-by: Ard Biesheuvel
---
arch/arm/crypto/Kconfig| 2 +-
arch/arm/crypto/sha1-ce-glue.c | 110 +++--
2 files changed, 31 insertions(+), 81 deletions(-)
diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig
index c111d8992afb..31ad19f
To reduce the number of copies of boilerplate code throughout
the tree, this patch implements generic glue for the SHA-256
algorithm. This allows a specific arch or hardware implementation
to only implement the special handling that it needs.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig
This updated the generic SHA-512 implementation to use the
generic shared SHA-512 glue code.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig | 1 +
crypto/sha512_generic.c | 117 +++-
2 files changed, 16 insertions(+), 102 deletions(-)
dif
Signed-off-by: Ard Biesheuvel
---
arch/arm/crypto/Kconfig | 1 +
arch/arm/{include/asm => }/crypto/sha1.h | 3 +
arch/arm/crypto/sha1_glue.c | 117 +++
3 files changed, 28 insertions(+), 93 deletions(-)
rename arch/arm/{include/asm =>
Signed-off-by: Ard Biesheuvel
---
arch/arm/crypto/Kconfig| 1 +
arch/arm/crypto/sha2-ce-glue.c | 151 +
2 files changed, 33 insertions(+), 119 deletions(-)
diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig
index 31ad19f18af2..de91f04
This updates the SHA-512 NEON module with the faster and more
versatile implementation from the OpenSSL project. It consists
of both a NEON and a generic ASM version of the core SHA-512
transform, where the NEON version reverts to the ASM version
when invoked in non-process context.
Performance re
To reduce the number of copies of boilerplate code throughout
the tree, this patch implements generic glue for the SHA-256
algorithm. This allows a specific arch or hardware implementation
to only implement the special handling that it needs.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig
This updates the generic SHA-256 implementation to use the
new shared SHA-256 glue code.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig | 1 +
crypto/sha256_generic.c | 131 +++-
2 files changed, 18 insertions(+), 114 deletions(-)
diff --
This updates the generic SHA-256 implementation to use the
new shared SHA-256 glue code.
It also implements a .finup hook crypto_sha256_finup() and exports
it to other modules.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig | 1 +
crypto/sha256_generic.c | 139 ++---
Signed-off-by: Ard Biesheuvel
---
arch/arm/crypto/Kconfig | 1 +
arch/arm/{include/asm => }/crypto/sha1.h | 3 +
arch/arm/crypto/sha1_glue.c | 117 +++
3 files changed, 28 insertions(+), 93 deletions(-)
rename arch/arm/{include/asm =>
To reduce the number of copies of boilerplate code throughout
the tree, this patch implements generic glue for the SHA-1
algorithm. This allows a specific arch or hardware implementation
to only implement the special handling that it needs.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig
This updated the generic SHA-512 implementation to use the
generic shared SHA-512 glue code.
It also implements a .finup hook crypto_sha512_finup() and exports
it to other modules.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig | 1 +
crypto/sha512_generic.c | 126 ++---
To reduce the number of copies of boilerplate code throughout
the tree, this patch implements generic glue for the SHA-512
algorithm. This allows a specific arch or hardware implementation
to only implement the special handling that it needs.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig
To reduce the number of copies of boilerplate code throughout
the tree, this patch implements generic glue for the SHA-256
algorithm. This allows a specific arch or hardware implementation
to only implement the special handling that it needs.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig
This updated the generic SHA-1 implementation to use the generic
shared SHA-1 glue code.
It also implements a .finup hook crypto_sha1_finup() and exports
it to other modules.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig| 1 +
crypto/sha1_generic.c | 105 ---
NOTE: I appear to have screwed up something when I just sent this, so
resending now with no patches missing and no duplicates.
Hello all,
This is v2 of what is now a complete glue code consolidation series
for generic, x86, arm and arm64 implementations of SHA-1, SHA-224/256
and SHA-384/512
Signed-off-by: Ard Biesheuvel
---
arch/x86/crypto/sha1_ssse3_glue.c | 139 +-
crypto/Kconfig| 1 +
2 files changed, 34 insertions(+), 106 deletions(-)
diff --git a/arch/x86/crypto/sha1_ssse3_glue.c
b/arch/x86/crypto/sha1_ssse3_glue.c
ind
Signed-off-by: Ard Biesheuvel
---
arch/arm/crypto/Kconfig| 2 +-
arch/arm/crypto/sha1-ce-glue.c | 110 +++--
2 files changed, 31 insertions(+), 81 deletions(-)
diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig
index c111d8992afb..31ad19f
Signed-off-by: Ard Biesheuvel
---
arch/arm64/crypto/Kconfig| 1 +
arch/arm64/crypto/sha2-ce-core.S | 11 ++-
arch/arm64/crypto/sha2-ce-glue.c | 208 ++-
3 files changed, 38 insertions(+), 182 deletions(-)
diff --git a/arch/arm64/crypto/Kconfig b/arc
Signed-off-by: Ard Biesheuvel
---
arch/x86/crypto/sha256_ssse3_glue.c | 186
crypto/Kconfig | 1 +
2 files changed, 39 insertions(+), 148 deletions(-)
diff --git a/arch/x86/crypto/sha256_ssse3_glue.c
b/arch/x86/crypto/sha256_ssse3_glue
Signed-off-by: Ard Biesheuvel
---
arch/x86/crypto/sha512_ssse3_glue.c | 195 +++-
crypto/Kconfig | 1 +
2 files changed, 39 insertions(+), 157 deletions(-)
diff --git a/arch/x86/crypto/sha512_ssse3_glue.c
b/arch/x86/crypto/sha512_ssse3_glue
Signed-off-by: Ard Biesheuvel
---
arch/arm/crypto/Kconfig| 1 +
arch/arm/crypto/sha2-ce-glue.c | 151 +
2 files changed, 33 insertions(+), 119 deletions(-)
diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig
index 31ad19f18af2..de91f04
Signed-off-by: Ard Biesheuvel
---
arch/arm64/crypto/Kconfig| 1 +
arch/arm64/crypto/sha1-ce-core.S | 11 ++--
arch/arm64/crypto/sha1-ce-glue.c | 132 +++
3 files changed, 31 insertions(+), 113 deletions(-)
diff --git a/arch/arm64/crypto/Kconfig b/ar
pci code is in ccp-pci.c, don't include pci
headers from ccp/ccp-ops.c.
Signed-off-by: Michael S. Tsirkin
---
drivers/crypto/ccp/ccp-ops.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c
index 8729364..3da1140 100644
--- a/drivers/
On Fri, Mar 27, 2015 at 11:50:42PM +0100, Stephan Mueller wrote:
> If a cipher allocation fails with -ENOENT, the testmgr now retries
> to allocate the cipher with CRYPTO_ALG_INTERNAL flag.
>
> As all ciphers, including the internal ciphers will be processed by
> the testmgr, it needs to be able t
hello
I am trying to add the CTR (counter) block cipher mode for AES on my Security
System driver.
When testing with the tcrypt module I got the following result:
[ 1256.986989] alg: skcipher: Test 1 failed on encryption for ctr-aes-sunxi-ss
[ 1256.987004] : 87 4d 61 91 b6 20 e3 26 1b ef
> Von: linux-crypto-ow...@vger.kernel.org
> [linux-crypto-ow...@vger.kernel.org]" im Auftrag von "Corentin
> LABBE [clabbe.montj...@gmail.com]
> Gesendet: Montag, 30. März 2015 19:59
> An: linux-crypto@vger.kernel.org
> Cc: linux-su...@googlegroups.com
> Betreff: problem with testing a CTR block
Am Montag, 30. März 2015, 18:08:28 schrieb Markus Stockhausen:
Hi Markus,
> > Von: linux-crypto-ow...@vger.kernel.org
> > [linux-crypto-ow...@vger.kernel.org]" im Auftrag von "Corentin
> > LABBE [clabbe.montj...@gmail.com] Gesendet: Montag, 30. März 2015 19:59
> > An: linux-crypto@vger.kernel.org
Am Dienstag, 31. März 2015, 00:10:34 schrieb Herbert Xu:
Hi Herbert,
> On Fri, Mar 27, 2015 at 11:50:42PM +0100, Stephan Mueller wrote:
> > If a cipher allocation fails with -ENOENT, the testmgr now retries
> > to allocate the cipher with CRYPTO_ALG_INTERNAL flag.
> >
> > As all ciphers, includi
Flag all CAST6 helper ciphers as internal ciphers to prevent them
from being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/x86/crypto/cast6_avx_glue.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/x86/crypto/cast6_avx_glue.c b/arch/x8
Flag all Serpent SSE2 helper ciphers as internal ciphers to prevent
them from being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/x86/crypto/serpent_sse2_glue.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/x86/crypto/serpent_sse2_glu
Hi,
Based on the discussion in the thread [1], a flag is added to the
kernel crypto API to allow ciphers to be marked as internal.
The patch set is tested in FIPS and non-FIPS mode. In addition,
the enforcement that the helper cipher of __driver-gcm-aes-aesni
cannot be loaded, but the wrapper of
Flag all ARMv8 AES helper ciphers as internal ciphers to prevent
them from being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/arm/crypto/aes-ce-glue.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/arm/crypto/aes-ce-glue.c b/arch/arm/cryp
Several hardware related cipher implementations are implemented as
follows: a "helper" cipher implementation is registered with the
kernel crypto API.
Such helper ciphers are never intended to be called by normal users. In
some cases, calling them via the normal crypto API may even cause
failures
Flag all NEON bit sliced AES helper ciphers as internal ciphers to
prevent them from being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/arm/crypto/aesbs-glue.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/arm/crypto/aesbs-glue.c b/arch/arm/
Flag all Twofish AVX helper ciphers as internal ciphers to prevent
them from being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/x86/crypto/twofish_avx_glue.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/x86/crypto/twofish_avx_glue.c
The mcryptd is used as a wrapper around internal ciphers. Therefore,
the mcryptd must process the internal cipher by marking mcryptd as
internal if the underlying cipher is an internal cipher.
Signed-off-by: Stephan Mueller
---
crypto/mcryptd.c | 25 +++--
1 file changed, 23
Flag all AVX Camellia helper ciphers as internal ciphers to prevent
them from being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/x86/crypto/camellia_aesni_avx_glue.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/x86/crypto/camellia_a
With ciphers that now cannot be accessed via the kernel crypto API,
callers shall be able to identify the ciphers that are not callable. The
/proc/crypto file is added a boolean field identifying that such
internal ciphers.
Signed-off-by: Stephan Mueller
---
crypto/proc.c | 3 +++
1 file changed
Allocate the ciphers irrespectively if they are marked as internal
or not. As all ciphers, including the internal ciphers will be
processed by the testmgr, it needs to be able to allocate those
ciphers.
Signed-off-by: Stephan Mueller
---
crypto/testmgr.c | 14 +++---
1 file changed, 7 in
Flag all Multi buffer SHA1 helper ciphers as internal ciphers
to prevent them from being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/x86/crypto/sha-mb/sha1_mb.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/crypto/sha-mb/sha1_mb.c b/arch/
The cryptd is used as a wrapper around internal ciphers. Therefore, the
cryptd must process the internal cipher by marking cryptd as internal if
the underlying cipher is an internal cipher.
Signed-off-by: Stephan Mueller
---
crypto/ablk_helper.c | 3 ++-
crypto/cryptd.c | 49 ++
Flag all 64 bit ARMv8 AES helper ciphers as internal ciphers to
prevent them from being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/arm64/crypto/aes-glue.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/crypto/aes-glue.c b/arch/arm
Flag all ash clmulni helper ciphers as internal ciphers to prevent them
from being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/x86/crypto/ghash-clmulni-intel_glue.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/crypto/ghash-clmulni-intel_
Flag all GHASH ARMv8 vmull.p64 helper ciphers as internal ciphers
to prevent them from being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/arm/crypto/ghash-ce-glue.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/crypto/ghash-ce-glue.c b/arch
Flag all AES-NI Camellia helper ciphers as internal ciphers to
prevent them from being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/x86/crypto/camellia_aesni_avx2_glue.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/x86/crypto/camell
Flag all AES-NI helper ciphers as internal ciphers to prevent them from
being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/x86/crypto/aesni-intel_glue.c | 23 +++
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/arch/x86/crypto/aesni-intel_glu
Flag all Serpent AVX helper ciphers as internal ciphers to prevent
them from being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/x86/crypto/serpent_avx_glue.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/x86/crypto/serpent_avx_glue.c
Flag all CAST5 helper ciphers as internal ciphers to prevent them
from being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/x86/crypto/cast5_avx_glue.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/x86/crypto/cast5_avx_glue.c b/arch/x86/crypto
Flag all Serpent AVX2 helper ciphers as internal ciphers to prevent
them from being called by normal users.
Signed-off-by: Stephan Mueller
---
arch/x86/crypto/serpent_avx2_glue.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/x86/crypto/serpent_avx2_glu
After the TX sgl is expanded we need to explicitly mark end of data
at the last buffer that contains data.
Signed-off-by: Tadeusz Struk
---
crypto/algif_skcipher.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.
Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL.
Signed-off-by: Tadeusz Struk
---
crypto/af_alg.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index 26089d1..f22cc56 100644
--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -381,7 +381,7 @@
No need to use kzalloc to allocate sgls as the structure is initialized anyway.
Signed-off-by: Tadeusz Struk
---
crypto/algif_skcipher.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
index 9492dd5..5fd631f 100644
--- a/cr
Commit 26a05489ee0e ("crypto: omap-sham - Map SG pages if they are HIGHMEM
before accessing")
says that HIGHMEM pages may not be mapped so we must
kmap them before accessing, but it doesn't check whether the
corresponding page is in highmem or not. Because of this all
the crypto tests are failing.
For cases where total length of an input SGs is not same as
length of the input data for encryption, omap-aes driver
crashes. This happens in the case when IPsec is trying to use
omap-aes driver.
To avoid this, we copy all the pages from the input SG list
into a contiguous buffer and prepare a sin
omap_sham_handle_queue() can be called as part of done_task tasklet.
During this its atomic and any calls to pm functions cannot sleep.
But there is a call to pm_runtime_get_sync() (which can sleep) in
omap_sham_handle_queue(), because of which the following appears:
" [ 116.169969] BUG: scheduli
63 matches
Mail list logo