[PATCH 1/2] crypto: kpp - constify buffer passed to crypto_kpp_set_secret()

2017-02-24 Thread Eric Biggers
From: Eric Biggers Constify the buffer passed to crypto_kpp_set_secret() and kpp_alg.set_secret, since it is never modified. Signed-off-by: Eric Biggers --- crypto/dh.c | 3 ++- crypto/ecdh.c | 3 ++- drivers/crypto/qat/qat_comm

[PATCH 2/2] crypto: testmgr - constify all test vectors

2017-02-24 Thread Eric Biggers
From: Eric Biggers Cryptographic test vectors should never be modified, so constify them to enforce this at both compile-time and run-time. This moves a significant amount of data from .data to .rodata when the crypto tests are enabled. Signed-off-by: Eric Biggers --- crypto/testmgr.c | 71 +

[PATCH 0/2] crypto: constify test vectors

2017-02-24 Thread Eric Biggers
From: Eric Biggers These two patches mark all the cryptographic test vectors as 'const'. This has several potential advantages and moves a large amount of data from .data to .rodata when the tests are enabled. The second patch does the real work; the first just prepares for it by updating a func

Re: crypto: hang in crypto_larval_lookup

2017-02-24 Thread Marcelo Cerri
On Thu, Feb 23, 2017 at 07:39:09PM +0800, Herbert Xu wrote: > On Thu, Feb 23, 2017 at 07:19:57PM +0800, Herbert Xu wrote: > > Harald Freudenberger wrote: > > > > > > Hello all > > > > > > I am currently following a hang at modprobe aes_s390 where > > > crypto_register_alg() does not come back fo

authenc: crash if key is not set

2017-02-24 Thread Stephan Müller
Hi Herbert, I am working on fuzzing the AF_ALG interface. The fuzzer reliably triggered the following type of bug when I use authenc(hmac(sha256),cbc(aes)) or other types of authenc() but do not call setkey. Note, it works with gcm or ccm. Is that bug similar in nature as the algif_skcipher a

[PATCH v2 2/2] crypto: vmx - Use skcipher for xts fallback

2017-02-24 Thread Paulo Flabiano Smorigo
Signed-off-by: Paulo Flabiano Smorigo --- drivers/crypto/vmx/aes_xts.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/crypto/vmx/aes_xts.c b/drivers/crypto/vmx/aes_xts.c index 24353ec3..a1e653a 100644 --- a/drivers/crypto/vmx/aes_xts.c

[PATCH v2 1/2] crypto: vmx - Use skcipher for cbc fallback

2017-02-24 Thread Paulo Flabiano Smorigo
Signed-off-by: Paulo Flabiano Smorigo --- drivers/crypto/vmx/aes_cbc.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/crypto/vmx/aes_cbc.c b/drivers/crypto/vmx/aes_cbc.c index 94ad5c0..2bb5910 100644 --- a/drivers/crypto/

[RFC] how to handle AAD copy operation for algif_aead

2017-02-24 Thread Stephan Müller
Hi Herbert et al, attached are two patches where each patch has a different approach to copy the AAD in the algif_aead operation. I would like to hear your opinion which approach should be taken. The patch 0001-crypto-algif_aead-copy-AAD-from-src-to-dst_separate.patch simply copies the AAD ove

Re: [PATCH] crypto: brcm: fix spelling mistake: "genereate" -> "generate"

2017-02-24 Thread Steve Lin
Looks good, thanks! Acked-by: Steve Lin On Wed, Feb 22, 2017 at 6:51 PM, Colin King wrote: > From: Colin Ian King > > trivial fix to spelling mistake in pr_err message > > Signed-off-by: Colin Ian King > --- > drivers/crypto/bcm/util.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: crypto: hang in crypto_larval_lookup

2017-02-24 Thread Harald Freudenberger
On 02/24/2017 11:32 AM, Harald Freudenberger wrote: > On 02/24/2017 09:42 AM, Harald Freudenberger wrote: ... >> ... >> Feb 24 09:28:10 r35lp49 kernel: >> ->crypto_larval_lookup(name=aes,type=0x0405,mask=0x248c) >> Feb 24 09:28:10 r35lp49 kernel: crypto_larval_lookup calling >> crypto_a

Re: crypto: hang in crypto_larval_lookup

2017-02-24 Thread Harald Freudenberger
On 02/24/2017 09:42 AM, Harald Freudenberger wrote: > On 02/23/2017 05:02 PM, Harald Freudenberger wrote: >> On 02/23/2017 12:39 PM, Herbert Xu wrote: >>> On Thu, Feb 23, 2017 at 07:19:57PM +0800, Herbert Xu wrote: Harald Freudenberger wrote: > Hello all > > I am currently followi

[PATCH 1/2] crypto: CRYPTO_DEV_ATMEL_TDES and CRYPTO_DEV_ATMEL_SHA should depend on HAS_DMA

2017-02-24 Thread Geert Uytterhoeven
If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/crypto/atmel-tdes.ko] undefined! ERROR: "bad_dma_ops" [drivers/crypto/atmel-sha.ko] undefined! Add dependencies on HAS_DMA to fix this. Fixes: ceb4afb3086ab08f ("crypto: atmel - refine Kconfig dependencies") Signed-off-by: Geert Uytterhoeven --

[PATCH 2/2] crypto: CRYPTO_DEV_MEDIATEK should depend on HAS_DMA

2017-02-24 Thread Geert Uytterhoeven
If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/crypto/mediatek/mtk-crypto.ko] undefined! Add a dependency on HAS_DMA to fix this. Fixes: 7dee9f618790d0b7 ("crypto: mediatek - remove ARM dependencies") Signed-off-by: Geert Uytterhoeven --- drivers/crypto/Kconfig | 1 + 1 file changed, 1 inserti

Re: crypto: hang in crypto_larval_lookup

2017-02-24 Thread Harald Freudenberger
On 02/23/2017 05:02 PM, Harald Freudenberger wrote: > On 02/23/2017 12:39 PM, Herbert Xu wrote: >> On Thu, Feb 23, 2017 at 07:19:57PM +0800, Herbert Xu wrote: >>> Harald Freudenberger wrote: Hello all I am currently following a hang at modprobe aes_s390 where crypto_register_al