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 A35C545ADC for ; Tue, 8 Oct 2024 02:47:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F79E4066C; Tue, 8 Oct 2024 02:47:07 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2058.outbound.protection.outlook.com [40.107.244.58]) by mails.dpdk.org (Postfix) with ESMTP id 8B4BC400D7; Tue, 8 Oct 2024 02:47:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dzCcYU8rtmdGpw28JP/hxYe85V9OGoSIzZrDTQkZQosmnYwTbSQkAEvN0vIBeQHdhEAEJDd+A12K49n7KOCUFVFzTVwL51T8hsijS5133UwAMUGzZsotHcpdqu1Vr4Ik7VTbqEHRXp/d3x1JuGH0kYxWJDkHLGqMvwMp4v+elWfzDZu2as6q7Y66cw3/2iocD7pUPisCem5rIDjrZ+ZEAVOZtDRc3FnjiPfS5P3wYGEMrzr5ALT8K1gHm8riS5C/D4OhxOkFQS3VyYJOWSZq1mknQAJsIi2J4/j7K8W0Qtti+9EX8qJqNrekZ4qiVUjQtynXEpSQlM7MDTl3fFMblw== 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=2zYKlVO48mlrQN0yk/3JiyeT5ekM/JoANz/HSmW8lRU=; b=qpB7c7BgZo4iSqAH3A1++MYQbM3mMcM21q5/xz0SBW9b6Lf8JugXfpG0k/maTFnK13Rxc5bPRIdmCmVLYvlnMsoyW1TApPl/tW8XJvNOY5w8Uoe0B2jcletm4tKzIau27K2fCrPvx648gBCloqtQ5c06d2SL3fwUQt2hc0AjIcjpoz+pqr5zPtZilm8G5Af2son/mnbITLt5NDz5juIscy/y+fKrcbOUfpxju3HGbejQXYR2AB3UM2aOXTTB27VD6NstQmW93jEVMuvWkxpoAU2BaBoy/gc1DkTt05U8SRjfmtGyEP6Rs+ljdcLrnCLJgLZ6WUVnmS8FYV5YYSb4dA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2zYKlVO48mlrQN0yk/3JiyeT5ekM/JoANz/HSmW8lRU=; b=VtKAiRB6wlvRQki703bxwYZKCgq0cPvSn6vuy74asaI2pWjP5YJE9HBUqOkAJjfkw2hqUbxDKbo1Jzm7DMLK5QtYcWr5kDGFowe+UdIsv12CHX8bHYI4TQP2Olftj2gcnznzNIXNBOKoD13q4BzwLPcypkZwGvf1Z7SwdrZAEag= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SJ2PR12MB8830.namprd12.prod.outlook.com (2603:10b6:a03:4d0::9) by SJ0PR12MB6880.namprd12.prod.outlook.com (2603:10b6:a03:485::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23; Tue, 8 Oct 2024 00:47:00 +0000 Received: from SJ2PR12MB8830.namprd12.prod.outlook.com ([fe80::c3eb:df02:eaa9:2055]) by SJ2PR12MB8830.namprd12.prod.outlook.com ([fe80::c3eb:df02:eaa9:2055%4]) with mapi id 15.20.8026.020; Tue, 8 Oct 2024 00:47:00 +0000 Message-ID: <714c4d8b-c083-4b10-8bd6-dc887f025daa@amd.com> Date: Tue, 8 Oct 2024 01:46:54 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net/gve: fix refill logic causing memory corruption To: Joshua Washington , Jeroen de Borst , Rushil Gupta , Junfeng Guo Cc: dev@dpdk.org, stable@dpdk.org, Praveen Kaligineedi References: <20241004010518.238331-1-joshwash@google.com> Content-Language: en-US From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6BQJk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dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20241004010518.238331-1-joshwash@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0480.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::36) To SJ2PR12MB8830.namprd12.prod.outlook.com (2603:10b6:a03:4d0::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR12MB8830:EE_|SJ0PR12MB6880:EE_ X-MS-Office365-Filtering-Correlation-Id: 93233d7d-b1f2-427f-cfc5-08dce732b803 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?WDZQc3dLSnFOZTYwOEx3RllFRU5qeUdMdndtQXhnSWYrRkh1em5zeURodHQ5?= =?utf-8?B?UUE1UVl4VngzKzN6YXRCVGcvdmM3MURPem83L1JZekZwdUVYdFg0V2hkbkE0?= =?utf-8?B?VFptdTB4VEhTeVNSZS9HSmI4em9ObEl0Vm1lcWpweUduN3RMY05zbm5VU3Fx?= =?utf-8?B?WE5sSmp2SzkyOEdYUDFRTXR2Z3Q4a1FoQnJ1cDdWcHliVHYxcWtRNkUxT0VR?= =?utf-8?B?eURnbnZzbURvQWZWK3puTm1CL0pocnIyNWhteVd2SHNBWGJDYU4wdEx4MWVs?= =?utf-8?B?L1pzNFJIcFU3N1RWbVByV0FRbW5LVlR0L1phOUxyT1RJbTBZTkF6YVJTMitm?= =?utf-8?B?TURqQ3JiV0lxUjd5WVJva3VIenVBQm1aYUROVEZ2eFVWMk9EeFp3TmkxK3Vx?= =?utf-8?B?dW9wN0dzbHkyZlpHd3o5ajV4OWkrZmptVlVVeSt2alV6Qkhmb0hWbkZiRkdZ?= =?utf-8?B?Tk1NT3FaR1E4WFR4TEtRdDJKS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l5ZndVUDFPQWpJeGlBeTNMQW9wdkIxWXN3bDV1Y2hkSFhQ?= =?utf-8?B?ejhQQ0pSeEhRcjc1S3pBMndtOEtsS0Z1T1lqMVFTWGYwVTdtUEtRTTNJUk5E?= =?utf-8?B?V3ZKMVlCK0hoamN1VGtSWUlLV3d3S2hrcjlDajVUc2FSZWlZL0Z6T2pPRW4z?= =?utf-8?B?WjZSZ0pacmppTU9HZkdLVUxhT3l2ODd2T1RicG1RaVhvUU9GN1JENWNwTjZ4?= =?utf-8?B?OCsvQVJPd1VLWlRVSmptaFFFL0VWdzdCZC9xM1N1dlRpVllaVVpYWHk5RTRB?= =?utf-8?B?SmhGUUNwcVg1VGJSdWdUQmZySWdMVy82QjRZeHZaNXNHWUprN2hzajFRPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ2PR12MB8830.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SEw2VHVqVFVsc3cxSStCVVNFM0JvV2FGcnBTQU83Q1JWeW1VV1lCdEthVjlk?= =?utf-8?B?ZXlsVzg1Qkt0a0dicFVuSjZiM2NJNkp4TjFBdldWUnJsYmJOMk1lRUtUWnIz?= =?utf-8?B?ank5UThuRGVLT005dW4zSUFaR2doTUxQMGdrNWNtMm1Md3hQSWNyNFFseXV5?= =?utf-8?B?MUtrcEFlR1F4ZTQyL3pqaWFCYUZ2SEdkMldsOWlBTFFlMTM0N2M1UFNFSmpE?= =?utf-8?B?bm1qMUJVTEZQbEk2TFluRDBYMEVHcXJRWHArU29pSjBPVlUwamlsVG9URHBv?= =?utf-8?B?aVNhcUwxOStGclcyUlJPdml0V2I3UWsxUEJqdmxYcFFmMkEzT0dyZW80Snpn?= =?utf-8?B?VnZTZ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S-Exchange-CrossTenant-Network-Message-Id: 93233d7d-b1f2-427f-cfc5-08dce732b803 X-MS-Exchange-CrossTenant-AuthSource: SJ2PR12MB8830.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2024 00:47:00.3627 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: A9Aejh66G2AEaNjuVxgzBPedMEOv8IgfaS7VtTJa7EoQc2rrE6EGmYgYTEXqm6Gd X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6880 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 On 10/4/2024 2:05 AM, Joshua Washington wrote: > There is a seemingly mundane error in the RX refill path which can lead > to major issues and ultimately program crashing. > > This error occurs as part of an edge case where the exact number of > buffers the refill causes the ring to wrap around to 0. The current > refill logic is split into two conditions: first, when the number of > buffers to refill is greater than the number of buffers left in the ring > before wraparound occurs; second, when the opposite is true, and there > are enough buffers before wraparound to refill all buffers. > > In this edge case, the first condition erroneously uses a (<) condition > to decide whether to wrap around, when it should have been (<=). In that > case, the second condition would run and the tail pointer would be set > to an invalid value (RING_SIZE). This causes a number of cascading > failures. > > 1. The first issue rather mundane in that rxq->bufq_tail == RING_SIZE at > the end of the refill, this will correct itself on the next refill > without any sort of memory leak or courrption; > 2. The second failure is that the head pointer would end up overrunning > the tail because the last buffer that is refilled is refilled at > sw_ring[RING_SIZE] instead of sw_ring[0]. This would cause the driver > to give the application a stale mbuf, one that has been potentially > freed or is otherwise stale; > 3. The third failure comes from the fact that the software ring is being > overrun. Because we directly use the sw_ring pointer to refill > buffers, when sw_ring[RING_SIZE] is filled, a buffer overflow occurs. > The overwritten data has the potential to be important data, and this > can potentially cause the program to crash outright. > > This patch fixes the refill bug while greatly simplifying the logic so > that it is much less error-prone. > > Fixes: 45da16b5b181 ("net/gve: support basic Rx data path for DQO") > Cc: junfeng.guo@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Joshua Washington > Reviewed-by: Rushil Gupta > Reviewed-by: Praveen Kaligineedi > Applied to dpdk-next-net/main, thanks.