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 64EF045C88; Tue, 5 Nov 2024 17:28:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D2674027E; Tue, 5 Nov 2024 17:28:14 +0100 (CET) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id ECF8040151 for ; Tue, 5 Nov 2024 17:28:12 +0100 (CET) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-20c693b68f5so61011605ad.1 for ; Tue, 05 Nov 2024 08:28:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1730824092; x=1731428892; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=G5M5lC+7Q6h7Ch1iMfbFhcj+2I7bCDMCQ+UiFUdvblw=; b=Z1wi6r//iqWnJE2cMQA66xroAZxQDLxHsFm5NiHv8td9/jJmOukrN7DnVlD+mpQX1f Oa9Mt3pmYEoQqzp6/EujreoM7h/putBzD4Cn6QlpUq98NLG3cVs/2HMLwHveh5h74xLm kZWzmLiGR0lsmcpI4FjDvdzKH8ZV4Mfc01UGMykugxa9ndvaACFvhmPrVzYjp8Fdqebb o6RTVVA/P3QqXysZzHKbKBUcEaKAXxq8/biAVKjWSRvcVllhxpM5KGx38Iz6Lgl3jd/k IONfNN5kPJ3BHyqrh72f0l+8BBYePCj1uOcVwqp1eDTFDA6TgQb0qtIPFXFYSBz2ExRD gmBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730824092; x=1731428892; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G5M5lC+7Q6h7Ch1iMfbFhcj+2I7bCDMCQ+UiFUdvblw=; b=XGu5vqvLCrPZ7k7JmU6m9ZEozGpoWtE6qBpWbwruPf8BMVkIojlOz4tWIYPTZ2D57F sOWYy2GyOw+34Xd4ga/nx+0mGgBNhs1CiOcyURASnzZts7hQsqZmg0MnPTO9dxj2Oj3E xnMtcr9eats395/1bo6TsU1NnHPVb33c98Q7vRetsAHhaqmCaMPZFI3gXuXNl1S9LXu1 PT1DyjzFnpA5SRweHK9XpcboMizgqSqBGOwvfbIaRNfXHeDoHfMU3wD4PizylS2r7Lk9 o1X/ZYIEPMKAm2uArBn726hxwxJnnImKLkTCA6Ee0Lh5nnGccx/vGsenLPGWoBCS5ZOL z19A== X-Gm-Message-State: AOJu0YyeQ9MB4nk4WMITBbMT4uDSxavst5Dl8JbHYLX50Sx314W9F84n gW0WS1DogSj/O94FAZG8hibi7XG0GT33fLPNKbKGXSh+2mUl5XaZOXzCroMHbpg= X-Google-Smtp-Source: AGHT+IHUhjOtXIIoG/Nyg6C4gwvUSyqdpt5eht9SjLnFon1T+qxce1Tme7gtplMWZtX6qeQ4HUHzfQ== X-Received: by 2002:a17:902:db11:b0:20e:986a:6e72 with SMTP id d9443c01a7336-21103b1bb5dmr300706635ad.30.1730824091808; Tue, 05 Nov 2024 08:28:11 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211057a2524sm80727725ad.125.2024.11.05.08.28.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2024 08:28:11 -0800 (PST) Date: Tue, 5 Nov 2024 08:28:09 -0800 From: Stephen Hemminger To: Jie Hai Cc: , , , , , Subject: Re: [PATCH v4 00/13] replace strtok with reentrant version Message-ID: <20241105082809.1a28f1a0@hermes.local> In-Reply-To: <20241026101451.29135-1-haijie1@huawei.com> References: <20231113104550.2138654-1-haijie1@huawei.com> <20241026101451.29135-1-haijie1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Sat, 26 Oct 2024 18:14:38 +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 patchset replaces strtok with strtok_r in app, example, lib > and drivers. And adds check for use of strtok in checkpatches.sh. > > -- > v4: > 1. fix mispellings. > 2. add Acked-bys and Reviewd-bys. > 3. remove some patch and add new. > v3: > 1. fix compile error. > 2. use strtok_r instead. > v2: > 1. fix commit log. > 2. add check in checkpatches.sh. > 3. replace strtok_r with strtok_s. > 4. add Acked-by. > -- > > Jie Hai (13): > dmadev: replace strtok with reentrant version > eal: replace strtok with reentrant version > ethdev: replace strtok with reentrant version > eventdev: replace strtok with reentrant version > security: replace strtok with reentrant version > telemetry: replace strtok with reentrant version > bus/fslmc: replace strtok with reentrant version > common/cnxk: replace strtok with reentrant version > event/cnxk: replace strtok with reentrant version > net/ark: replace strtok with reentrant version > raw/cnxk_gpio: replace strtok with reentrant version > net/cnxk: replace strtok with reentrant version > devtools: check for some reentrant function > > devtools/checkpatches.sh | 8 +++++ > 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/net/cnxk/cnxk_ethdev_sec_telemetry.c | 5 +-- > drivers/raw/cnxk_gpio/cnxk_gpio.c | 6 ++-- > lib/dmadev/rte_dmadev.c | 4 +-- > lib/eal/common/eal_common_memory.c | 8 ++--- > lib/ethdev/rte_ethdev_telemetry.c | 9 +++-- > 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 +-- > 17 files changed, 92 insertions(+), 74 deletions(-) > This should go into main (for 24.11) but not be backported to stable. Series-Acked-by: Stephen Hemminger