From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30E2DA0C43; Fri, 27 Aug 2021 07:34:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BE786406B4; Fri, 27 Aug 2021 07:34:24 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 8D8D54067C for ; Fri, 27 Aug 2021 07:34:22 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.0.43) with SMTP id 17R3sFkM012821 for ; Thu, 26 Aug 2021 22:34:21 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=gA6bjY5CbeUiBGqz5dm7tLWWnESMuzH/zCzOEu43Ad8=; b=g59ZF4OGTbO0J+KlGJvzu+znpRHuFTquSowA5owePH9HOvkL2bLKI83n0QRvdzaP19cO 0T9ZTaQJOeSZJ3sNnp8+tIc0kntD+HbgcVz4AWN+6vYw7v+ARSO0lqQPMhTand7qICRE 3LRkQ+elC4sYw17znOEUyb8mfSD/gQ5WcgLArjgEwsyVRRRjFRF+Hitzn7BgecmrINxy XMjHyg3gApVMZ2loGzaONz8D687uoJCjGGMarpBcfF14xbmBfT3E/eGEYPPNUl6pgDhV y6TcrWQnAJ9bCHI0Wl87bMK0066455BtF5ig6RLW99S6bFUOKjzrNlJw0mhsc0PV7VOn 5w== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3aprj609j8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 26 Aug 2021 22:34:21 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 26 Aug 2021 22:34:19 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Thu, 26 Aug 2021 22:34:19 -0700 Received: from HY-LT1002.marvell.com (unknown [10.193.70.144]) by maili.marvell.com (Postfix) with ESMTP id 333CE3F7066; Thu, 26 Aug 2021 22:34:15 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Jerin Jacob CC: Danny Patel , Ankur Dwivedi , Tejasree Kondoj , , Anoob Joseph Date: Fri, 27 Aug 2021 11:03:58 +0530 Message-ID: <1630042438-3434-1-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: cv7judMEF4oIwg-RMAEV7q7bnfgA3NNz X-Proofpoint-GUID: cv7judMEF4oIwg-RMAEV7q7bnfgA3NNz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-08-27_01,2021-08-26_02,2020-04-07_01 Subject: [dpdk-dev] [PATCH] crypto/octeontx2: fix unaligned access to device memory X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Danny Patel Use otx2_mbox_memcpy() instead of memcpy() to prevent unaligned access. Fixes: a0645ed0d6ef ("crypto/octeontx2: discover capabilities") Cc: ktejasree@marvell.com Signed-off-by: Danny Patel Signed-off-by: Anoob Joseph --- 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