Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: xilinx - Avoid Encrypt request to fallback for authsize < 16

Encrypt requests can be handled by driver when authsize is less than 16.

Signed-off-by: Harsh Jain <h.jain@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Harsh Jain and committed by
Herbert Xu
f939b88c 349f0d32

+3 -3
+3 -3
drivers/crypto/xilinx/zynqmp-aes-gcm.c
··· 150 150 } 151 151 } else { 152 152 if (hwreq->op == ZYNQMP_AES_ENCRYPT) 153 - data_size = data_size + ZYNQMP_AES_AUTH_SIZE; 153 + data_size = data_size + crypto_aead_authsize(aead); 154 154 else 155 155 data_size = data_size - ZYNQMP_AES_AUTH_SIZE; 156 156 ··· 178 178 int need_fallback = 0; 179 179 struct zynqmp_aead_req_ctx *rq_ctx = aead_request_ctx(req); 180 180 181 - if (tfm_ctx->authsize != ZYNQMP_AES_AUTH_SIZE) 182 - need_fallback = 1; 181 + if (tfm_ctx->authsize != ZYNQMP_AES_AUTH_SIZE && rq_ctx->op == ZYNQMP_AES_DECRYPT) 182 + return 1; 183 183 184 184 if (tfm_ctx->keysrc == ZYNQMP_AES_KUP_KEY && 185 185 tfm_ctx->keylen != ZYNQMP_AES_KEY_SIZE) {