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 023E243279; Fri, 3 Nov 2023 14:41:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BEA124027F; Fri, 3 Nov 2023 14:41:29 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2050.outbound.protection.outlook.com [40.107.223.50]) by mails.dpdk.org (Postfix) with ESMTP id 608C840273 for ; Fri, 3 Nov 2023 14:41:28 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UAnx1Ou0G4YAqiiv/8TNX+4CJRjMmLu8P0AzC6bvlZUIpEC9GOR6BtKr8YAatTHbAJSitZjFQLnMhPiNDTEmPigj/lvUGkPaHaPa33PisAfT6YYq9ISkwlmoGGn4B/bymVE0rZY5vlCQabpnTDMjHdCGicLfAitgjSY6fYMUIIN83UxuHMWIgY5C7ZZB4sZlhELzpDjHrZ9nGHSYylNSIt3+NXsu1Rxnr/Fa8uT9LYKHMHBgiBmahDPxVxzQuGPMZCvoCkJZHADtkf1zBXH1CUSinYRjuCCBVkql7VNmrWX7UF19KL4qsNkiH+oIzl8sfi+KRSbgjXcf9nUGASZXrA== 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=VoQ9GqtoCCxOh/RaDtp7rSP1Y+5ASMKkTRWzeSnm8Ow=; b=XFEOFjLBUrxekNvag87onBrIT83MNwDc49y0kuKfWj+0ptBdwfohahjd+/Kgsk0g43NkxIIOekjp0lDFzNTaat2+Gf9MqL2Y88IeZVGrWLgDMpnkZ0qbOJyHAMFmclYoZC55E2qPBJM7xd6DVbN0UdO/VA10nyCHNK6jkX3YUbpcY8g24obBi48WL6qcYD18p6pf4ti690cpreySVRfK36cY9Gip5C/T1M7/uvsF74eSQTXIKeqtR7lYsZZzWhLqej+zqtMlfBdUlOvOs04T2+xVY/BCnFuSet/SOHXof/lat1LmMtLb6RuHqGWmpiT6WmUuM2DKKSFDT3Dwq1UaRw== 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=VoQ9GqtoCCxOh/RaDtp7rSP1Y+5ASMKkTRWzeSnm8Ow=; b=mV9xYIuMZhsVJGDwod+MnFr1zNUT6MCAbE81w7W1GnBoQvAqwlYZ0zFuQ/aQQMxZG2QnDSehdtElgz4FuDWw7jt4gSHSXP1n//2emswgKfW3vtuABfg1tGL8BDYD/j8To8tCCMwDF9R2B9oUf9f4YFqO75m0Iki81b2q/eT/myE= 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 MW4PR12MB7192.namprd12.prod.outlook.com (2603:10b6:303:22a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.24; Fri, 3 Nov 2023 13:41:25 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f%6]) with mapi id 15.20.6954.019; Fri, 3 Nov 2023 13:41:25 +0000 Message-ID: Date: Fri, 3 Nov 2023 13:41:15 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 0/5] fix segment fault when parse args Content-Language: en-US To: Chengwen Feng , thomas@monjalon.net Cc: dev@dpdk.org, stephen@networkplumber.org References: <20230314124813.39521-1-fengchengwen@huawei.com> <20231103073811.13196-1-fengchengwen@huawei.com> 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/6BQJkdyEEBQkE3meNAAoJEFRTPtCK Km/6UdcP/0/kEp49aIUhkRnQf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reply-To: <20231103073811.13196-1-fengchengwen@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0204.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a5::9) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|MW4PR12MB7192:EE_ X-MS-Office365-Filtering-Correlation-Id: a14723b3-2e39-406f-9606-08dbdc7292b7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CCzP1qAyk/RD87/YcY2zGxCDQad/SXktevvXCfY+6vOJ8JtLXeKd8xhU2vZ16X3f+evjPm5WfV/zkEI0kHVCYJ++oNRjDam3/j0hN4/HE6AJ+yCeV+YJStfF7utD8VDr+QBjbpZGqPNy5Xfnig84+oFftNSkYIgmLqBuSOcrpFy5wm0R8okk/T3r4RqJZ9JRfhUJuZHe2z9iHQgndQsFv0FWgI/r5HApvKL9/CIzq0cMONoIgNLHN+hy9ZHDRu9eyy1N8PEDWwleRWATHwhdSsusIIMWaizXMH/bWLX6X2AC9Uulzp4OTBrw46dTtFsHpecfXqsMPNLSX9vzHUoVdWIZXS0hSvqoe9JGiMvuI7k8WD8MO8YNHBhAbwZMO7+poN0ry0USl1Tw/yq3kacSFigvP2vZa8OMG0PwaMQOHffxSXiEIEkrB4LMqwePIyOOe9FhQ1ua2L5WTkz1YvaV2KZzgxRFJllF3vG4XMwtbfj+97AmWrXKVWap41SHhT+PGJXFaxUBA9uFh6Qj8Z202Y2T/TwvqnrQrGA+gjFFfoSCDdu67HHPULUerDRuPhp+4WTbELOjObZCBkLIbL6K1mYKv8vvwZ47NBMmaXqpCiRm0gSFqs89rjF+OiiizZBaKu4tPy68cyZWWu1dgptNeQ== 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:(13230031)(39860400002)(346002)(366004)(396003)(376002)(136003)(230922051799003)(1800799009)(186009)(451199024)(64100799003)(38100700002)(31686004)(8676002)(41300700001)(6486002)(6512007)(478600001)(6506007)(5660300002)(6666004)(966005)(26005)(2906002)(316002)(66476007)(66946007)(66556008)(44832011)(8936002)(31696002)(36756003)(86362001)(4326008)(83380400001)(53546011)(2616005)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?c0JFNGs1NGt6Y0ErdythNFAvZlEyTDBBVVlKNEV4SmNzQUlEWG9DUGYvL29y?= =?utf-8?B?R3BWSzlrOTJ3RXNxVFJqOHdPekJSRHl6dXgrOU5JOVBXNXl6N1FkbjVRNWY1?= =?utf-8?B?RGlIbUVYN0VYUS9SeFBzQjZvNWVyRE1pUU9sSy9DdUExZ21KZk1ZbVRHZUtm?= =?utf-8?B?STM0NEhKQUhZR091QlRtZjVFUmJWbm9saUJNV3lWa3hkWXJqZVZoS0N2NEFO?= =?utf-8?B?Y0phZEZMVzhnUE9BdUp6alpyL1B2SVFENGNuanR5RENxbU9Xc1U4Z045dEpU?= =?utf-8?B?a1REQS84ckZ3d3h5cW13dXZhTnNDbzNKUTJGY0RrZmtLRytrUmZMcGRJZ0Fs?= =?utf-8?B?TjY4Qm12Yjl5MGRXYitMRjNza3RvSXJWbGwvaDA4YmhmSTE0dFNYY0F6aGJi?= =?utf-8?B?MkN0NGI2U3JHbnpiYTRBcUFkTzlUdzFTeWNPUlVNYzd1K3IybXdaZFkxUVBM?= =?utf-8?B?a2pjTGo4RlhLek1sQ09nbTA5WnpBamUxNXJXeHEyTGpSOG1BZHJpdVRtY29r?= =?utf-8?B?aFBQSGFjVDZ6aWRybG9vcXFuWFk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Eo4bThWVDl0b0Y1dS9sNkVqRHlqWW9SS3lTU1ZVWmZK?= =?utf-8?B?TGpGTkZuS3Q1aGQ1Sk0raGI3ZXJIdEw5Y3lqY1RyOGVrNjBPRTFCcjNjajkr?= =?utf-8?B?ellweU9NL3ZoYStuemtJczhucXg3dG5TRlQ1TkdUT0Y2c1dqeDNtWVhxV2w3?= =?utf-8?B?WkI0dnFuNHoxYXQvMEJ5cytGUlF5cHYwVE8vSHZud0pTN1Jmd29jYzZYbHhp?= =?utf-8?B?ZlNVZm9STUZWWjNoOGFDWjFUU1FKK2hySGJ0Q0tmMlNERm9WZERRYldMVkJK?= =?utf-8?B?WERSU05ub0ErUmUyUWZNNXFEYzBBc1Q3aUxoUnhOenkyMzNZMFNuem5hSnQr?= =?utf-8?B?L3BZaXBycy9hUGVUVDJhdklqUVM1SmFWVmZZTFRvaXU0UGVwNDlsNUtZWVFi?= =?utf-8?B?MGRwb2pBNVpxMDNkZHNsem12cm9icDZacnp1ZXh0a3RLdWR0OFpscXdEd2I1?= =?utf-8?B?ZkkxZ2ZwRE1GanQ3R0x5cnhLdkY4d0FQK0tCem8zMnhkN1RheEhXbUltVStZ?= =?utf-8?B?VjRNQVQ5dGgvRFRxcHhhMytML0szN1lnNEZTUUlTYmtLenhlK1ZNYWpvR0Fv?= =?utf-8?B?S2RCZTIwaExURlBaWFB6d3pBbjIwTzBIaUEzYnJxeFIwTENIK0l6NUs2WDM0?= =?utf-8?Q?NuFPsjMSm7esM94VS5KdEiBYD?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a14723b3-2e39-406f-9606-08dbdc7292b7 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2023 13:41:25.1383 (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: j8F4aBlft3My+rnCo0E0PdziLEx4fQR0oUFX/XgOfTIAatYs6BejfhGzoIDqIuxX X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7192 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 11/3/2023 7:38 AM, Chengwen Feng wrote: > The rte_kvargs_process() was used to parse key-value (e.g. socket_id=0), > it also supports to parse only-key (e.g. socket_id). But many drivers's > callback can only handle key-value, it will segment fault if handles > only-key. so the patchset [1] was introduced. > > Because the patchset [1] modified too much drivers, therefore: > 1) A new API rte_kvargs_process_opt() was introduced, it inherits the > function of rte_kvargs_process() which could parse both key-value and > only-key. > 2) Constraint the rte_kvargs_process() can only parse key-value. > > This patchset also include one bugfix for kvargs of mvneta driver. > > [1] https://patches.dpdk.org/project/dpdk/patch/20230320092110.37295-1-fengchengwen@huawei.com/ > > Chengwen Feng (5): > kvargs: add one new process API > net/af_packet: use new API to parse kvargs > net/sfc: use new API to parse kvargs > net/tap: use new API to parse kvargs > net/mvneta: fix possible out-of-bounds write > Hi Chengwen, I checked the driver code updates above, but it is hard to know if there are more missing, each requires investigating one by one. Perhaps it can be easier to trace back from your original patch [1] and update the ones that doesn't need "value == NULL" check, I assume this is what you did.