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 45F9A43249; Sun, 5 Nov 2023 06:48:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BA55402DF; Sun, 5 Nov 2023 06:48:48 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 3C393402CF for ; Sun, 5 Nov 2023 06:48:45 +0100 (CET) Received: from dggpeml100024.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SNNnd0ls4zvPrT; Sun, 5 Nov 2023 13:48:37 +0800 (CST) Received: from localhost.localdomain (10.50.165.33) by dggpeml100024.china.huawei.com (7.185.36.115) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Sun, 5 Nov 2023 13:48:42 +0800 From: Chengwen Feng To: , CC: , Subject: [PATCH v4 0/5] fix segment fault when parse args Date: Sun, 5 Nov 2023 05:45:34 +0000 Message-ID: <20231105054539.22303-1-fengchengwen@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230314124813.39521-1-fengchengwen@huawei.com> References: <20230314124813.39521-1-fengchengwen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.50.165.33] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml100024.china.huawei.com (7.185.36.115) X-CFilter-Loop: Reflected 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 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 --- v4: refine API's define and impl which address Ferruh's comments. add common/nfp change commit. v3: introduce new API instead of modify too many drivers which address Ferruh's comments. doc/guides/rel_notes/release_23_11.rst | 13 ++++++++ drivers/common/nfp/nfp_common_pci.c | 4 +-- drivers/common/sfc_efx/sfc_efx.c | 4 +-- drivers/net/mvneta/mvneta_ethdev.c | 3 ++ drivers/net/sfc/sfc_kvargs.c | 2 +- drivers/net/tap/rte_eth_tap.c | 10 +++--- lib/kvargs/rte_kvargs.c | 43 ++++++++++++++++++++------ lib/kvargs/rte_kvargs.h | 37 ++++++++++++++++++++-- lib/kvargs/version.map | 3 ++ 9 files changed, 97 insertions(+), 22 deletions(-) -- 2.17.1