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 1B94845655 for ; Fri, 19 Jul 2024 11:11:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F6C340E20; Fri, 19 Jul 2024 11:11:02 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2086.outbound.protection.outlook.com [40.107.223.86]) by mails.dpdk.org (Postfix) with ESMTP id 25AE5402B8; Fri, 19 Jul 2024 11:03:15 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jFF88cLcgTKO+hnC+iZx+Rrj+akAE8B00pCDb0CHnTHNy5XBoucJrfl4bThN9JN1slmf0BLqH3kgfCBNWOzu+okaR918KXNM0riIDo2t047oCBAH1HTmohsrTBksQnzL2EyntWq91f3xiEJcvsvGW8TX3UEoi/8du2sEOxPFCfZipAgCSnN91qz70z0kDjqrTCiDc5mx1DgX/ApKTXWNYbdmDRcBr2DnQQTPEoe5izuCUS9YG00XctVzs95TtjV5veEeZP3rTZHZs4QAzVLHvyBNvKq/wmtTygQpfBNe2n7VXnwl2jjKMCqmrhQBSXGQ9blutXlRAQvs4jo4I4iyaA== 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=2pVwR5G+HY2dZXzT0NO76Rnq8BxhUhZktDKHL8FEWPM=; b=CcW9mpJt2VFwH06H48qHbRf7197JKCYhzGfn7amPOOV/udyqFUuMHlw8pyeJyJGQx4btKl+qlDEpTLrZ/SZrZJrf5wd1jn+5l3XpAYGCJ/6XOg3KMdL12e4+RGSL+p6AVtnSoEip6T0LdGLsbyZfRxkTYLH6bgGjR8xb45+aVqMzNFz1FvZnPdhOO7y3vk0/LKEOFZb5IFxgoIZrY90yx6BOjJuGiyMqKx1N0NSZUPrmzbZsE7s93hUy/GEdPCTgBeCEl/12dHW7zjD78thJKtdv0Px2zMQy5+1fe5te5/DuTlkGv1ckD4XkH09oCIkoZ1smL7EBgMVop68WPMagtQ== 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=2pVwR5G+HY2dZXzT0NO76Rnq8BxhUhZktDKHL8FEWPM=; b=42h/doWjFhcLM7bJ9VsszCHbH9eTWs3brEr/AcbrMFFidMB5WUY3YwgQ9Hsoe+4u9R62pd/F9bACCe8y5NH/k8usDpv+Av5T1IRCNAoEN9R2Hz+xQAUpp4dLp3eGIJWr4Wnw7mSG6AxnkS7pygTq0iTYWaHx5WmHsn/ZWdE17k4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DM4PR12MB8523.namprd12.prod.outlook.com (2603:10b6:8:18e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20; Fri, 19 Jul 2024 09:03:13 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::ebfb:2f9f:f9ca:82cd]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::ebfb:2f9f:f9ca:82cd%4]) with mapi id 15.20.7784.017; Fri, 19 Jul 2024 09:03:11 +0000 Message-ID: Date: Fri, 19 Jul 2024 10:03:07 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] net/memif: fix buffer overflow in zero copy Rx From: Ferruh Yigit To: Mihai Brodschi , Jakub Grajciar Cc: dev@dpdk.org, stable@dpdk.org References: <8bf5e505-191b-46ea-8b90-0ed4fc15d306@broadcom.com> <75a9c5d9-da21-4e78-b637-84f152daae30@broadcom.com> <2d6fba2f-f522-4d0a-abbb-38d938f61af2@broadcom.com> Content-Language: en-US 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 AQIeAQIXgAIZARYhBEm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TzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR2P281CA0142.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:98::8) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM4PR12MB8523:EE_ X-MS-Office365-Filtering-Correlation-Id: c6906b8a-f4cc-429e-c468-08dca7d19d71 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?bHRkRkQ4OUtpdDZYa2hhbkxDTi9uQ2o0eFRRR3dLVEVhUXo3bDQrc3JYalRB?= =?utf-8?B?dEFHSjVFRkRzNU9zVHQ2YVVLWlRaVGVQR2VQRktpclZDSkpETmVpRm9UbElx?= =?utf-8?B?bk9kZHFJY1BXMUorMDZOL0cvSWw3N1lVZURTVmtNRVVuaDIxMituVEVvcXNK?= =?utf-8?B?ckExck9hNzZxM1NUVFcveENZMkFYNm1jWWV5ZHA5RXIyU2NwcmVJWVRyTUp1?= =?utf-8?B?SW5FNno0VmZ3dEVjVDlNeEc0Wk5hUkxUUUJFQVVORlhTWngzOXZkc0xxblpp?= =?utf-8?B?cFBZQVYrMDNWaCtzbDNvN3dXT0Q5d21OYzNTSG11eTlFNXBsbktuUXVwS2ho?= =?utf-8?B?dlQ3K0tvUDlLNUFiZjhjQ2hnazVmN0pEMUF3NitmR2VWTyttK2ZMUkxLajVv?= =?utf-8?B?Y25MR3FBNkRDNzFrL2x3UW1DYk9nUmhwNlhhYjdzMFVZaUppQk9SMG1zUlFi?= =?utf-8?B?TVAxaUNxMm84b2MvajMyYVc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R3WGY3ZHRmbGc3WmlxV21EUzVTek0rYjF4NmtmazdUTlJWbDNa?= =?utf-8?B?aGJzMW1SS1FnNWhwWjBiT2tEZ0N6dm9Sd2tUbEV0VUtMUnlHZ09TVXBTSjVM?= =?utf-8?B?RVZwQ0VXZTFXSjBSWnVya1FaRHVWZ1Z6aUt2cFcxbllJbE44cGNIV2pIYkI1?= =?utf-8?B?TEd0Ym14VGlueWI0ZFhqOEtURGNjdkptTFFLMzNtY1BEaDZFeDg3MC9kYlZt?= =?utf-8?B?WWNadGFrMzdnd0FyR24rUmJjRklmVXJFMjlPcENpMXVOajk5Z3pWUERiU2g5?= =?utf-8?B?c0xOUDdMNkd2cDM3Y0hsMXdaenhhTHFlbndtUXM0SnhXdlZZSWZJdklFbWhO?= =?utf-8?B?eGZrc2NoNzZFcWhySDVnS3lYSkNSdWlTeVVkRXhqV2drbXpTeldFdmpEVEp4?= =?utf-8?B?UW95TXhteUc4aU9ieXhmUT09?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aFA2Nk1zY1pJRlJwUXlWUXFWQ2x4cXlzak9ibFcvMmlLUC90UUF3S0NoSWVy?= =?utf-8?B?Qm43d3AweFg2OW9jT1FVUGhrTDk4WXRqVGM2NUMvS3h5WWZuVEFNMFdnS1Ry?= =?utf-8?B?QkhpT3pYcW9scEVLeEp5ZDQyOFppVjVrVkNwakMzak5jWml0cTN1eGFPRU1D?= =?utf-8?B?ZzF3WmhrY0o2YVFrWndRMWxtUzBHNW5vTDdOaDVmNUtjeVJNRGdoTG1kcTY5?= =?utf-8?B?MUwyazRnWjkzVG5JTFFtZU1SY3Y0SFNEVC9w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ySFpiMjVqWm5FaEpybzI5c2ExQlAyUk9rV1ljc0FSQVNRMmFU?= =?utf-8?Q?9aUc8pog8TmJCO2MoAlPFmNEZ?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6906b8a-f4cc-429e-c468-08dca7d19d71 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2024 09:03:11.3376 (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: oGWAaLs9BN6RGxVUzKtljJYHjNcBT7wGaojHOGKUm/WXA1oK7R/3r9fBrjWfozSH X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB8523 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 7/8/2024 12:45 PM, Ferruh Yigit wrote: > On 7/8/2024 4:39 AM, Mihai Brodschi wrote: >> >> >> On 07/07/2024 21:46, Mihai Brodschi wrote: >>> >>> >>> On 07/07/2024 18:18, Mihai Brodschi wrote: >>>> >>>> >>>> On 07/07/2024 17:05, Ferruh Yigit wrote: >>>>> >>>>> My expectation is numbers should be like following: >>>>> >>>>> Initially: >>>>> size = 256 >>>>> head = 0 >>>>> tail = 0 >>>>> >>>>> In first refill: >>>>> n_slots = 256 >>>>> head = 256 >>>>> tail = 0 >>>>> >>>>> Subsequent run that 32 slots used: >>>>> head = 256 >>>>> tail = 32 >>>>> n_slots = 32 >>>>> rte_pktmbuf_alloc_bulk(mq, buf[head & mask], n_slots); >>>>> head & mask = 0 >>>>> // So it fills first 32 elements of buffer, which is inbound >>>>> >>>>> This will continue as above, combination of only gap filled and head >>>>> masked with 'mask' provides the wrapping required. >>>> >>>> If I understand correctly, this works only if eth_memif_rx_zc always processes >>>> a number of packets which is a power of 2, so that the ring's head always wraps >>>> around at the end of a refill loop, never in the middle of it. >>>> Is there any reason this should be the case? >>>> Maybe the tests don't trigger the crash because this condition holds true for them? >>> >>> Here's how to reproduce the crash on DPDK stable 23.11.1, using testpmd: >>> >>> Server: >>> # ./dpdk-testpmd --vdev=net_memif0,id=1,role=server,bsize=1024,rsize=8 --single-file-segments -l2,3 --file-prefix test1 -- -i >>> >>> Client: >>> # ./dpdk-testpmd --vdev=net_memif0,id=1,role=client,bsize=1024,rsize=8,zero-copy=yes --single-file-segments -l4,5 --file-prefix test2 -- -i >>> testpmd> start >>> >>> Server: >>> testpmd> start tx_first >>> testpmt> set burst 15 >>> >>> At this point, the client crashes with a segmentation fault. >>> Before the burst is set to 15, its default value is 32. >>> If the receiver processes packets in bursts of size 2^N, the crash does not occur. >>> Setting the burst size to any power of 2 works, anything else crashes. >>> After applying this patch, the crashes are completely gone. >> >> Sorry, this might not crash with a segmentation fault. To confirm the mempool is >> corrupted, please compile DPDK with debug=true and the c_args -DRTE_LIBRTE_MEMPOOL_DEBUG. >> You should see the client panic when changing the burst size to not be a power of 2. >> This also works on the latest main branch. >> > > Hi Mihai, > > Right, if the buffer size is not multiple of burst size, issue is valid. > And as there is a requirement to have buffer size power of two, burst > should have the same. > I assume this issue is not caught before because default burst size is 32. > > Can you please share some performance impact of the change, with two > possible solutions we discussed above? > > Other option is to add this as a limitation to the memif zero copy, but > this won't be good for usability. > > We can decide based on performance numbers. > > Hi Jakup, Do you have any comment on this? I think we should either document this as limitation of the driver, or fix it, and if so need to decide the fix.