crypto: qat - check MMP size before writing to the SRAM
authorJack Xu <jack.xu@intel.com>
Mon, 17 May 2021 09:13:13 +0000 (05:13 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 28 May 2021 06:20:40 +0000 (14:20 +0800)
commitb9f7c36de97814d13c31aba560d520d61b86be0e
tree5305c4dde425cc5f3262a32f04b0a2ab013803b3
parentfc9818e6c54d19f1189bbda906042af3aaf93d80
crypto: qat - check MMP size before writing to the SRAM

Change "sram_visible" to "mmp_sram_size" and compare it with the MMP
size to prevent an overly large MMP file being written to SRAM.

Signed-off-by: Jack Xu <jack.xu@intel.com>
Co-developed-by: Zhehui Xiang <zhehui.xiang@intel.com>
Signed-off-by: Zhehui Xiang <zhehui.xiang@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/icp_qat_fw_loader_handle.h
drivers/crypto/qat/qat_common/qat_hal.c
drivers/crypto/qat/qat_common/qat_uclo.c