From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E38BCA04A3; Thu, 11 Jun 2020 07:39:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A83EC2C57; Thu, 11 Jun 2020 07:39:22 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 73D4511A4 for ; Thu, 11 Jun 2020 07:39:20 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05B5W1lP009395; Wed, 10 Jun 2020 22:39:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=qjuA3duY6B/bxG5EFehYvI6DfnhewucsNikOXB8VFJs=; b=UbXo4yClGPsw74sKu7AzbQkJ3V+V5UkVUou/rJxONnMG7zz0TdkA6/y6TRMVtggaJut4 BhhaFRizuLFSRjvy9ENzHk9FGc1rmTjbsurMszAqE6XvYBlCRPqTTYuDkFOCzca8RDkA zyaH1LQ9A/kBCV95yyX5q+V+zQTNPMBbZvp8lJ0GgIJnc3gnb79IYEU0WquwHUDKOtT9 5JMxLfsSjEZNesbya6FqepTyUpvlk5NDzNHdfYMVAZ7eHBE52z2IE+GLxkzYWkLnzFMd xaJ44izqoDCmBSkNaHI+miCbWChYLjcMl7s0mOt/I6xRQUyRFVpGA0Pock3ujSDJMsff GQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 31j77drcjm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 10 Jun 2020 22:39:19 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 10 Jun 2020 22:39:19 -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.2; Wed, 10 Jun 2020 22:39:18 -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.2 via Frontend Transport; Wed, 10 Jun 2020 22:39:18 -0700 Received: from hyd1349.t110.caveonetworks.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id 8966A3F7045; Wed, 10 Jun 2020 22:39:16 -0700 (PDT) From: Ankur Dwivedi To: CC: , , , Ankur Dwivedi Date: Thu, 11 Jun 2020 11:08:23 +0530 Message-ID: <1591853907-2501-4-git-send-email-adwivedi@marvell.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1591853907-2501-1-git-send-email-adwivedi@marvell.com> References: <1591853907-2501-1-git-send-email-adwivedi@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-11_03:2020-06-10, 2020-06-11 signatures=0 Subject: [dpdk-dev] [PATCH 3/7] crypto/octeontx: set session private data X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" This patch sets the first 32 bytes of session private data to zero. This prevents garbage data to be used in code logic. Signed-off-by: Ankur Dwivedi --- drivers/crypto/octeontx/otx_cryptodev_ops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c index 265e10e..8f58fe2 100644 --- a/drivers/crypto/octeontx/otx_cryptodev_ops.c +++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c @@ -252,6 +252,9 @@ return -ENOMEM; } + memset(priv, 0, sizeof(struct cpt_sess_misc) + + offsetof(struct cpt_ctx, fctx)); + misc = priv; for ( ; xform != NULL; xform = xform->next) { -- 1.9.3