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 7771F432D3; Mon, 13 Nov 2023 12:33:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60D66402B7; Mon, 13 Nov 2023 12:33:39 +0100 (CET) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id 8A4F64026C for ; Mon, 13 Nov 2023 12:33:37 +0100 (CET) Received: from dggpeml100024.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4STRyh3dFCzMmWX for ; Mon, 13 Nov 2023 19:29:00 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) 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; Mon, 13 Nov 2023 19:33:34 +0800 Subject: Re: [PATCH 00/21] replace strtok with strtok_r To: Jie Hai , CC: References: <20231113104550.2138654-1-haijie1@huawei.com> From: fengchengwen Message-ID: <5616fdb5-e49a-edd3-27a7-e5069664af83@huawei.com> Date: Mon, 13 Nov 2023 19:33:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20231113104550.2138654-1-haijie1@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) 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 Hi Jie, Good fix There are two minor I think need to modify: 1. The [PATCH 13/21] lib/telemetry should be lib/security 2. All commits should add Cc because it's potential bug. The other LGTM, with above fixed Series-acked-by: Chengwen Feng Thanks Chengwen On 2023/11/13 18:45, Jie Hai wrote: > Multiple threads calling the same function may cause condition > race issues, which often leads to abnormal behavior and can cause > more serious vulnerabilities such as abnormal termination, denial > of service, and compromised data integrity. > > The strtok() is non-reentrant, it is better to replace it with a > reentrant function. > > Jie Hai (21): > app/graph: replace strtok with strtok_r > app/test-bbdev: replace strtok with strtok_r > app/test-compress-perf: replace strtok with strtok_r > app/test-crypto-perf: replace strtok with strtok_r > app/test-dma-perf: replace strtok with strtok_r > app/test-fib: replace strtok with strtok_r > app/dpdk-test-flow-perf: replace strtok with strtok_r > app/test-mldev: replace strtok with strtok_r > lib/dmadev: replace strtok with strtok_r > lib/eal: replace strtok with strtok_r > lib/ethdev: replace strtok with strtok_r > lib/eventdev: replace strtok with strtok_r > lib/telemetry: replace strtok with strtok_r > lib/telemetry: replace strtok with strtok_r > bus/fslmc: replace strtok with strtok_r > common/cnxk: replace strtok with strtok_r > event/cnxk: replace strtok with strtok_r > net/ark: replace strtok with strtok_r > raw/cnxk_gpio: replace strtok with strtok_r > examples/l2fwd-crypto: replace strtok with strtok_r > examples/vhost: replace strtok with strtok_r > > app/graph/graph.c | 5 ++- > app/graph/utils.c | 15 +++++--- > app/test-bbdev/test_bbdev_vector.c | 25 +++++++----- > .../comp_perf_options_parse.c | 16 ++++---- > app/test-crypto-perf/cperf_options_parsing.c | 16 ++++---- > .../cperf_test_vector_parsing.c | 10 +++-- > app/test-dma-perf/main.c | 13 ++++--- > app/test-fib/main.c | 10 ++--- > app/test-flow-perf/main.c | 22 ++++++----- > app/test-mldev/ml_options.c | 18 ++++----- > drivers/bus/fslmc/fslmc_bus.c | 5 ++- > drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 4 +- > drivers/common/cnxk/cnxk_telemetry_nix.c | 12 +++--- > drivers/event/cnxk/cnxk_eventdev.c | 10 +++-- > drivers/event/cnxk/cnxk_tim_evdev.c | 11 +++--- > drivers/net/ark/ark_pktchkr.c | 10 ++--- > drivers/net/ark/ark_pktgen.c | 10 ++--- > drivers/raw/cnxk_gpio/cnxk_gpio.c | 6 +-- > examples/l2fwd-crypto/main.c | 6 +-- > examples/vhost/main.c | 3 +- > lib/dmadev/rte_dmadev.c | 4 +- > lib/eal/common/eal_common_memory.c | 8 ++-- > lib/ethdev/rte_ethdev_telemetry.c | 6 ++- > lib/eventdev/rte_event_eth_rx_adapter.c | 38 +++++++++---------- > lib/eventdev/rte_eventdev.c | 18 ++++----- > lib/security/rte_security.c | 3 +- > lib/telemetry/telemetry.c | 5 ++- > 27 files changed, 169 insertions(+), 140 deletions(-) >