crypto: hisilicon/qm - alloc buffer to set and get xqc
authorWeili Qian <qianweili@huawei.com>
Sun, 8 Oct 2023 12:36:17 +0000 (20:36 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 14 Oct 2023 04:05:39 +0000 (12:05 +0800)
commit5b90073defd1a52aa8120403d79f6e0fc10c87ee
tree7945a8b1f45dc33ec1e2f1621a9ced2791d43696
parent8405ec8e3c02df8b3720874c3e2169fef4553868
crypto: hisilicon/qm - alloc buffer to set and get xqc

If the temporarily applied memory is used to set or get the xqc
information, the driver releases the memory immediately after the
hardware mailbox operation time exceeds the driver waiting time.
However, the hardware does not cancel the operation, so the hardware
may write data to released memory.

Therefore, when the driver is bound to a device, the driver reserves
memory for the xqc configuration. The subsequent xqc configuration
uses the reserved memory to prevent hardware from accessing the
released memory.

Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/debugfs.c
drivers/crypto/hisilicon/qm.c
drivers/crypto/hisilicon/qm_common.h
include/linux/hisi_acc_qm.h