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 9C0CEA00C3; Thu, 16 Jun 2022 07:58:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4466441133; Thu, 16 Jun 2022 07:58:03 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 2E8ED410D0; Thu, 16 Jun 2022 07:58:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655359082; x=1686895082; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=h2RgEQMmcoqv3QgS2DJ2taHhpXvFkYJyJz0tm3Ac01c=; b=VqViFo9R2NP27a7TwrvkntnsQqXbG/tZ39izu4O3QFCNTYhLaZJHXXSu DY3XPgvEUCwQ59L45LyObQwr6GSH9PLCz6zMjONba5im+85Bi3LKiZNuf KGwCg+Kz6tR5w492GGxstnI+uZ4ECEreOy1taF1rhhnBIBpy2F2vTCXWe c0Sg30zAcvUi3hU3XWrKbFhNLGFWdupugkMMHgrEZBtNBySZ4g/WMIMBG C5OrkCkiu7cx9w1RXZ1XbqJRiAdzRg4exXO/PD1Pkkzhpz9KHRdTqCfGk YRHith1hDwjqolm3fWU7AQ336bTdK6BleyJK24SeBSDPosFIHyr0SrK6p Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10379"; a="343131575" X-IronPort-AV: E=Sophos;i="5.91,304,1647327600"; d="scan'208";a="343131575" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2022 22:58:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,304,1647327600"; d="scan'208";a="727752362" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga001.fm.intel.com with ESMTP; 15 Jun 2022 22:58:00 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 15 Jun 2022 22:58:00 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 15 Jun 2022 22:57:59 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 15 Jun 2022 22:57:59 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 15 Jun 2022 22:57:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZZ/58zbj8xxKFy8sP9VVNH7kYRJDmvnosyJsOgGc1KXZJc2kbyp15rdnYqwOB2e0jAKqNb9TqFgQTAoaoqtuqEi/O3WP76sgLO7CTCEtfIbWeWMRIc4xe5+u7+EkbFIDUMUtlaxZi5+mzPLFjeluLkXhbI8epMjQHTi6Mv4/VT6oHDWMIB7hQWCuujfTYkMvaeoLY27XH+ugTH0R5f6l6TiDQsITWOTRAldUhrmMS30lkdRYHEzEdl77QkRTLbQizCynuyrFbjRjT0tJnrGPGcZeW3NrtXMeBI05jjB9yeMnMp1YpYVXWenVSnYsANE1/ZbI7TJ6h71UNAc2EljnLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=anXNP5JwRqmsZ/0Ub1l/5zvEua0RIeTfXFzs/Q4SAF4=; b=ZjVnYrZU8vLGi/rBZNtbKLFoIrxn1HSCY0AAQqT3esKOLk65Qq9vBbqZmnNwfhBIgHkduMv7oChc7hGqUHx6Nb6vINP5M6cLpXxDpeLhVHoUM52a3aaVroAtUH+pxLrwsz7BQeePMfHxSBXpFRJPNG7Qy3Oz0OvFrlX7Wb8lZOG3P40m5IVBPr8C1Ocrb75a1mPCxEPRDZ8ndTxUj34vfvzEKYa3Q+6Jm/IYjfq1clRxK74zSGP4oriFeFGjoWtZm2MdvknJH8d3G1uoutrhK6/YJcVyAHEub30Kzl0Lp6zotBDePyrv8bEQPSrL/7n9s877/W2gLnveAJSHr1aTrw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB4348.namprd11.prod.outlook.com (2603:10b6:5:1db::18) by MN0PR11MB6133.namprd11.prod.outlook.com (2603:10b6:208:3cb::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.14; Thu, 16 Jun 2022 05:57:55 +0000 Received: from DM6PR11MB4348.namprd11.prod.outlook.com ([fe80::d57f:4e1a:5ec7:118]) by DM6PR11MB4348.namprd11.prod.outlook.com ([fe80::d57f:4e1a:5ec7:118%7]) with mapi id 15.20.5332.023; Thu, 16 Jun 2022 05:57:55 +0000 From: "Jayatheerthan, Jay" To: "Naga Harish K, S V" , "jerinj@marvell.com" CC: "dev@dpdk.org" , "stable@dpdk.org" Subject: RE: [PATCH v2] eventdev/eth_tx: fix adapter create Thread-Topic: [PATCH v2] eventdev/eth_tx: fix adapter create Thread-Index: AQHYgUR6u4dhMfZF3kqAXAd2t6ufFa1RiEiw Date: Thu, 16 Jun 2022 05:57:55 +0000 Message-ID: References: <20220616050441.2197264-1-s.v.naga.harish.k@intel.com> <20220616051458.2197410-1-s.v.naga.harish.k@intel.com> In-Reply-To: <20220616051458.2197410-1-s.v.naga.harish.k@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ffa6fc93-6bf4-4567-a093-08da4f5d289a x-ms-traffictypediagnostic: MN0PR11MB6133:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yeNN6dbLX2JGUewIZP6g3I+aOJ1GavudNdwivQ5zi7Vvsh/d7IPDbtsoqHnT9qzR6EGi+XsfJUS05f0l/OpYK4Vxk6owR9ciOp9HdX0jJTOF4f4DVWcNh3fWQY/GCLnMHyPwRCeawVwkVQMioVf8BohillQioHkO92QgE8A0wKcuS9ofbi2016CC2QW2s8Zw1rYuZdIOX7/McO14FUlfieNSm6Af+fG+4zn9lpMH8zuPfFQRMtI7zgBcKsccgRJbnFUYR4GOobPbCofggYw3PQTkzOp9MKGzFPCLCIygSvRPweU+voDGOGOczLxa/0tcJaW/aJWqWPOn3EZS6iecrs/kMgFFY0uZhMxdBm2QxMzBypdctJmoT3WZy8MSmYRbAxgVca4FJgIlpDxdo83Nz09dK05rL7EyFGcnteYsq/lDXCtxPG3pQ4VGt07Vh5BRHla5exrmNlKHYebrdBsvG8HepAceRwwDR8f1FRRXT7QINp+qsiTNCfnWtaBNkpoalBx38teEkRTOdb+0ZCj+p2YUneFqNCyNm6IAoERQCFkGu5MKUYIoBqcFnrVpLvAu+nipZ9+JSf3/EdWwz53QLgqHzkflSgFzK2WZiH/ELsaNL9aIsxs1feJ7Qk1hzvElCcj8Rgq9hfxxiTPmKWOVgMJfJUsFT3mVapE1iWeN/T91XpqeGwVrIMDNqRslZBWWEU93fsn75WYCVaZsrheWzA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4348.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(122000001)(186003)(82960400001)(71200400001)(508600001)(66446008)(66946007)(6506007)(83380400001)(2906002)(33656002)(38070700005)(4326008)(66476007)(53546011)(52536014)(9686003)(8936002)(26005)(54906003)(55016003)(76116006)(38100700002)(7696005)(5660300002)(110136005)(8676002)(66556008)(86362001)(316002)(64756008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Rdr2wJHDjxPRY6Kx2x9i/03Tyzb4r39JwG1LNJ+ye49UgsH31LJ4avtHipRq?= =?us-ascii?Q?MtejPnVRlxQRZOYSd4OpaGwgshvaAGDAeUTF5NuY+BzhjjVgSOwTiAgITotm?= =?us-ascii?Q?cd7gkqE16elvO1WymJSqfKzBV8unbrQLMGuNr348MAufCSKzLPkUZh0kXHWI?= =?us-ascii?Q?FvKtC0mvITOg4paTCv4b4G4T84RzaQ/O0nt/GtoAxPg5YVu8zmatgIkRjAYu?= =?us-ascii?Q?w3cmhLMuo/1uAROxC+rl3smHB09KD/IqoEB/rCJE0YA3/4P2Kxzax8+sp0i+?= =?us-ascii?Q?2UazDi1LRqiHtTSSRv9PFK9t3/usGBJGmXp6xms1fh6AQvAlERdfNvLkjibm?= =?us-ascii?Q?DvvjVVbtvP5SeaY1f1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ascii?Q?SHxiHj5jZ8mvX7rU6CqYnfVmLb/7M6bX9KdMclY4eQRCg98zhvEPk7pWpEil?= =?us-ascii?Q?IOl5nlTv8JlD6F2bp9qqFfCmi/EOBVl1NoEbE7nd9gN+WieksuSKyfx9lHIP?= =?us-ascii?Q?fhHXstTQawQo7O+kvQAAgqeCCVEprlaf9EZV0N5sxAhCDJq8uGCF9N5RIYsf?= =?us-ascii?Q?Rb5QMFczp4p6Tjh8c2yZJyk6G+nBRuf44HOlQMtP1XkKJi3sk5mctKAh21rd?= =?us-ascii?Q?MJ1cj2KNRJHEh/38xXF8ZncEpwvwSl5ixtpg077SF2gzdpJRWI+7GLDK8Ruj?= =?us-ascii?Q?MCNmUTmd+dVfFNkzT0dNj/dvOAFqucFQUTdt7GkiphQV57jRS8xlK5cI0TdS?= =?us-ascii?Q?GQCukruKVl+w8GyuG9sGzOVn1INhzHWYIxSne4mFMtUHOr/O5RaQWaH0l925?= =?us-ascii?Q?GsW4z9TPMEcxH+QrR5oLynindMtfTLATpnvP7VngrexSsbWGS/2tpcKzL+1o?= =?us-ascii?Q?fKIE/JZXcPwRyya5qsqjdYpJVGo2jF4=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4348.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ffa6fc93-6bf4-4567-a093-08da4f5d289a X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jun 2022 05:57:55.7809 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9gWBkpGtGBe2DRQrpyNCxNc3VuI05nZUoEDNk5/jLbC0d1VDM15oEKKwNog9XxIo1itbYWwWQRiSsFQCfZ+A4QRl6lbXiFNvddnFIiACStc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR11MB6133 X-OriginatorOrg: intel.com 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 Looks good. Acked-by: Jay Jayatheerthan -Jay > -----Original Message----- > From: Naga Harish K, S V > Sent: Thursday, June 16, 2022 10:45 AM > To: Naga Harish K, S V ; Jayatheerthan, Jay = ; jerinj@marvell.com > Cc: dev@dpdk.org; stable@dpdk.org > Subject: [PATCH v2] eventdev/eth_tx: fix adapter create >=20 > During adapter create, memory is allocated for storing event port > configuration which is freed during adapter free. The following > error is seen during free "EAL: Error: Invalid memory" >=20 > The service data pointer storage for txa_service_data_array is > allocated during adapter create with incorrect size which is less > than the required size. > Initialization of this memory causes buffer overflow and result in > metadata overwrite of event port config memory allocated above > and results in the above error message during free. >=20 > Allocating the correct size of memory for txa_service_data_array > prevents overwriting other memory areas like event port config > memory. >=20 > Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") > Cc: stable@dpdk.org >=20 > Signed-off-by: Naga Harish K S V > --- > v2: > * fix commit message > --- > lib/eventdev/rte_event_eth_tx_adapter.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_e= vent_eth_tx_adapter.c > index 1b304f0a73..c700fb7b1f 100644 > --- a/lib/eventdev/rte_event_eth_tx_adapter.c > +++ b/lib/eventdev/rte_event_eth_tx_adapter.c > @@ -224,7 +224,7 @@ txa_service_data_init(void) > if (txa_service_data_array =3D=3D NULL) { > txa_service_data_array =3D > txa_memzone_array_get("txa_service_data_array", > - sizeof(int), > + sizeof(*txa_service_data_array), > RTE_EVENT_ETH_TX_ADAPTER_MAX_INSTANCE); > if (txa_service_data_array =3D=3D NULL) > return -ENOMEM; > -- > 2.25.1