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 610C545AEC; Wed, 9 Oct 2024 06:55:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5100B402BC; Wed, 9 Oct 2024 06:55:08 +0200 (CEST) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id 9D6A04029C for ; Wed, 9 Oct 2024 06:55:06 +0200 (CEST) Received: from mail.maildlp.com (unknown [172.19.162.254]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4XNgXg3QpCzCt3l; Wed, 9 Oct 2024 12:54:27 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id F2460180105; Wed, 9 Oct 2024 12:55:03 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 9 Oct 2024 12:55:03 +0800 Message-ID: <5891fe20-b4db-4ae2-aef4-321ee68b4922@huawei.com> Date: Wed, 9 Oct 2024 12:55:03 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 0/5] fix segment fault when parse args To: Stephen Hemminger CC: , , References: <20230314124813.39521-1-fengchengwen@huawei.com> <20231106073125.55280-1-fengchengwen@huawei.com> <20241004181945.00af423b@hermes.local> Content-Language: en-US From: fengchengwen In-Reply-To: <20241004181945.00af423b@hermes.local> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500024.china.huawei.com (7.185.36.10) 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 Hi Stephen, On 2024/10/5 9:19, Stephen Hemminger wrote: > On Mon, 6 Nov 2023 07:31:19 +0000 > 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/sfc: use new API to parse kvargs >> net/tap: use new API to parse kvargs >> common/nfp: use new API to parse kvargs >> net/mvneta: fix possible out-of-bounds write > > Not sure why the patchset never got more attention. > Yes it is a real bug, and this looks like a reasonable way to address it. > > It does need to be rebased to current 24.11 tree to have a chance, > and would be good to add more documentation to the API and remove > cases in drivers that have unnecessary NULL checks after this. > But those changes can be follow ups. > > Also the mvneta patch probably should be sent as separate it does > not depend on anything here. Done > > Bottom line resubmit it, and I will ack the new version. Already sent v6, please take a review Thanks