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 AC85943321; Tue, 14 Nov 2023 02:05:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A057402BC; Tue, 14 Nov 2023 02:05:14 +0100 (CET) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id 2D3F6402B2 for ; Tue, 14 Nov 2023 02:05:12 +0100 (CET) Received: from dggpeml100024.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4STnz82gZBzMmkT; Tue, 14 Nov 2023 09:00:36 +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; Tue, 14 Nov 2023 09:05:10 +0800 From: fengchengwen Subject: Re: [PATCH 10/21] lib/eal: replace strtok with strtok_r To: Stephen Hemminger , Jie Hai CC: , Anatoly Burakov , References: <20231113104550.2138654-1-haijie1@huawei.com> <20231113104550.2138654-11-haijie1@huawei.com> <20231113082715.51aa5f78@hermes.local> Message-ID: <81b309a0-7c01-936c-bac6-da6f03414ace@huawei.com> Date: Tue, 14 Nov 2023 09:05:10 +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: <20231113082715.51aa5f78@hermes.local> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) 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 Stephen, On 2023/11/14 0:27, Stephen Hemminger wrote: > On Mon, 13 Nov 2023 18:45:39 +0800 > 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. > > This code is only called in startup and can not be called by > multiple threads. For the DPDK examples and apps, I think it's OK if it called in startup then may not need replace. But as for lib and drivers, I think we shouldn't make such an assumption. At last I also recommend fix the examples and apps, because people may refer it. Thanks Chengwen > > . >