Skip to content

Commit

Permalink
crypto/qat: fix null authentication request
Browse files Browse the repository at this point in the history
[ upstream commit 5cce3bd ]

This patch fixes the NULL auth generation case where the request
shouldn't contain the authentication result address. Allows to run
ipsec_autotest with a QAT device.

Fixes: 65beb9a ("crypto/qat: fix null auth when using VFIO")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
  • Loading branch information
Adam Dybkowski authored and cpaelzer committed Jun 10, 2021
1 parent d176e9e commit c19da5e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/crypto/qat/qat_sym.c
Expand Up @@ -310,8 +310,10 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
}
min_ofs = auth_ofs;

auth_param->auth_res_addr =
op->sym->auth.digest.phys_addr;
if (ctx->qat_hash_alg != ICP_QAT_HW_AUTH_ALGO_NULL ||
ctx->auth_op == ICP_QAT_HW_AUTH_VERIFY)
auth_param->auth_res_addr =
op->sym->auth.digest.phys_addr;

}

Expand Down

0 comments on commit c19da5e

Please sign in to comment.