mbox series

[v5,00/25]

Message ID 20241108110404.18317-1-haijie1@huawei.com (mailing list archive)
Headers
Series [v5,01/25] app/graph: replace strtok with reentrant version |

Message

Jie Hai Nov. 8, 2024, 11:03 a.m. UTC
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.

--
v5:
1. remove CC stable for some patch.
2. replace strtok for all files.

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 (25):
  app/graph: replace strtok with reentrant version
  app/bbdev: replace strtok with reentrant version
  app/compress-perf: replace strtok with reentrant version
  app/crypto-perf: replace strtok with reentrant version
  app/dma-perf: replace strtok with reentrant version
  app/flow-perf: replace strtok with reentrant version
  app/test-mldev: replace strtok with reentrant version
  app/test-fib: replace strtok with reentrant version
  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
  common/qat: replace strtok with reentrant version
  net/mlx5: replace strtok with reentrant version
  examples/l2fwd-crypto: replace strtok with reentrant version
  examples/vhost: replace strtok with reentrant version
  devtools: check for some reentrant function

 app/graph/graph.c                             |  6 ++-
 app/graph/utils.c                             | 16 ++++---
 app/test-bbdev/test_bbdev_vector.c            | 42 +++++++++++--------
 .../comp_perf_options_parse.c                 | 17 ++++----
 app/test-crypto-perf/cperf_options_parsing.c  | 17 ++++----
 .../cperf_test_vector_parsing.c               | 11 +++--
 app/test-dma-perf/main.c                      | 14 ++++---
 app/test-fib/main.c                           | 11 ++---
 app/test-flow-perf/main.c                     | 23 +++++-----
 app/test-mldev/ml_options.c                   | 19 +++++----
 devtools/checkpatches.sh                      |  8 ++++
 drivers/bus/fslmc/fslmc_bus.c                 |  6 ++-
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.c      |  5 ++-
 drivers/common/cnxk/cnxk_telemetry_nix.c      | 13 +++---
 drivers/common/qat/qat_device.c               |  6 ++-
 drivers/event/cnxk/cnxk_eventdev.c            | 11 +++--
 drivers/event/cnxk/cnxk_tim_evdev.c           | 12 +++---
 drivers/net/ark/ark_pktchkr.c                 | 11 ++---
 drivers/net/ark/ark_pktgen.c                  | 11 ++---
 drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c  |  6 ++-
 drivers/net/mlx5/mlx5_testpmd.c               |  5 ++-
 drivers/raw/cnxk_gpio/cnxk_gpio.c             |  7 ++--
 examples/l2fwd-crypto/main.c                  |  7 ++--
 examples/vhost/main.c                         |  4 +-
 lib/dmadev/rte_dmadev.c                       |  5 ++-
 lib/eal/common/eal_common_memory.c            |  8 ++--
 lib/ethdev/rte_ethdev_telemetry.c             | 10 +++--
 lib/eventdev/rte_event_eth_rx_adapter.c       | 39 ++++++++---------
 lib/eventdev/rte_eventdev.c                   | 18 ++++----
 lib/security/rte_security.c                   |  4 +-
 lib/telemetry/telemetry.c                     |  6 ++-
 31 files changed, 223 insertions(+), 155 deletions(-)
  

Comments

David Marchand Nov. 8, 2024, 2:39 p.m. UTC | #1
On Fri, Nov 8, 2024 at 12:15 PM Jie Hai <haijie1@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.
>
> --
> v5:
> 1. remove CC stable for some patch.
> 2. replace strtok for all files.

In case you did not notice, including rte_os_shim.h in examples breaks
compilation.
Too late for taking in rc2, I may consider in rc3 if the series is
fixed by then.


Thanks.