Re: [PATCH] crypto: qat - reduce stack size with KASAN

From: Herbert Xu
Date: Fri Dec 22 2017 - 04:07:00 EST


On Mon, Dec 11, 2017 at 01:07:00PM +0100, Arnd Bergmann wrote:
> 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@xxxxxxxx>

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt