[PATCH 11/13] crypto: caam - remove unused variables in caam_drv_private

2017-07-07 Thread Horia Geantă
From: Tudor Ambarus Signed-off-by: Tudor Ambarus Signed-off-by: Horia Geantă --- drivers/crypto/caam/ctrl.c | 1 - drivers/crypto/caam/intern.h | 3 --- 2 files changed, 4 deletions(-) diff --git

[PATCH 08/13] crypto: caam/qi - remove unused header sg_sw_sec4.h

2017-07-07 Thread Horia Geantă
sg_sw_sec4.h header is not used by caam/qi, thus remove its inclusion. Signed-off-by: Horia Geantă --- drivers/crypto/caam/caamalg_qi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/caam/caamalg_qi.c b/drivers/crypto/caam/caamalg_qi.c index

[PATCH 13/13] crypto: caam - fix condition for the jump over key(s) command

2017-07-07 Thread Horia Geantă
From: Tudor Ambarus SELF condition has no meaning for the SERIAL sharing since the jobs are executed in the same DECO. Signed-off-by: Tudor Ambarus Signed-off-by: Horia Geantă --- drivers/crypto/caam/caamalg_desc.c |

[PATCH 09/13] crypto: caam/qi - lower driver verbosity

2017-07-07 Thread Horia Geantă
Change log level for some prints from dev_info() to dev_dbg(), low-level details are needed only when debugging. Signed-off-by: Horia Geantă --- drivers/crypto/caam/qi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam/qi.c

[PATCH 01/13] crypto: caam/qi - fix typo in authenc alg driver name

2017-07-07 Thread Horia Geantă
s/desi/des for echainiv(authenc(hmac(sha256),cbc(des))) alg. Cc: Fixes: b189817cf7894 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Signed-off-by: Horia Geantă --- drivers/crypto/caam/caamalg_qi.c | 2 +- 1 file changed, 1

[PATCH 12/13] crypto: caam - clean-up in caam_init_rng()

2017-07-07 Thread Horia Geantă
From: Horia Geantă Clean up the code, as indicated by Coccinelle. Cc: Julia Lawall Signed-off-by: Horia Geantă Signed-off-by: Horia Geantă --- drivers/crypto/caam/caamrng.c | 6 +- 1 file

[PATCH 05/13] crypto: caam/qi - handle large number of S/Gs case

2017-07-07 Thread Horia Geantă
For more than 16 S/G entries, driver currently corrupts memory on ARMv8, see below KASAN log. Note: this does not reproduce on PowerPC due to different (smaller) cache line size - 64 bytes on PPC vs. 128 bytes on ARMv8. One such use case is one of the cbc(aes) test vectors - with 8 S/G entries

[PATCH 10/13] crypto: caam - remove unused sg_to_sec4_sg_len()

2017-07-07 Thread Horia Geantă
sg_to_sec4_sg_len() is no longer used since commit 479bcc7c5b9e ("crypto: caam - Convert authenc to new AEAD interface") Its functionality has been superseded by the usage of sg_nents_for_len() returning the number of S/G entries corresponding to the provided length. Signed-off-by: Horia Geantă

[PATCH 07/13] crypto: caam/qi - explicitly set dma_ops

2017-07-07 Thread Horia Geantă
Since ARM64 commit 1dccb598df549 ("arm64: simplify dma_get_ops"), dma_ops no longer default to swiotlb_dma_ops, but to dummy_dma_ops. dma_ops have to be explicitly set in the driver - at least for ARM64. Fixes: 67c2315def06 ("crypto: caam - add Queue Interface (QI) backend support")

[PATCH 00/13] crypto: caam - fixes, clean-up

2017-07-07 Thread Horia Geantă
Hi, Current patch set consists of: Patches 1-4 fix some issues in caam/qi driver; they should be sent to -stable. Patches 5-7 also fix some problems in caam/qi driver, however these are ARM-specific. Considering that caam/qi does not have support for ARM in kernel v4.12 (lacking one dependency

[PATCH 02/13] crypto: caam/qi - fix compilation with DEBUG enabled

2017-07-07 Thread Horia Geantă
caam/qi driver does not compile when DEBUG is enabled (CRYPTO_DEV_FSL_CAAM_DEBUG=y): drivers/crypto/caam/caamalg_qi.c: In function 'ablkcipher_done': drivers/crypto/caam/caamalg_qi.c:794:2: error: implicit declaration of function 'dbg_dump_sg' [-Werror=implicit-function-declaration]

[PATCH 04/13] crypto: caam/qi - properly set IV after {en,de}crypt

2017-07-07 Thread Horia Geantă
caam/qi needs a fix similar to what was done for caam/jr in commit "crypto: caam/qi - properly set IV after {en,de}crypt", to allow for ablkcipher/skcipher chunking/streaming. Cc: Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms")

[PATCH 06/13] crypto: caam/qi - fix AD length endianness in S/G entry

2017-07-07 Thread Horia Geantă
Associated data (AD) length is read by CAAM from an S/G entry that is initially filled by the GPP. Accordingly, AD length has to be stored in CAAM endianness. Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Signed-off-by: Horia Geantă ---

[PATCH 03/13] crypto: caam/qi - fix compilation with CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y

2017-07-07 Thread Horia Geantă
caam/qi driver fails to compile when CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y. Fix it by making the offending local per_cpu variable global. Cc: Fixes: 67c2315def06c ("crypto: caam - add Queue Interface (QI) backend support") Reported-by: kbuild test robot

Re: [PATCH 12/13] crypto: caam - clean-up in caam_init_rng()

2017-07-07 Thread Horia Geantă
On 7/7/2017 4:06 PM, Horia Geantă wrote: > From: Horia Geantă > > Clean up the code, as indicated by Coccinelle. > > Cc: Julia Lawall > Signed-off-by: Horia Geantă > Signed-off-by: Horia Geantă

[RFC PATCH] crypto: caam - fix signals handling

2017-07-07 Thread Horia Geantă
Driver does not properly handle the case when signals interrupt wait_for_completion_interruptible(): -it does not check for return value -completion structure is allocated on stack; in case a signal interrupts the sleep, it will go out of scope, causing the worker thread (caam_jr_dequeue) to fail

[PATCH] crypto: brcm: add NULL check on of_match_device() return value

2017-07-07 Thread Gustavo A. R. Silva
Check return value from call to of_match_device() in order to prevent a NULL pointer dereference. In case of NULL print error message and return -ENODEV Signed-off-by: Gustavo A. R. Silva --- drivers/crypto/bcm/cipher.c | 5 + 1 file changed, 5 insertions(+) diff