Skip to contentSkip to conversation

crypto/qat: fix null auth issues when using vfio_pci

PATCH Applied Damian Nowak 3 participants 5 messages Aug 9, 2019 – Oct 21, 2019 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto/qat: fix null auth issues when using vfio_pci

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
Cc Fiona Trahe <[email protected]>
---
 drivers/crypto/qat/qat_sym.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/crypto/qat/qat_sym.c +2 -3
index 46ef27a..6aa514c 100644
@@ -307,9 +307,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;
 
 	}
 
Signature · 1 line
2.7.4
#1 lore raw

Hi Fiona,

Could you please Ack the following change.

Thanks,
Akhil

Quoted 41 lines

-----Original Message-----
From: Damian Nowak <[email protected]>
Sent: Friday, August 9, 2019 2:59 PM
To: [email protected]
Cc: Akhil Goyal <[email protected]>; [email protected]; [email protected]; Damian Nowak <[email protected]>
Subject: [PATCH] crypto/qat: fix null auth issues when using vfio_pci

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
Cc Fiona Trahe <[email protected]>
---
 drivers/crypto/qat/qat_sym.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/crypto/qat/qat_sym.c +2 -4
index 46ef27a..6aa514c 100644
@@ -307,9 +307,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.7.4

Acked-by on v1 1/1
#2 lore raw
In reply to Damian Nowak
Quoted 16 lines

-----Original Message-----
From: Nowak, DamianX
Sent: Friday, August 9, 2019 10:29 AM
To: [email protected]
Cc: [email protected]; Trahe, Fiona <[email protected]>; Kusztal, ArkadiuszX <[email protected]>; Nowak, DamianX <[email protected]>
Subject: [PATCH] crypto/qat: fix null auth issues when using vfio_pci

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.

Quoted 4 lines
Fixes 4e0955bddb08
Cc Fiona Trahe <[email protected]>
#4 lore raw
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines

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
Cc Fiona Trahe <[email protected]>
Quoted 6 lines
Quoted 2 lines
Quoted 1 line

Applied to dpdk-next-crypto

Thanks