Skip to contentSkip to conversation

crypto/octeontx2: fix unaligned access to device memory

PATCH Applied Anoob Joseph 2 participants 2 messages Aug 27, 2021 – Sep 2, 2021 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto/octeontx2: fix unaligned access to device memory

From: Danny Patel <[email protected]>

Use otx2_mbox_memcpy() instead of memcpy() to prevent unaligned access.

Fixes a0645ed0d6ef ("crypto/octeontx2: discover capabilities")
---
 drivers/crypto/octeontx2/otx2_cryptodev_mbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/octeontx2/otx2_cryptodev_mbox.c +1 -1
index 999f425..a635eb4 100644
@@ -37,7 +37,7 @@ otx2_cpt_hardware_caps_get(const struct rte_cryptodev *dev,
 	}
 
 	vf->cpt_revision = rsp->cpt_revision;
-	memcpy(hw_caps, rsp->eng_caps,
+	otx2_mbox_memcpy(hw_caps, rsp->eng_caps,
 		sizeof(union cpt_eng_caps) * CPT_MAX_ENG_TYPES);
 
 	return 0;
Signature · 1 line
2.7.4