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 229AF45CF7; Wed, 13 Nov 2024 14:38:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1180F40673; Wed, 13 Nov 2024 14:38:33 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2060.outbound.protection.outlook.com [40.107.93.60]) by mails.dpdk.org (Postfix) with ESMTP id 4E6CC4021E; Wed, 13 Nov 2024 14:38:31 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AZTcn/7xFT4CjccMAXL4Yc+QGiL0COG7UvhuWP0AiT6AQN6+ibFWHhql3xntbZryIdbvu6BHrq1qKY6WfmZC6ayZvk8QVafJySgVYaVZd+JmrcUSJsJKUfHysn7j5rH7e0KURwaZO2vLffPeJIuedffO3uH+KGzRwdwThCRC1kb0GHTScvmRlzj8jTGtymEXng2dFZLru7Un5BXgXIf9Qa7ZKORc9o57JFKIcMTFt5yjS4U6J5x/BL4XgRNKu9FWHOYS30P8aUZ4Kn1Ygzo68NHXV7UlIzYs8bxntBHeUOqQewEFpCuvEwOHmxktl8+4EDLbbvjLnHIQmPOWtEejBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=ymSnuGvBN9BbqntrlWO/7MUq7zNSxj/icmO7H8Fhkls=; b=QdVK6rxJsr/FshoUnfijpdgyvQQBYDKZ9mLd2ZI+ZGAiEdY3UM4a5pENOs3JKbEw/T3gdYyMylCdqrGoczf98e3WjNv/hFAns5YEs1iRsEZneY6AxW3Kn3LXc1TEbt8pIhSi2PmFMQ7QdAqrSkJUOarxIJ36bWtR4aYNbD4bt420gtGwe9uASuk1VXqoESKL4wUus/Js1jGGyvfs9IpUVF4z24iD6rqE4pekXGpQhPsyrvkN53lrkN2/YRm7TVEFz6a4y9cPtMdaUIabZebbKpnh/33sHlYa0t8NqLZmZ7FUjt51wWtZZZ7SE9yicHJgWvQZVNki8xEJtN/tDngCJQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; 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=ymSnuGvBN9BbqntrlWO/7MUq7zNSxj/icmO7H8Fhkls=; b=eB5K03KG1jnS26MJzFJ/bl5edsga4e3Yp2zH75B+DjPDhbRz93znnUvmMyvVKYOLZ3kC0JmbRHHIbrIaKEwLqC3e5yPHFVYSIMx1/PKwdsQaiJhe9Y2xdG2ctQtbbNsw9gWKnei8occPTyFHHi0Zv8+h+K7K5im31KzdTp4fc/8Fn8rHQvd90q8zVkq+KO9HH41TUhLT3BLcqhzzB9mr1GZgxrDIohvig8gIjSJijuqkys/JICVzqId0OPEYL6kasrY1KrfWIKwWSYCBWaSbKkwMr+AcIJCZMtjxiYVEgjjB5u0AIsZ+kwwYE5Z86MPPopJy9p/1aMuFV/BdiaV9fQ== Received: from DM4PR12MB8452.namprd12.prod.outlook.com (2603:10b6:8:184::18) by PH8PR12MB7376.namprd12.prod.outlook.com (2603:10b6:510:214::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.16; Wed, 13 Nov 2024 13:38:28 +0000 Received: from DM4PR12MB8452.namprd12.prod.outlook.com ([fe80::b341:6309:cb1f:5b6a]) by DM4PR12MB8452.namprd12.prod.outlook.com ([fe80::b341:6309:cb1f:5b6a%4]) with mapi id 15.20.8137.027; Wed, 13 Nov 2024 13:38:28 +0000 From: Raslan Darawsheh To: Bing Zhao , Dariusz Sosnowski , Slava Ovsiienko , "dev@dpdk.org" CC: Ori Kam , Suanming Mou , Matan Azrad , "stable@dpdk.org" Subject: Re: [PATCH] net/mlx5: fix the Rx queue control management Thread-Topic: [PATCH] net/mlx5: fix the Rx queue control management Thread-Index: AQHbLtTi84NGf1NsYUKkqBwzjhtbC7K1ROWo Date: Wed, 13 Nov 2024 13:38:27 +0000 Message-ID: References: <20241104161541.255086-1-bingz@nvidia.com> In-Reply-To: <20241104161541.255086-1-bingz@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR12MB8452:EE_|PH8PR12MB7376:EE_ x-ms-office365-filtering-correlation-id: 06b972b4-7b36-4a66-e282-08dd03e87493 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|376014|366016|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?Q?fBMpQ3qLpGsxi5pOP7fkZBQXSNG3ly13oWhb7FWhlE1KNlc4s4hKP5tPbb?= =?iso-8859-1?Q?7YqZK+gjXYO4NgXyyAefZBVxxGk6CIauMuJr6spUkminyeto+1/26HiBUZ?= =?iso-8859-1?Q?Mq/e3Xw6kqLoY09nm1jvr/m3ZdFFIHTo6XeeHKS6h1PaQU4TAC3NggZL0A?= =?iso-8859-1?Q?gkJ8r85XeTjhBhTkaaH0S6j3xAYcXpYSw5/v7BKTDSuWIG1ZTSulwDYkZr?= =?iso-8859-1?Q?/ft96OtgajrS9OzYxVR50b/KChBMdStTljOtPNm8QgGsJ5ZmwgEMvr1RjX?= =?iso-8859-1?Q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otHlyGPsm835piv?= =?iso-8859-1?Q?L6UgMNgqQ1tv/XbepC5nkL4ZzZnoT6VBjM6sh5824lLT9jihRN/Fv5f5jx?= =?iso-8859-1?Q?Tk24LRN+Kmk9sbBP4lt2HWsuDWAfOY18DLSEXgNX1y3fRKzFERxjiJBrmE?= =?iso-8859-1?Q?2CEsW870H3SVclPC931JhYdKLhThVg+Qw+0kZJGYcSaaKchC/3LrDJM0ra?= =?iso-8859-1?Q?WhEuT/+ATVbszLpyjNo7geJYfEPw3byKAZbUWo7pv/RdxjVNkbFVk=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB8452.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?tnVDvZjNR9a9TEkdPe++YobSBqhweQVZo+5EVRFCxY3d+S6NUSI+o8Ap9I?= =?iso-8859-1?Q?nk3g9r41vtBUkouZLmhMy1bu5aE2FmMdiSQ3il/aSpqIgo4kUsEtCNghic?= =?iso-8859-1?Q?HdpLs5yBA8MUd5A6O26LgPrYHDEzIgejdAHOm2vmK0iVqZnGuqa55k8vU6?= =?iso-8859-1?Q?WuxBAOWP9T8KKpvqT4C1p/3/xfO03aJ6jxJ7AyOesQWM6WcDlCHVrG0ezr?= =?iso-8859-1?Q?qlBSHQ2hC1nbkdBOg0/6xESSXZ7iXz10b6skP5vLE/1bCxrT+rpwGOXUpf?= =?iso-8859-1?Q?wARytctQmzJlV6PxKAovoRzBxjrXrY2XzbRS65QJiuZjfT89Dm8seB0zuk?= =?iso-8859-1?Q?OX2+KXLSpsDThh372KG7hG9n0QjbNYnMZAY5QXPKNTdtlhy+NWVFFOqZ/s?= =?iso-8859-1?Q?/Iw9hlDZz+atjhspcfD5pUP5UoFhscGtG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-8859-1?Q?CqTlw6RgZF+puCHylbrKQ1w4RiewHvkU2ad5+XmIZ5wxEOqIdCAX7102By?= =?iso-8859-1?Q?68pskhJD//txp1WhrRAugSSgCyOirWfIjdl6HLTxbIZRDGpJWuHwimq2xn?= =?iso-8859-1?Q?FcdhiI9dwns8uAARTfkQ6eL5LOiXWfSsFcSVwasfrBeBDcHLydVvixGO4X?= =?iso-8859-1?Q?OgDJz2g4g+2xzQwqFTWJfCx4dw/wYPqt71ULnR4a8x0h6zn3A2D6Yud9nk?= =?iso-8859-1?Q?CPvbirSI2Bft4jXb3ngXBN6XG6ej1m5n+cKQOESquU9oLgPFzqqaaHW4ai?= =?iso-8859-1?Q?MOi0YR17wsJW0=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB8452.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06b972b4-7b36-4a66-e282-08dd03e87493 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Nov 2024 13:38:27.9148 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fCtZiJOFnY9MX541my1T3Xh6g88Tthjtw4H57VUYBef/JxAg3cvFU5fyeKspSl2kyCpEjk5xP0jqleHJhPAmsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7376 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 Hi,=0A= =0A= From: Bing Zhao =0A= Sent: Monday, November 4, 2024 6:15 PM=0A= To: Dariusz Sosnowski; Slava Ovsiienko; dev@dpdk.org; Raslan Darawsheh=0A= Cc: Ori Kam; Suanming Mou; Matan Azrad; stable@dpdk.org=0A= Subject: [PATCH] net/mlx5: fix the Rx queue control management=0A= =0A= With the shared Rx queue feature introduced, the control and private=0A= Rx queue structures are decoupled, each control structure can be=0A= shared for multiple queue for all representors inside a domain.=0A= =0A= So it should be only managed by the shared context instead of any=0A= private data of each device. The previous workaround is using a flag=0A= to check the owner (allocator) of the structure and handle it only=0A= on that device closing stage.=0A= =0A= A proper formal solution is to add a reference count for each control=0A= structure and only free the structure when there is no reference to=0A= it to get rid of the UAF issue.=0A= =0A= Fixes: f957ac996435 ("net/mlx5: workaround list management of Rx queue cont= rol")=0A= Fixes: bcc220cb57d7 ("net/mlx5: fix shared Rx queue list management")=0A= CC: stable@dpdk.org=0A= =0A= Signed-off-by: Bing Zhao =0A= Acked-by: Viacheslav Ovsiienko =0A= Acked-by: Dariusz Sosnowski =0A= =0A= Patch applied to next-net-mlx,=0A= =0A= Kindest regards,=0A= Raslan Darawsheh=0A= =0A=