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 03736A0543 for ; Tue, 21 Jun 2022 10:05:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F285D40151; Tue, 21 Jun 2022 10:05:55 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2083.outbound.protection.outlook.com [40.107.243.83]) by mails.dpdk.org (Postfix) with ESMTP id C963940151 for ; Tue, 21 Jun 2022 10:05:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=meZcRURL5E2vjGnisBd9Ndx0QK4IPkyRN9rhVOAWggikK9uPVfqSR6Lc7EoC0xLUTLQ8lREvLqyxWbJzzlyP2I+Dn3UF6y9grPYNm/vy2cO5rX512v8eo6SRyMH7c9uhxxhc2Ct8pZjfT5LgWRJp8nRUXgCMQwFFXH9yr2ESn4eOD1lJn0CHAwAOgmOVLzQD0KllCQpetrY9nCbaNsFgysk6ocNy9SstUU2JP6qvyD7r3zbWOAfWqaQHD95k2zcaHjFgF7OE9JLYO3ZzvHnJRN6wiIOqCOlvYoiWFVFrNFlo/z3GIH/5Ldiw3/0Goz+crLnhMNikPickv70V6ly3gA== 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=ROjo0Ne9fHd1pRLS5AB9sKmFwl+toHGfFJn2b1spWJ0=; b=i0RPrCTY/kxrrvydpt/zV9K+uTPlpb0haxB2F/DJwUPwhnrkkf6YfGpVaFmAIJxNV/mYboGCSTVsCafvauZ9FTXtJkvPHuBBZWdRF/BPntW8qWp4BJoLDwGcV4SJaPva0S2iaY8XceF1VuvokC2qN/alO1S3TPO1wbPaH0B8jAJXzAauQfx9wWnwgGF1qxWCm7zlCnfQ7LKIx7NkOAHN0s3LeWTQ9QjNMO02oLgFysgiQCV9Q/F3h3e4CEg+r3W0B2IHEm9nGU0oi6X0LeEswN3CTwRtsI+LTPP3nNenfV29M4uSXh88H+B81qela3jPGbDocEwfc/htZRd5awsC5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) 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=ROjo0Ne9fHd1pRLS5AB9sKmFwl+toHGfFJn2b1spWJ0=; b=pPMYHktUTDM4fHN9dXlC5B4uaoWWBltI3unIcOUcXeoLdJas6IvlJAgJUoCDePYaOSLR5flE2GTafoX2AOEzJvW3uCh7oIdpoh2EgDhtzQ9V7ze/XcAmZRHHduicdb5WYKhyFvej9zdY3NL1NMI6pdgNzV8CBlKd1fpNy9Dqt1h0Tr50HFEHWVvDnZG3h405V6WTNRhdMSY9TWDBcKyO/8ngo2ezkysRJtdhFDeECdS2a4DGJkPiBDwOperG1AhNk5+dI0UYEMDtZb+3x6n3OzPetHNhW9FIVUXyvUFTZ8TArBaWf3gMhisMTPiKE51hZIaBNUTehTE7GfzP/OkNfA== Received: from DS7PR05CA0043.namprd05.prod.outlook.com (2603:10b6:8:2f::22) by CY5PR12MB6429.namprd12.prod.outlook.com (2603:10b6:930:3b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Tue, 21 Jun 2022 08:05:53 +0000 Received: from DM6NAM11FT005.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2f:cafe::83) by DS7PR05CA0043.outlook.office365.com (2603:10b6:8:2f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.9 via Frontend Transport; Tue, 21 Jun 2022 08:05:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.238) by DM6NAM11FT005.mail.protection.outlook.com (10.13.172.238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:05:53 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:05:52 +0000 Received: from nvidia.com (10.126.230.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.22; Tue, 21 Jun 2022 01:05:50 -0700 From: Xueming Li To: Maxime Coquelin CC: David Marchand , dpdk stable Subject: patch 'vhost: fix missing virtqueue lock protection' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:01:36 +0300 Message-ID: <20220621080301.2315720-31-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.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: d1ac731d-dc53-46c0-a936-08da535cdcd2 X-MS-TrafficTypeDiagnostic: CY5PR12MB6429: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: UZEAqhyKrS2SbWSZCTUgPmz5X6geQyTK+YnjFHPN09Bll8RlnR+JUc32YoI5dh7w+f4pHr+L8XH4V+duC/zrdFr5uhJenjwA7ersGAXBzYom+3OgEamANrz9Zv8GddXCNA12EnJ5lUuBtbRkE0u7MpqTQAT0a5Pe99zHyGIIOrad+rD3V0RxdxIq4yKxyGVYUWyTS0Oe6GZsG6dS1Bf8rsV1sDx+SxHi2sveDZur308IxxwQ/7EsAPqFtWUDNtt6iMo1Sykd0lj6jJWDud6rec5sKRUaR13MnmqkjIH+LEa5yfnMaXVsjMoR8lkRsajbh4WtcbTw2arEiRScF/V50NW0RepsdSH9UYaOfCIK2x1OHAqV7AINPNsJpcVDgVTlLyeKBb9Nuq+ClhCLelYKvV7qTryEKKXw9XtV+D+IfB/D2TU1P7sD9e9fFHEW1fT6kvN4Ynw7Uezn+5dlJpukRk5bp/CFyRZyYYXQjsa+08Wr1IBRsxCrS4cZH61AcPr6pcioKuMKTQpsSqZdxesJR3kyQ6xJfs+yYqVDtqC/J2fcDFyhYLQNtkK5nQgz+vpdF4qpLXpZ4h12HvQICYK3M+KoHWuL7AGKjiSLWaHxAPu05OthR8lp/40OYADuxqIRY+kSi4AXTHVbZeALCJqagpUHXPVBaT7atJUmPKGbKqn71givNn05U/+mze+PbcGC4EUbYm8lY+l7aaH3RpkKAXO+YkFr4POmjqap98A9nExT9z/G1RbaKWGm1iFUrYgq6MP4+VqTEpaZH1e0YbfICwhWT/dX9idH462XCF1Lstdia+vnVRAmCQl2ox4l0g4qa04blsAKKf7PPi8Pl53yHPr6EFlO61xY8lPxqcYAM7s= X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(396003)(136003)(346002)(39860400002)(376002)(40470700004)(36840700001)(46966006)(6286002)(40480700001)(1076003)(82310400005)(5660300002)(82740400003)(6666004)(16526019)(86362001)(8936002)(47076005)(8676002)(40460700003)(2906002)(70206006)(316002)(83380400001)(53546011)(6916009)(54906003)(336012)(81166007)(4326008)(55016003)(478600001)(41300700001)(7696005)(356005)(70586007)(966005)(26005)(36756003)(36860700001)(186003)(426003)(2616005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:05:53.2142 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d1ac731d-dc53-46c0-a936-08da535cdcd2 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.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT005.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6429 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 06/23/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/3763af6f3ee69851064034bb9c052893a2f9cdd5 Thanks. Xueming Li --- >From 3763af6f3ee69851064034bb9c052893a2f9cdd5 Mon Sep 17 00:00:00 2001 From: Maxime Coquelin Date: Thu, 24 Mar 2022 13:46:34 +0100 Subject: [PATCH] vhost: fix missing virtqueue lock protection Cc: Xueming Li [ upstream commit c5736998305def298e26f8fa73b9995f184fc983 ] This patch ensures virtqueue metadata are not being modified while rte_vhost_vring_call() is executed. Fixes: 6c299bb7322f ("vhost: introduce vring call API") Signed-off-by: Maxime Coquelin Reviewed-by: David Marchand --- lib/librte_vhost/vhost.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index 1a7c240492..e76929d81b 100644 --- a/lib/librte_vhost/vhost.c +++ b/lib/librte_vhost/vhost.c @@ -1265,11 +1265,15 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx) if (!vq) return -1; + rte_spinlock_lock(&vq->access_lock); + if (vq_is_packed(dev)) vhost_vring_call_packed(dev, vq); else vhost_vring_call_split(dev, vq); + rte_spinlock_unlock(&vq->access_lock); + return 0; } -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:50.698252861 +0800 +++ 0030-vhost-fix-missing-virtqueue-lock-protection.patch 2022-06-21 15:37:49.007784479 +0800 @@ -1 +1 @@ -From c5736998305def298e26f8fa73b9995f184fc983 Mon Sep 17 00:00:00 2001 +From 3763af6f3ee69851064034bb9c052893a2f9cdd5 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit c5736998305def298e26f8fa73b9995f184fc983 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -15 +17 @@ - lib/vhost/vhost.c | 4 ++++ + lib/librte_vhost/vhost.c | 4 ++++ @@ -18,5 +20,5 @@ -diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c -index cf4bac277a..df0bb9d043 100644 ---- a/lib/vhost/vhost.c -+++ b/lib/vhost/vhost.c -@@ -1291,11 +1291,15 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx) +diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c +index 1a7c240492..e76929d81b 100644 +--- a/lib/librte_vhost/vhost.c ++++ b/lib/librte_vhost/vhost.c +@@ -1265,11 +1265,15 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)