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 13760A00C5 for ; Wed, 20 Jul 2022 10:23:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DD4C410F1; Wed, 20 Jul 2022 10:23:06 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2044.outbound.protection.outlook.com [40.107.102.44]) by mails.dpdk.org (Postfix) with ESMTP id C8B2640697 for ; Wed, 20 Jul 2022 10:23:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aYuJETwgaUJJKnWsfuNZux9q9AqX3fZcknkWpFO+xamnSebQxLzh2Q2Zmw8vYPCQ2g5NPC0r+Q4LtRARgZrET8D0rp3LxmtHn3741BHdFBwd0w9zXfILrxYNhCh2z2xpwEXWwfJTk7ldJXKR74bOkFPf462+50bTHKi98J0YIC8hm9Wft/fSyu5XP4uid3GMfwBSypUydUsFDDFqJ4uWmj0yhwIVcvRv8p1DS7TgI0MO+MRIAOj6TdGDJZbPydcEKznfKP9NzJkyB+pygJsBXjTD1EcvRB1OpdTwDL3waB1JmSH25VXb4cnTF3fKVCVM09GsmZ9WrKKIp6brB+s4xQ== 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=hE/vC6wq/qYEQiPs6ftXId9Pfanz01qqksZ+Eoma4dw=; b=MSJQQz/GVOre/m8KTiBXNhRHsJU22FnL66G+ZwSYHI6v1kjinycSqnPhVYBZ8TQL2Zh43yVmhftdAh9f/aD74hdbSQDmCeGLdmCxHtwuCWp0OkrLKzT6/88TtgP8Md/gR9T8vnCWjVTR7jWb1aljpPrZ/kiJQ99ENb6azX/qdhf0zb8qgCVnBtbUjxC9Llz/SbsFD6Nd1uQ6WPvN+VQsPc1YsVK4peXctbS+LFE+v6be/PSHgXmANiBf2qOXe/gqqjZL+yXdsOTFW2kivQ+NPIMoBKkoObhFhgsOI8JKMNELWwxt3qcSGgwJYv83fbgtN3F4oMeeUBjqr06ev0YlOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hE/vC6wq/qYEQiPs6ftXId9Pfanz01qqksZ+Eoma4dw=; b=eo4a5cicf+7L3vDFXRh/AgPdyceDezkZadwtT54OanRRYnzTaPqi+s6JIP7/3If3BBGm6bW/OQxq+mXMQ6A+NQHP2MBE193ffHTXb+XqBqSf1RaadvOtjJy9LcLdSNirVyzvAfZALWwzhFgzqgI/l/oI0eUjf5GW57qbgEbdYaHa2cBQGbe85E+I+FDmZdJsfToaorteIcuillBVDbwef4Gx2iw6redtPt85vlLMZA+32OOU5xH6w/YRbEsnN6QhEYP7yPlDupr2IxJNkehz/zJjOXJSvwJJDFnPKr4MwM8cKkSw7BGuFNIgq4VcapF9wXN+NCtrcc16+08WyH/IAA== Received: from DM6PR02CA0123.namprd02.prod.outlook.com (2603:10b6:5:1b4::25) by IA1PR12MB6308.namprd12.prod.outlook.com (2603:10b6:208:3e4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.14; Wed, 20 Jul 2022 08:23:02 +0000 Received: from DM6NAM11FT031.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1b4:cafe::bf) by DM6PR02CA0123.outlook.office365.com (2603:10b6:5:1b4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18 via Frontend Transport; Wed, 20 Jul 2022 08:23:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.236) by DM6NAM11FT031.mail.protection.outlook.com (10.13.172.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5458.17 via Frontend Transport; Wed, 20 Jul 2022 08:23:01 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 20 Jul 2022 08:23:01 +0000 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Wed, 20 Jul 2022 01:22:59 -0700 From: Xueming Li To: Naga Harish K S V CC: , Jay Jayatheerthan , dpdk stable Subject: patch 'eventdev/eth_tx: fix adapter creation' has been queued to stable release 20.11.6 Date: Wed, 20 Jul 2022 11:20:42 +0300 Message-ID: <20220720082132.3954126-13-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220720082132.3954126-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> <20220720082132.3954126-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 90790062-7475-4d57-8e27-08da6a290fcb X-MS-TrafficTypeDiagnostic: IA1PR12MB6308:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?VelLcwr3nad5aBE/L79aCUwXIBNq/GAxPidSBx/yuEH0K4anMBJuvGcjLaLx?= =?us-ascii?Q?fqnJZn+kv4qwsTXfWmi4W3dODf2TPdU0XftR04no2km5KegAIHdwORpNWjK4?= =?us-ascii?Q?5HKC/VjAYsVKe0/hTU+dPlG7bQ8vjKjWmT3MPBdqmTg5l6q3sdnLLuOF2j1X?= =?us-ascii?Q?orPbXt9G3kKNrFDrGsVGtBHPyK3tVdJ6vF5CJU1ePTZeYHx7kF3apRW0w5hV?= =?us-ascii?Q?c4xRnrUN0CPZtw8F+dxmKy6xW5NV+EdEK2ijrYH5SGuZTZsnFtQe1Qa19I82?= =?us-ascii?Q?gezfEthPip4Nsx2EF16obllyQO1sYHPUwLzjtJDQ0BAvoVLPpJsGxZPpqmBx?= =?us-ascii?Q?+8CpsKVwMCF7wDWYhDz+L3+zdOFZwpB1Kj6NQZgMMYz7PLPa8EN9OniqFkWw?= =?us-ascii?Q?dYNRILUz3g6GJLRfWGJdk8KOhhAtNCZshqvpyW2pBgrMjG8ZKisUHWZQ4Y0d?= =?us-ascii?Q?0Z2CVxR8DO6stABI2Mmy14wIDtsubcA9od7QeEdc80gTkDbMBB3lNobIo+Jt?= =?us-ascii?Q?RsIwgujtHoaR8EXow4EkRviQ6bFMoJA+LZSy6Byakx1jPIAzpLPb+j9UqqW4?= =?us-ascii?Q?ic0nkGcKnhZLYiM/Pp92dLDSjIKqqeYRs410spg1uOQBzuo2YDf/mymB1XFk?= =?us-ascii?Q?Cv168BEogIbv+jeKjqQ6WK9wOB2XL2E2VgmbrlJU4U/2hlZJjuLEUFIaUJzi?= =?us-ascii?Q?fUT+BDs3q53yCReiXGO0+yiZGSguwOyNoRbgdKOBoBfVV0sXOZylWGnd/wNi?= =?us-ascii?Q?tvnlj/Jcq8bd0PGhac/2Frn4xaAROmkYifxiMpsliuZdwE6YxzEXRBcKQz4S?= =?us-ascii?Q?cZCSuxufLcDZE0IO0nhBlDgh9TSrCSuz7uQ0uVyjnpmCJ5YOlnUBcM/EwuLy?= =?us-ascii?Q?x1cTiVOZ71KJWneA66Z3zEX06dmp4n4VAcNit4b39hbwPScDmDnQ8pyvLSdP?= =?us-ascii?Q?KsNJ4VsAbHtGW0aCAarHeg=3D=3D?= X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(346002)(396003)(376002)(39860400002)(136003)(40470700004)(36840700001)(46966006)(82740400003)(36860700001)(83380400001)(2906002)(16526019)(7696005)(5660300002)(53546011)(186003)(70206006)(6666004)(316002)(47076005)(54906003)(426003)(4326008)(1076003)(966005)(40460700003)(86362001)(70586007)(6916009)(81166007)(26005)(356005)(8676002)(8936002)(40480700001)(336012)(36756003)(55016003)(6286002)(2616005)(82310400005)(478600001)(41300700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2022 08:23:01.6454 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 90790062-7475-4d57-8e27-08da6a290fcb X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT031.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6308 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/22/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/a6ae86b161dc19dbdfeecabb41c106c4214f79da Thanks. Xueming Li --- >From a6ae86b161dc19dbdfeecabb41c106c4214f79da Mon Sep 17 00:00:00 2001 From: Naga Harish K S V Date: Thu, 16 Jun 2022 10:44:58 +0530 Subject: [PATCH] eventdev/eth_tx: fix adapter creation Cc: Xueming Li [ upstream commit 3d6e9dd493784d077b9a214a0937331fa05f8abf ] 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" 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. Allocating the correct size of memory for txa_service_data_array prevents overwriting other memory areas like event port config memory. Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") Signed-off-by: Naga Harish K S V Acked-by: Jay Jayatheerthan --- lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c index 21155362f9..6474056c90 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c @@ -224,7 +224,7 @@ txa_service_data_init(void) if (txa_service_data_array == NULL) { txa_service_data_array = 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 == NULL) return -ENOMEM; -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-20 15:00:59.390457866 +0800 +++ 0013-eventdev-eth_tx-fix-adapter-creation.patch 2022-07-20 15:00:58.671000561 +0800 @@ -1 +1 @@ -From 3d6e9dd493784d077b9a214a0937331fa05f8abf Mon Sep 17 00:00:00 2001 +From a6ae86b161dc19dbdfeecabb41c106c4214f79da Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 3d6e9dd493784d077b9a214a0937331fa05f8abf ] @@ -22 +24,0 @@ -Cc: stable@dpdk.org @@ -27 +29 @@ - lib/eventdev/rte_event_eth_tx_adapter.c | 2 +- + lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +- @@ -30,4 +32,4 @@ -diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_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 +diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +index 21155362f9..6474056c90 100644 +--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c ++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c