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 8186BA0548 for ; Sun, 28 Nov 2021 15:58:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77C484068A; Sun, 28 Nov 2021 15:58:03 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2065.outbound.protection.outlook.com [40.107.94.65]) by mails.dpdk.org (Postfix) with ESMTP id 74B0D42749 for ; Sun, 28 Nov 2021 15:58:02 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YZ7rZOqh1zfwequDG3d8t0Lcpk7AcYUVFCHPqIBg/qX0IAOdZk8XZm5lNLN+cKc7gP8V0l0CNk9L5abn/sUs+p1w2T8iDp47iC4du/0q5NmB7ZWbc80LG/xG2NR1qVRXJiR+PhN73T9IBvcqwyiME3k757VMvFGRTxaIBxlZ6Z8N76f7IO3gq8Xfbc0yPjNpaQcV75fzIo7QJtZfhR3MWbZnjKpOQDQa9d57XSnteBJPMIEV3tNuNKuO3KtyD7FTzPingc6vaI9uyuFuaL/RKg//6MCCwqfCWEdStp2KxnmsttX2JEJo70WCaZe0pAJBagEny+eT0+BXvMriO5vXFA== 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=SJNqzMVERSCdLtrWmJeB6Av+sH250FQcBLqCzN2h0pU=; b=DrikhZxJptV0VJ+d44o50cXfKDykOgpr1uSbpUN2/yy6g1ySLYgfRPJGZyEXH2xlVhAJ8GOhXQUGBGvowGHFlly/NzDisQcFmklT2l8rtrQSzT6VcTNryy+wuD/e4ZMWe9PNZtcgwBKIBwgXcqJUWDBmIgpCLGpZZcLGCzIZhs12hT2jyTL58Vgfo++VBOUumtxl9Vq6QeS9aueoA3y+todhU1wj+DY5A8splQU80hbBHWZeTDoAbZ2cXbNpbVVjyOAmQR6PjnkabudaESPHn8EU2FUJzFv3pBddj7Z1I81W4lA0ARIXoA/Tu89h28etD5yi4QQ9goOvRMrK3knPaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=SJNqzMVERSCdLtrWmJeB6Av+sH250FQcBLqCzN2h0pU=; b=nr69ZEHLltpqLKAO40Spfo6I5TBx3bJDBUgcKJle/Y/9QOr26nJFF5A5ufLP5gJs3AliFNeYsdmerBCJPFkj4FywMp4ChIQbE2NgzkM1/l89BdzrxR+AFPbGc79IjMXpKU7LOGDo0YGMLsF7+XC6WeK4FQAsfvSFDvxUsAvNdlsakNOK9blB0twjfC5oGrogX29KjumlnyUBE/qHc0o1DOWqgBWvDGlZ6GGwZfdDNiBeeh8JYDUPWJ4QUU9k4JjOcr4cmTmC0dMNO+r0ks0d9parXh18KIORjVg1/qKy1zUvHypUf3McPuJ3jTFztKtM+beHarLovjbDg09t0Ye85w== Received: from DM6PR18CA0034.namprd18.prod.outlook.com (2603:10b6:5:15b::47) by CY4PR1201MB0182.namprd12.prod.outlook.com (2603:10b6:910:18::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.22; Sun, 28 Nov 2021 14:57:59 +0000 Received: from DM6NAM11FT011.eop-nam11.prod.protection.outlook.com (2603:10b6:5:15b:cafe::c4) by DM6PR18CA0034.outlook.office365.com (2603:10b6:5:15b::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.22 via Frontend Transport; Sun, 28 Nov 2021 14:57:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT011.mail.protection.outlook.com (10.13.172.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4734.22 via Frontend Transport; Sun, 28 Nov 2021 14:57:59 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 28 Nov 2021 14:57:57 +0000 From: Xueming Li To: Naga Harish K S V CC: Luca Boccassi , Jay Jayatheerthan , David Marchand , dpdk stable Subject: patch 'eventdev/eth_tx: fix queue delete logic' has been queued to stable release 20.11.4 Date: Sun, 28 Nov 2021 22:53:33 +0800 Message-ID: <20211128145423.3974892-30-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211128145423.3974892-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> <20211128145423.3974892-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 64d99f94-c84c-43e2-8fb0-08d9b27f77f1 X-MS-TrafficTypeDiagnostic: CY4PR1201MB0182: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dzMq6XDmZdfDJzTFQZIyPrNpsF4o8zad1y+AYm3qBUNLqgEyKE21/XeAzwGsMXhMS4ZVAzFF/TwzBfMfcN+KUWwcE0GhsnHTMRGJAsYWUc0YHxcIJkY2gldsz/Fl4tGi9ggUbWpu76RuCOxmP/nSq3b2rOpy05v62YyatNAXZs6badRgLU8lXFUhvwInthQViJAoz+jTv1uvZW5qTAcSSuW+AcJEzucsEdnridRv66Mi3AbPPCauabVuprsK3DUStIcdxJ/2lI7KA/Ve7nkQnDnYXm6wxQu0RvILe1HDFS2XPQNM4worrYtwAebNXsfhfDQSTYXoLOIvZfCTuwvSB2W/eu5dRIOORHPivMvmyT4jkGnIjEp3sN3CTr1wIjhPSgJQB1lCod7pY4Xl0n+SorOVHWSgDJirlaqKudlr1efc3vyEOt9w2RB5RJWyHYK3F/B9GvnJnTqfaF1kUH8GHqD9H5o5dOmUFuTChMsDGCsZcGaGgVHRtopRZeVO2oFKMT2e7PXKz1fluizcKsk1S6m96c+oysJFhcoD+0y0Z9tLzUP7UjjGWSmnvn5CT+MGpv37tH95okJH3F1pWee+Z9F3hxe5QiWFIfuBzXpomAnLWmbO1RWNguy2cLKAPAiOwYMYKivmHJhF5RIFr5f8bsYBJwk5m4hZrJeN/46ujaswgmspQErRP8M5ZihMFMZnd/811FVKy1teDl0lz+k5rGpxt7WI/6aU9pRGiP5ZHAl/irKUBna/zp9HdWzlENib0u19+OUlAvIIlIRlt9dmAQfMTX9rsrNM+FYS61Q1ggXmoEK9dCDX2qD3UbnbuJaiV1VmL/Ezap5+eL4puXJH4g== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(36756003)(8676002)(7636003)(7696005)(2906002)(70586007)(2616005)(186003)(36860700001)(16526019)(6286002)(316002)(86362001)(55016003)(966005)(83380400001)(5660300002)(336012)(356005)(26005)(6666004)(4001150100001)(426003)(82310400004)(70206006)(6916009)(53546011)(8936002)(47076005)(508600001)(4326008)(54906003)(1076003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2021 14:57:59.1476 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 64d99f94-c84c-43e2-8fb0-08d9b27f77f1 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT011.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0182 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.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/21. 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/4f17d46380ff62b353e1d08cf15754239009ab4e Thanks. Xueming Li --- >From 4f17d46380ff62b353e1d08cf15754239009ab4e Mon Sep 17 00:00:00 2001 From: Naga Harish K S V Date: Tue, 9 Nov 2021 01:33:33 -0600 Subject: [PATCH] eventdev/eth_tx: fix queue delete logic Cc: Xueming Li [ upstream commit 741b499e6421ff93542d17c57f536b9d8e9bb443 ] This patch fixes heap-use-after-free reported by ASan. The application can use the queue_id as `-1` to delete all the queues of the eth_device that are added to tx_adapter instance. In above case, the queue_del API is trying to use number of queues from adapter level instead of eth_device queues. When there are queues added from multiple eth devices, it will result in heap-use-after-free as reported by ASAN. This patch fixes the queue_del API to use correct number of queues. Bugzilla ID: 869 Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") Signed-off-by: Naga Harish K S V Acked-by: Jay Jayatheerthan Tested-by: David Marchand --- 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 a122750fd9..2684eb4308 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c @@ -818,7 +818,7 @@ txa_service_queue_del(uint8_t id, uint16_t i, q, nb_queues; int ret = 0; - nb_queues = txa->nb_queues; + nb_queues = txa->txa_ethdev[port_id].nb_queues; if (nb_queues == 0) return 0; -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-28 22:41:04.907296563 +0800 +++ 0029-eventdev-eth_tx-fix-queue-delete-logic.patch 2021-11-28 22:41:03.243542368 +0800 @@ -1 +1 @@ -From 741b499e6421ff93542d17c57f536b9d8e9bb443 Mon Sep 17 00:00:00 2001 +From 4f17d46380ff62b353e1d08cf15754239009ab4e Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 741b499e6421ff93542d17c57f536b9d8e9bb443 ] @@ -21 +23,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,5 +32,5 @@ -diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c -index da55d2c2dc..c17f33f098 100644 ---- a/lib/eventdev/rte_event_eth_tx_adapter.c -+++ b/lib/eventdev/rte_event_eth_tx_adapter.c -@@ -864,7 +864,7 @@ txa_service_queue_del(uint8_t id, +diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +index a122750fd9..2684eb4308 100644 +--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c ++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +@@ -818,7 +818,7 @@ txa_service_queue_del(uint8_t id,