Skip to contentSkip to conversation

crypto/qat: fix struct alignment

PATCH Applied Brian Dooley 3 participants 3 messages Jun 30, 2023 – Jul 3, 2023 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto/qat: fix struct alignment

The qat_sym_session struct variable alignment was causing a segfault. AES expansion keys require 16-byte alignment. Added __rte_aligned to the expansion keys.

Fixes ca0ba0e48129 ("crypto/qat: default to IPsec MB for computations")
---
 drivers/crypto/qat/qat_sym_session.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/crypto/qat/qat_sym_session.h +3 -3
index 68cf3eaaf4..674a62ee12 100644
@@ -142,10 +142,10 @@ struct qat_sym_session {
 	qat_sym_build_request_t build_request[2];
 #ifndef RTE_QAT_OPENSSL
 	IMB_MGR *mb_mgr;
-#endif
-	uint64_t expkey[4*15];
-	uint32_t dust[4*15];
+	uint64_t expkey[4*15] __rte_aligned(16);
+	uint32_t dust[4*15] __rte_aligned(16);
 	uint8_t docsis_key_len;
+#endif
 };
 
 int
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: Brian Dooley <[email protected]>
Sent: Friday 30 June 2023 12:31
To: Ji, Kai <[email protected]>
Cc: [email protected]; [email protected]; Dooley, Brian <[email protected]>
Subject: [PATCH v1] crypto/qat: fix struct alignment

Quoted 8 lines

The qat_sym_session struct variable alignment was causing a segfault. AES expansion keys require 16-byte alignment. Added __rte_aligned to the expansion keys.

Fixes ca0ba0e48129 ("crypto/qat: default to IPsec MB for computations")

---

Applied
#2 lore raw
Quoted 6 lines
Quoted 6 lines

Subject: [PATCH v1] crypto/qat: fix struct alignment

The qat_sym_session struct variable alignment was causing a segfault. AES expansion keys require 16-byte alignment. Added __rte_aligned to the expansion keys.

Quoted 6 lines
Quoted 4 lines
Fixes ca0ba0e48129 ("crypto/qat: default to IPsec MB for computations")

---

Applied to dpdk-next-crypto
Thanks.