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 95D2C455C2; Mon, 8 Jul 2024 13:46:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 85D59402F1; Mon, 8 Jul 2024 13:46:03 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2048.outbound.protection.outlook.com [40.107.100.48]) by mails.dpdk.org (Postfix) with ESMTP id B1E244025E; Mon, 8 Jul 2024 13:46:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ByUbGstx6aJWp9RQ0+jQXqrN4TfLqlP5egi5Nx9E0zKBvuXilYbCj6VWuxw/jx6cPVDTkZPfCLP0b6BuU2oxXczpiwwcq8pigSo5cOASbpKWPzCLcyCp+fhz7QP4oXYhaP/pEZf+U0nkh7slFWwmMmeo0hbpPXbMp91d4YklYSt5H9omu9xJYP53SbKgJnOz8Pp4fGqv8c4aIiuDKF11obVkmWoqECPj0beGbVAF7akAj6494Q5j+lXtiVm18a3onZpzzJxh53tbbfwRcClCeYSYv2wa7d/a3hi+qNX9nibfcNsRJcmLw+xbMG4vkgYVn8BCV3SaMeYJknmpZ+0Vrg== 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=XqUXn83EIXf/8zuXYTIACJwk87Q5j27ecKq0HOdRY9s=; b=PczJXp8XarvhrAiIgb4hi+Vb8KMDvXjw5yI6XTeimgZ+5QPfZg7s1znnMZQ5nTXbBLLUFyxgW5xog0V/LGbta78FM8sYQvKdq7PFbYuixtLC/Y5ai3sGB5G2POAKkHP1qEJkjHB8LGi86k9+wYQpWozuNpSe7vGNr2sMykeoBdaXwWgL5bcNzrvry/G+t84z3xnmkUGb1uXDdRZphvUpk+D4jsrMfYoOgHSVj3P1xjqsQmVjLFsEo05pvEIm5gUCcg4tTxY9lzV3jPrwzi2V7lFLc5g8KHagL9CYUfFDEf2LEjZsOInUDbl5IaxX5OWf8TOpXyOUIpoKHRnPyNG5MQ== 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=XqUXn83EIXf/8zuXYTIACJwk87Q5j27ecKq0HOdRY9s=; b=V5DMXBQ2s4nqelP/IdGkmWcYzwYSmIC2S6jE36FFA56+8AYm/3/aAlaq/YgjNCO7mmS61vo3mb/kU/hm4Q7FHbzXNWxeOY4JBCAHxtNMAFOJRgeGVXFG+dgOZtzbcfKNP2y+5ftFlJl/pIphkDs+XcuOyfAnQOnu6E4PtQ3Gwzs= 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 DS0PR12MB9397.namprd12.prod.outlook.com (2603:10b6:8:1bd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.35; Mon, 8 Jul 2024 11:46:00 +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.7741.033; Mon, 8 Jul 2024 11:46:00 +0000 Message-ID: Date: Mon, 8 Jul 2024 12:45:55 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] net/memif: fix buffer overflow in zero copy Rx 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 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 AQIeAQIXgA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LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2PR04CA0063.eurprd04.prod.outlook.com (2603:10a6:10:232::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_|DS0PR12MB9397:EE_ X-MS-Office365-Filtering-Correlation-Id: e55cfd6b-ab1b-4941-764d-08dc9f43896d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?MjVBaWhMaElGUVJCNCtnT0hqOEkra3A5OW9HcUZHQWFzNzFhYjVVZEFvUk5s?= =?utf-8?B?VFh1UHZoWW9DRnFsQ2hGWmt6TE1ZMmRTS1J6aVJtYTQxMjRZRGdQbW94Nkhi?= =?utf-8?B?VDJpbjV4VGlYZk14NGkvdmxiaC9zWC9FUFlCMW4yVDFoaG5QVXRFOGxLK0U0?= =?utf-8?B?OFdwRTN6YStxb1BMbERBTG13T05FNG9WYlhuWEFyNTBFQ1kzT2xnVFBGSUEy?= =?utf-8?B?UytqOUFCUkl6UVhFUTBMMzlqNWt6L0NOVUhQRThtYW8yMlYyR0ZuZExYdUY3?= =?utf-8?B?YSs4OG8xU2duY0Y1YkhmTjVNam5RQXM2Yk9oNVNRMG5XbE5YRmc1RUtXbjEx?= =?utf-8?B?bE01bzR2K1VZUHhsUlRxNWp2V1FvaEtybHJVeksrMHBFMm9LYlllekZ5eVRt?= =?utf-8?B?VEk2NWhjRk1IWUtjS0FyeXIzMFpGOUFycUgxS0NBM0NVVEIxMm9odnpZeEc0?= =?utf-8?B?NE1OZGZ2L25LQm9H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f-8?B?UFJFSlFvczdYQnNGMExrR1dWOUh4SlNJQkZNSkp0ZWwyM2E2T3pheUVQM3dH?= =?utf-8?B?VTRlaDNpUC9aSjE3dXAxTGVWTHlsRjBIaWJhS1RHQ1Q0V1BXa3lhZ3JDNDFx?= =?utf-8?B?RVJ5YkxUcFB5L2ljN25CRUpzS2RlL2RmUXN1dTF4Wm10Z2d5NjhwY2d0emRC?= =?utf-8?B?R1dMdWVqL3NUMzg1R2ZNRUN0UDhTTVhXcVNyUWc0cHBNWGJ2MUgvaW9yYXN5?= =?utf-8?B?Qmw2Sm81eVVqdGFWN0hWNU1sRXJUbzFEWCt4UWVNMHZrUDNJaFVKbXlieGky?= =?utf-8?B?L2syK3pxaWwra1dxc0FIMHVkZ3R5M2lVQ2JXTWtKZTJWMzUvSUhSZU5ReFV4?= =?utf-8?B?OWRIMHRTblNBZUNkZlVrUHFselpac2orZXpuOVFrM2pWNWs0RnZtbmdVN3Bh?= =?utf-8?B?bjdVSHVJOEdIVnE1ZzNzUT09?= 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)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MGFnektqMVYzdXBTU1BCZEViRVUwR3UwbXkrcXdMSUV0a09Ca2JZaTJnSDlX?= =?utf-8?B?VXZwWWJPajlnUkVacDBDaHRoZzNFWU9ERElGR3Rja1cwaDJKa21zSDBVejB5?= =?utf-8?B?VWtTUEg1MklKRGxOZi9wcEwvRCtNNDVsVkF6WXo0MUhTNlRMYkRjeHYzT0Y4?= =?utf-8?B?RkFWdFd6SHl4dytMWU93cTdWK0kydkd6S3ZtclhTdkk2R09qL2NYSTUyMkw4?= =?utf-8?B?SGdTWFIyUmljVkRN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8?B?OXlZZ0tQZGFNQWtmYkdjTy8yT2gwa2J4YjhzS2I3VXVXcTVXaGgvL0kyMk1Y?= =?utf-8?Q?S5tO+vUcNTrAm2XelR6I11QpO?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: e55cfd6b-ab1b-4941-764d-08dc9f43896d X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2024 11:46:00.0395 (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: OfBANzcQBUsdCLhoqADbAJglk7OLMmBYQQyMspVhlVCTOJUesNI2sMqDl1m8gV22 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB9397 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 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. Thanks, ferruh