[PATCH v4 00/13] replace strtok with reentrant version

Stephen Hemminger stephen at networkplumber.org
Tue Nov 5 17:28:09 CET 2024


On Sat, 26 Oct 2024 18:14:38 +0800
Jie Hai <haijie1 at huawei.com> 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 <stephen at networkplumber.org>


More information about the dev mailing list