[dpdk-dev] [PATCH] crypto/octeontx2: fix unaligned access to device memory

Anoob Joseph anoobj at marvell.com
Fri Aug 27 07:33:58 CEST 2021


From: Danny Patel <dannyp at marvell.com>

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

Fixes: a0645ed0d6ef ("crypto/octeontx2: discover capabilities")
Cc: ktejasree at marvell.com

Signed-off-by: Danny Patel <dannyp at marvell.com>
Signed-off-by: Anoob Joseph <anoobj at marvell.com>
---
 drivers/crypto/octeontx2/otx2_cryptodev_mbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c b/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c
index 999f425..a635eb4 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c
@@ -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;
-- 
2.7.4



More information about the dev mailing list