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 248A441EB2; Thu, 16 Mar 2023 19:19:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ECD6940DF6; Thu, 16 Mar 2023 19:19:04 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2072.outbound.protection.outlook.com [40.107.244.72]) by mails.dpdk.org (Postfix) with ESMTP id 11A8F40DDC for ; Thu, 16 Mar 2023 19:19:03 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U5vbA0wVdV/0Cg5p+8SBl9kUe9josnAid/U8TkKt/zXYT7H0B+xYI2EilrPV2EdAZxkKrV5mL3HbXfulWvYv+D5iCGBQVb+1idwP3gJawaLgNluoYzhBaoK8f55cZSckMBh757C4RgpMhe2CCY2RDs3q6Czr4sbjcUsEQjy0tXwPURlYCVL7ZrXR23xr2O3Kdezwyv2jZW2AU2+L8me8lAKue7u2aeQnwotghrVoZ9sT6KS0B0nASobb8jZnB3goE0WuDJCTcMYA6YliP7uhFhgRDW64DETzQZRAhEqWfCjP8pnP3F6Px0FQrgcsFc/weh323sWg6dJKaogFRECwmA== 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=dAi0cnhSPI6Sq4KCPXMDNJjz6kPBkGLPs+SC8wcaz9Q=; b=IG5Sl5/ad6niO8ZKVlOpwJSYVHVLeSpalBcBAV6ND4ZA6HUK2knzFHslBw82qIAmMfzRzoF9hnbG0601yq54oWHIVcjHJA0nVP7UdEmQjeNaRxTZMrepIZfqEY5x7rdt+B0NrFEoWvgNYR8fdPBhAjUxqM62Js6qPwDKL9qCaDgD6Sg445sLqOCS/iWO303CPmK9bD88CsW+6Y6XZjk6kNO7EYkixBIBga5PK7DgQbke7nxPGq1G5JDMi2bRMe3z+Tqjpug/Xbuo4G2jIwCp2K71emsrNYexWtsUDXAS7gSrEbSkD3eHztopkSjPCrBo37a2VPz6415M9XMeNrqdTw== 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=dAi0cnhSPI6Sq4KCPXMDNJjz6kPBkGLPs+SC8wcaz9Q=; b=XTLjcazThxPiAQ7P7zLqEEQ/3WJxzv/PU7sFUmsb/FYJLH8BknV+GW4TL4wxc61CdK4IFuRjeyKkk0cTKcdgs86JGNkTVNEhPjBfO85E6Edy9bbL9fH5+1Rfn7rLkFYE2bcONkcNXbqgNlh6+NObcl51bGzoVOhbUWtv0c4lB14= 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 IA1PR12MB8494.namprd12.prod.outlook.com (2603:10b6:208:44c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.29; Thu, 16 Mar 2023 18:19:00 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640%5]) with mapi id 15.20.6178.026; Thu, 16 Mar 2023 18:18:59 +0000 Message-ID: <53326af4-26ab-eba7-047f-42917e8f3b00@amd.com> Date: Thu, 16 Mar 2023 18:18:53 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 0/5] fix segment fault when parse args Content-Language: en-US To: Chengwen Feng , thomas@monjalon.net Cc: dev@dpdk.org, David Marchand References: <20230314124813.39521-1-fengchengwen@huawei.com> From: Ferruh Yigit In-Reply-To: <20230314124813.39521-1-fengchengwen@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0530.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:2c5::13) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|IA1PR12MB8494:EE_ X-MS-Office365-Filtering-Correlation-Id: 72b70414-f517-45bc-dffd-08db264ae953 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B78Gp4zA5rzi8yJg1TEyO86HmZT5nlrmSTwmBOy1SgxdolBkGrdtSkBG9vDNUQVilhuhGfOE5dDRfsgwPGFCemEKsPIcMw49I6gw87EiZ8GjIvywj2H30HuuGEqRzDjUaMYrAlLeZThvSCrV3gYFMgFMaiv3aUhTiMDli+wYZBAtlwLJg6vngs71Mgz9uHowQQkHKLTIJOqHSabExiRjiz18nnOcCkq47CbQBe8+NJpUQA8Avo7YgIVVdOdfogXm4/sFsEinXXvMO4LmWJK4d8JAuguPkKBn+h2oJTv+8gBu1FoT0wN7FfGnqWhuhWwbWeYOIdafou/ozY+TNTI4BpEZFHvhTHCP81oufOfC6+BKrqINLlnlKK2Unhv2bCq1h4SN8ta2l6fno0EJ4a+rnzN/je15s49ryYwxApa+GzVlRry4Au9QB7hLG6WTPzNRVG2JUt0EXlg0cpAMdWaysdPxY9X1DzE6LnT5lCMvrMOWIhCfx4a6e/yBwvteWLXrVisfnsjmMQ7BovzeDCVXLSEcBk5IJbjkk4n9uOB2N+iNQjWtHkxYZlve1/BOcbseKcg3Ap5OXB6swO5sdNNqJdbtXdC5xSemDAEURedGmQKnqkLS9hp97Kms8yzqhaUETO9u6JDfPOAB35e/etGX62s76Oal/z1Ez2/usZSiNYjrLpj3qtkHZ3TzLC8Ot5ZHBvbXHBAEWJuUJH306MLahpjzAP6fLRH7uT1VtzyDp/4= 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:(13230025)(4636009)(376002)(136003)(39860400002)(346002)(366004)(396003)(451199018)(36756003)(38100700002)(31696002)(5660300002)(41300700001)(2906002)(44832011)(8936002)(86362001)(4744005)(4326008)(6486002)(2616005)(6506007)(53546011)(26005)(316002)(6512007)(186003)(66476007)(6666004)(66946007)(478600001)(8676002)(66556008)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TUkwWWZRb3U0emtUN3RzZDBZVDN6ZWZybGxUdFFkZjRWOHJGdEJpS0ttNXdJ?= =?utf-8?B?UVBLd3Y5cmNxbkZ5dTRoZE1Ick81TTVyaFhPUTdMM2FJd1ZJMU9PaXcyQkVN?= =?utf-8?B?enJRVlp4MDJjUHBhNStUN2xkMmlKM1JZY0pLaTlCTTRRcmM1ZkhqTGNkQVFI?= =?utf-8?B?S2VhV0xCVU5NUWpTY1NQYWdoYk95eGgzdE5GT004NUFUMzgvc0dwNW5nMmR6?= =?utf-8?B?L1Y3STVKc1hyb1lmK0NqamVPR2VGQnRWMlpRYVdweXZYcFA4L09aUWtnZDUv?= =?utf-8?B?aWpDZTRyTVhLVXRNQi85b2dCUHFiRzU4eDErMysxUEF2SUg0ZFpXUEZ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YoCcbQDnlz6OjK?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72b70414-f517-45bc-dffd-08db264ae953 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2023 18:18:58.9580 (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: B9bicw+2OWyYKw3NL5DdM2Q7R0nhlCw9TCec8TKdowV1jWH4ORHQ3gMFGOc94tjf X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8494 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 3/14/2023 12:48 PM, Chengwen Feng wrote: > The rte_kvargs_process() was used to parse KV pairs, it also supports > to parse 'only keys' (e.g. socket_id) type. And the callback function > parameter 'value' is NULL when parsed 'only keys'. > > It may leads to segment fault when parse args with 'only key', this > patchset fixes rest of them. > > Chengwen Feng (5): > app/pdump: fix segment fault when parse args > net/memif: fix segment fault when parse devargs > net/pcap: fix segment fault when parse devargs > net/ring: fix segment fault when parse devargs > net/sfc: fix segment fault when parse devargs Hi Chengwen, Did you scan all `rte_kvargs_process()` instances? And if there would be a way to tell kvargs that a value is expected (or not) this checks could be done in kvargs layer, I think this also can be to look at.