From 65beb9abca6dbb2167a53ab31d79e03f0857357b Mon Sep 17 00:00:00 2001 From: Damian Nowak Date: Fri, 9 Aug 2019 11:29:01 +0200 Subject: [PATCH] crypto/qat: fix null auth when using VFIO When running auth NULL cases while using vfio_pci, DMAR read/write faults appear. It happens even if digest_length is set to 0. This is caused by auth_res_addr initialized as 0x0. Fixes: 4e0955bddb08 ("crypto/qat: fix null auth algo overwrite") Cc: stable@dpdk.org Signed-off-by: Damian Nowak Acked-by: Fiona Trahe --- drivers/crypto/qat/qat_sym.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c index 5ff4aa1e5a..5c9904cbf9 100644 --- a/drivers/crypto/qat/qat_sym.c +++ b/drivers/crypto/qat/qat_sym.c @@ -309,9 +309,8 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg, } min_ofs = auth_ofs; - if (likely(ctx->qat_hash_alg != ICP_QAT_HW_AUTH_ALGO_NULL)) - auth_param->auth_res_addr = - op->sym->auth.digest.phys_addr; + auth_param->auth_res_addr = + op->sym->auth.digest.phys_addr; } -- 2.20.1