Skip to contentSkip to conversation

crypto/qat: fix build for generic x86 with GCC 12

PATCH Applied David Marchand 3 participants 6 messages Jan 9, 2023 – Jan 19, 2023 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto/qat: fix build for generic x86 with GCC 12

Similar to commit 04361fe2aca8 ("crypto/qat: fix build with GCC 12"). The issue appears when building with the "generic" target we have in devtools/test-meson-builds.sh.

Fixes 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and AES")
---
 drivers/crypto/qat/qat_sym_session.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/crypto/qat/qat_sym_session.c +2 -0
index 0ebc66f89e..84e998fb3f 100644
@@ -1331,6 +1331,8 @@ static int qat_sym_do_precomputes_ipsec_mb(enum icp_qat_hw_auth_algo hash_alg,
 	/* init ipad and opad from key and xor with fixed values */
 	memset(ipad, 0, block_size);
 	memset(opad, 0, block_size);
+	RTE_VERIFY(auth_keylen <= sizeof(ipad));
+	RTE_VERIFY(auth_keylen <= sizeof(opad));
 	rte_memcpy(ipad, auth_key, auth_keylen);
 	rte_memcpy(opad, auth_key, auth_keylen);
 
Signature · 1 line
2.39.0
Tested-by on v1 1/1
#1 lore raw
Quoted 4 lines · David Marchand

Similar to commit 04361fe2aca8 ("crypto/qat: fix build with GCC 12"). The issue appears when building with the "generic" target we have in devtools/test-meson-builds.sh.

Quoted 8 lines
Fixes 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and AES")
---
 drivers/crypto/qat/qat_sym_session.c | 2 ++
 1 file changed, 2 insertions(+)

Confirm that this fixes the build issue.

#2 lore raw
Quoted 9 lines · Bruce Richardson
Quoted 7 lines · David Marchand

Similar to commit 04361fe2aca8 ("crypto/qat: fix build with GCC 12"). The issue appears when building with the "generic" target we have in devtools/test-meson-builds.sh.

Fixes 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and AES")
Quoted 9 lines
Quoted 5 lines
---
 drivers/crypto/qat/qat_sym_session.c | 2 ++
 1 file changed, 2 insertions(+)

Confirm that this fixes the build issue.

No objection from maintainer, Akhil, can you take this to next-crypto? Thanks.

Signature · 1 line
David Marchand
#3 lore raw
Quoted 17 lines
Quoted 7 lines · Bruce Richardson
Quoted 5 lines · David Marchand

Similar to commit 04361fe2aca8 ("crypto/qat: fix build with GCC 12"). The issue appears when building with the "generic" target we have in devtools/test-meson-builds.sh.

Fixes 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and

AES")

Quoted 7 lines
Quoted 7 lines
---
 drivers/crypto/qat/qat_sym_session.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 6 lines
Quoted 4 lines

Confirm that this fixes the build issue.

No objection from maintainer, Akhil, can you take this to next-crypto?

Sure, will merge today/tomorrow.

#4 lore raw
Quoted 17 lines · Akhil Goyal
Quoted 17 lines
Quoted 7 lines · Bruce Richardson
Quoted 5 lines · David Marchand

Similar to commit 04361fe2aca8 ("crypto/qat: fix build with GCC 12"). The issue appears when building with the "generic" target we have in devtools/test-meson-builds.sh.

Fixes 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and

AES")

Quoted 7 lines
Quoted 7 lines
---
 drivers/crypto/qat/qat_sym_session.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines

Confirm that this fixes the build issue.

No objection from maintainer, Akhil, can you take this to next-crypto?

Sure, will merge today/tomorrow.

Once merged into crypto can it be quickly pulled into the main tree, as the build error is also seen there? I think build issues should generally be fixed directly on main, as they affect those not working in the particular subtree area.

Applied
#5 lore raw
Quoted 34 lines

-----Original Message-----
From: Bruce Richardson <[email protected]>
Sent: Tuesday, January 17, 2023 2:33 PM
To: Akhil Goyal <[email protected]>
Cc: David Marchand <[email protected]>; Kai Ji <[email protected]>; [email protected]; [email protected]; Ciara Power <[email protected]>; Fan Zhang <[email protected]>
Subject: Re: [EXT] Re: [PATCH] crypto/qat: fix build for generic x86 with GCC 12

Quoted 22 lines · Akhil Goyal
Quoted 22 lines
Quoted 7 lines · Bruce Richardson
Quoted 5 lines · David Marchand

Similar to commit 04361fe2aca8 ("crypto/qat: fix build with GCC 12"). The issue appears when building with the "generic" target we have in devtools/test-meson-builds.sh.

Fixes 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and

AES")

Quoted 11 lines
Quoted 7 lines
---
 drivers/crypto/qat/qat_sym_session.c | 2 ++
 1 file changed, 2 insertions(+)

Confirm that this fixes the build issue.

Quoted 7 lines
Quoted 2 lines
Quoted 1 line

No objection from maintainer, Akhil, can you take this to next-crypto?

Sure, will merge today/tomorrow.

Once merged into crypto can it be quickly pulled into the main tree, as the build error is also seen there? I think build issues should generally be fixed directly on main, as they affect those not working in the particular subtree area.

Applied to dpdk-next-crypto

Thomas can pick the tree with qat fixes.

Thanks.