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
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ă
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
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 |
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
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
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
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
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ă
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")
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
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ă
---
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")
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
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]
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
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
17 matches
Mail list logo