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 8BDFE45CA9; Thu, 7 Nov 2024 13:23:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 23D9F402AC; Thu, 7 Nov 2024 13:23:15 +0100 (CET) Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by mails.dpdk.org (Postfix) with ESMTP id F408F40280 for ; Thu, 7 Nov 2024 13:23:11 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.162.112]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4Xkh525LBwz1SGBw; Thu, 7 Nov 2024 20:21:26 +0800 (CST) Received: from kwepemf500004.china.huawei.com (unknown [7.202.181.242]) by mail.maildlp.com (Postfix) with ESMTPS id BBB0D140136; Thu, 7 Nov 2024 20:23:09 +0800 (CST) Received: from [10.67.121.175] (10.67.121.175) by kwepemf500004.china.huawei.com (7.202.181.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 7 Nov 2024 20:23:09 +0800 Message-ID: Date: Thu, 7 Nov 2024 20:23:06 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v4 00/13] replace strtok with reentrant version To: David Marchand CC: , , , , , , Stephen Hemminger , Tyler Retzlaff References: <20231113104550.2138654-1-haijie1@huawei.com> <20241026101451.29135-1-haijie1@huawei.com> From: Jie Hai In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.175] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemf500004.china.huawei.com (7.202.181.242) 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, David Marchand , Thank you very much for your reminder and comments. I will correct it in the next version. Best Regards, Jie Hai On 2024/11/7 4:11, David Marchand wrote: > Hello, > > On Sat, Oct 26, 2024 at 12:26 PM 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 patchset replaces strtok with strtok_r in app, example, lib >> and drivers. And adds check for use of strtok in checkpatches.sh. > > - The current v4 series breaks compilation on Windows with clang. > http://mails.dpdk.org/archives/test-report/2024-November/819978.html > > The reason is that some include of rte_os_shim.h are missing. > > ==== 20 line log output for Windows Server 2022 (dpdk_win_llvm_compile): ==== > vchan_param = strtok_r(end_param, ",", &sp); > ^ > ../lib/dmadev/rte_dmadev.c:1038:17: note: did you mean 'strtok_s'? > C:\Program Files (x86)\Windows > Kits\10\Include\10.0.22621.0\ucrt\string.h:68:29: note: 'strtok_s' > declared here > _ACRTIMP char* __cdecl strtok_s( > ^ > ../lib/dmadev/rte_dmadev.c:1038:15: error: incompatible integer to > pointer conversion assigning to 'const char *' from 'int' > [-Wint-conversion] > vchan_param = strtok_r(end_param, ",", &sp); > ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2 errors generated. > [10/836] Linking static target lib/librte_gpudev.a > [11/836] Compiling C object > lib/librte_mldev.a.p/mldev_mldev_utils_scalar_bfloat16.c.obj > [12/836] Compiling C object lib/librte_gro.a.p/gro_gro_udp4.c.obj > [13/836] Compiling C object lib/librte_mldev.a.p/mldev_mldev_utils_scalar.c.obj > [14/836] Compiling C object lib/librte_gro.a.p/gro_rte_gro.c.obj > [15/836] Compiling C object lib/librte_gro.a.p/gro_gro_tcp6.c.obj > [16/836] Compiling C object lib/librte_gro.a.p/gro_gro_tcp4.c.obj > [17/836] Compiling C object lib/librte_gro.a.p/gro_gro_vxlan_tcp4.c.obj > [18/836] Compiling C object > lib/librte_cryptodev.a.p/cryptodev_rte_cryptodev.c.obj > ninja: build stopped: subcommand failed. > > > - grep shows that there are a number of missed places in drivers and > app, which contradicts the commitlog. > I don't like leaving some places with strtok while checkpatches.sh > warn on the rest. > And I think others were expecting too that the whole tree is fixed > after this series. > > Re-reading the thread, were the changes on app/ dropped, following > comments from Stephen? > I understand his request was to remove the backport request (iow no > Cc: stable@dpdk.org in the commitlogs), not to drop the changes. > >