OSDN Git Service

crypto: qat - reduce stack size with KASAN
authorArnd Bergmann <arnd@arndb.de>
Mon, 11 Dec 2017 12:07:00 +0000 (13:07 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 22 Dec 2017 08:52:39 +0000 (19:52 +1100)
commit8c9478a400b7efdeab89797cfb77e4e845fb34fb
tree3f153724a0ee2111712eeb6e47e6242a43783933
parent3a2d4fb51e5a96ab2a3846f9fe876750c8d14391
crypto: qat - reduce stack size with KASAN

Passing the register value by reference here leads a large amount of stack being
used when CONFIG_KASAN is enabled:

drivers/crypto/qat/qat_common/qat_hal.c: In function 'qat_hal_exec_micro_inst.constprop':
drivers/crypto/qat/qat_common/qat_hal.c:963:1: error: the frame size of 1792 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]

Changing the register-read function to return the value instead reduces the stack
size to around 800 bytes, most of which is for the 'savuwords' array. The function
now no longer returns an error code, but nothing ever evaluated that anyway.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/qat_hal.c