linux-uconsole/drivers/crypto/ccree
Arnd Bergmann b6e63c1862 crypto: ccree - reduce kernel stack usage with clang
[ Upstream commit 5db46ac29a ]

Building with clang for a 32-bit architecture runs over the stack
frame limit in the setkey function:

drivers/crypto/ccree/cc_cipher.c:318:12: error: stack frame size of 1152 bytes in function 'cc_cipher_setkey' [-Werror,-Wframe-larger-than=]

The problem is that there are two large variables: the temporary
'tmp' array and the SHASH_DESC_ON_STACK() declaration. Moving
the first into the block in which it is used reduces the
total frame size to 768 bytes, which seems more reasonable
and is under the warning limit.

Fixes: 63ee04c8b4 ("crypto: ccree - add skcipher support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-By: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:50:33 +01:00
..
cc_aead.c crypto: ccree - use the full crypt length value 2019-10-11 18:20:55 +02:00
cc_aead.h crypto: ccree - add AEAD support 2018-02-15 23:26:42 +08:00
cc_buffer_mgr.c crypto: ccree - don't map AEAD key and IV on stack 2019-05-22 07:37:39 +02:00
cc_buffer_mgr.h crypto: ccree - add AEAD support 2018-02-15 23:26:42 +08:00
cc_cipher.c crypto: ccree - reduce kernel stack usage with clang 2020-01-27 14:50:33 +01:00
cc_cipher.h crypto: ccree - remove cipher ivgen left overs 2018-08-03 18:06:05 +08:00
cc_crypto_ctx.h crypto: ccree - add support for older HW revs 2018-03-03 00:03:16 +08:00
cc_debugfs.c crypto: ccree - correct host regs offset 2018-05-31 00:13:49 +08:00
cc_debugfs.h
cc_driver.c crypto: ccree - fix resume race condition on init 2019-09-16 08:22:03 +02:00
cc_driver.h crypto: ccree - don't map AEAD key and IV on stack 2019-05-22 07:37:39 +02:00
cc_fips.c crypto: ccree - account for TEE not ready to report 2019-10-11 18:20:54 +02:00
cc_fips.h crypto: ccree - add function to handle cryptocell tee fips error 2019-05-22 07:37:40 +02:00
cc_hash.c crypto: ccree - use correct internal state sizes for export 2019-05-22 07:37:39 +02:00
cc_hash.h crypto: ccree - add support for older HW revs 2018-03-03 00:03:16 +08:00
cc_host_regs.h crypto: ccree - correct host regs offset 2018-05-31 00:13:49 +08:00
cc_hw_queue_defs.h crypto: ccree - avoid implicit enum conversion 2019-12-01 09:16:28 +01:00
cc_ivgen.c crypto: ccree - fix mem leak on error path 2019-05-22 07:37:39 +02:00
cc_ivgen.h
cc_kernel_regs.h crypto: ccree - add support for older HW revs 2018-03-03 00:03:16 +08:00
cc_lli_defs.h
cc_pm.c crypto: ccree - fix resume race condition on init 2019-09-16 08:22:03 +02:00
cc_pm.h crypto: ccree - add missing inline qualifier 2019-09-16 08:22:03 +02:00
cc_request_mgr.c crypto: ccree - replace memset+kfree with kzfree 2018-03-03 00:03:16 +08:00
cc_request_mgr.h
cc_sram_mgr.c crypto: ccree - add support for older HW revs 2018-03-03 00:03:16 +08:00
cc_sram_mgr.h
Makefile crypto: ccree - add FIPS support 2018-02-15 23:26:42 +08:00