From: Danny Patel Date: Fri, 27 Aug 2021 05:33:58 +0000 (+0530) Subject: crypto/octeontx2: fix unaligned access to device memory X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=05f157b8c5b469173712b0ab7daa91bbe52ec1df;p=dpdk.git crypto/octeontx2: fix unaligned access to device memory Use otx2_mbox_memcpy() instead of memcpy() to prevent unaligned access. Fixes: a0645ed0d6ef ("crypto/octeontx2: discover capabilities") Cc: stable@dpdk.org Signed-off-by: Danny Patel Signed-off-by: Anoob Joseph --- diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c b/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c index 812515fc1b..1a8edae7eb 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;