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 C7A1243325; Tue, 14 Nov 2023 09:26:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE09C4067B; Tue, 14 Nov 2023 09:25:48 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 4AA304027B for ; Tue, 14 Nov 2023 09:25:42 +0100 (CET) Received: from dggpeml500011.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4STzrN69dzzvQhV; Tue, 14 Nov 2023 16:25:24 +0800 (CST) Received: from localhost.huawei.com (10.50.165.33) by dggpeml500011.china.huawei.com (7.185.36.84) 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 16:25:40 +0800 From: Dengdui Huang To: CC: , , , , Subject: [PATCH 00/43] replace strerror Date: Tue, 14 Nov 2023 16:24:56 +0800 Message-ID: <20231114082539.1858594-1-huangdengdui@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.50.165.33] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500011.china.huawei.com (7.185.36.84) 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 The function strerror() is insecure in a multi-thread environment. This series of patches fix it. In this patchset, only the libs and drivers are modified. Dengdui Huang (43): devtools: forbid use of strerror eal: use rte strerror eventdev: use rte strerror latency: use rte strerror node: use rte strerror pdump: use rte strerror power: use rte strerror telemetry: replace strerror vhost: use rte strerror bpf: use rte strerror bus/cdx: use rte strerror bus/dpaa: use rte strerror bus/fslmc: use rte strerror bus/pci: use rte strerror bus/vdev: use rte strerror bus/vmbus: use rte strerror common/cnxk: use rte strerror common/mlx5: use rte strerror crypto/caam_jr: use rte strerror dma/idxd: use rte strerror net/af_packet: use rte strerror net/bnxt: use rte strerror net/af_xdp: use rte strerror net/bonding: use rte strerror net/dpaa: use rte strerror net/dpaa2: use rte strerror net/enetfec: use rte strerror net/failsafe: use rte strerror net/i40e: use rte strerror net/ice: use rte strerror net/ixgbe: use rte strerror net/memif: use rte strerror net/mlx4: use rte strerror net/mlx5: use rte strerror net/qede: use rte strerror net/sfc: use rte strerror net/tap: use rte strerror net/vhost: use rte strerror net/virtio: use rte strerror raw/ifpga: use rte strerror vdpa/ifc: use rte strerror vdpa/mlx5: use rte strerror vdpa/sfc: use rte strerror devtools/checkpatches.sh | 8 + drivers/bus/cdx/cdx.c | 2 +- drivers/bus/cdx/cdx_vfio.c | 13 +- drivers/bus/dpaa/base/fman/fman.c | 2 +- drivers/bus/dpaa/dpaa_bus.c | 2 +- drivers/bus/fslmc/fslmc_vfio.c | 12 +- drivers/bus/pci/bsd/pci.c | 8 +- drivers/bus/pci/linux/pci.c | 7 +- drivers/bus/pci/linux/pci_uio.c | 23 +- drivers/bus/pci/linux/pci_vfio.c | 23 +- drivers/bus/pci/pci_common_uio.c | 3 +- drivers/bus/vdev/vdev.c | 2 +- drivers/bus/vmbus/linux/vmbus_bus.c | 7 +- drivers/bus/vmbus/linux/vmbus_uio.c | 21 +- drivers/bus/vmbus/vmbus_common.c | 4 +- drivers/bus/vmbus/vmbus_common_uio.c | 3 +- drivers/common/cnxk/roc_dev.c | 4 +- drivers/common/cnxk/roc_model.c | 4 +- drivers/common/cnxk/roc_utils.c | 4 +- drivers/common/mlx5/linux/mlx5_nl.c | 12 +- drivers/common/mlx5/mlx5_common.c | 6 +- drivers/common/mlx5/mlx5_devx_cmds.c | 2 +- drivers/crypto/caam_jr/caam_jr_uio.c | 5 +- drivers/dma/idxd/idxd_bus.c | 14 +- drivers/net/af_packet/rte_eth_af_packet.c | 2 +- drivers/net/af_xdp/rte_eth_af_xdp.c | 12 +- drivers/net/bnxt/bnxt_stats.c | 2 +- drivers/net/bnxt/rte_pmd_bnxt.c | 26 +- drivers/net/bnxt/tf_core/tf_core.c | 240 +++++++++--------- drivers/net/bnxt/tf_core/tf_em_common.c | 26 +- .../net/bnxt/tf_core/tf_em_hash_internal.c | 4 +- drivers/net/bnxt/tf_core/tf_em_host.c | 24 +- drivers/net/bnxt/tf_core/tf_em_internal.c | 14 +- drivers/net/bnxt/tf_core/tf_global_cfg.c | 10 +- drivers/net/bnxt/tf_core/tf_identifier.c | 8 +- drivers/net/bnxt/tf_core/tf_if_tbl.c | 6 +- drivers/net/bnxt/tf_core/tf_msg.c | 160 ++++++------ drivers/net/bnxt/tf_core/tf_rm.c | 6 +- drivers/net/bnxt/tf_core/tf_session.c | 72 +++--- drivers/net/bnxt/tf_core/tf_sram_mgr.c | 22 +- drivers/net/bnxt/tf_core/tf_tbl.c | 28 +- drivers/net/bnxt/tf_core/tf_tbl_sram.c | 48 ++-- drivers/net/bnxt/tf_core/tf_tcam.c | 24 +- drivers/net/bonding/bonding_testpmd.c | 4 +- drivers/net/bonding/rte_eth_bond_api.c | 2 +- drivers/net/bonding/rte_eth_bond_flow.c | 4 +- drivers/net/bonding/rte_eth_bond_pmd.c | 6 +- drivers/net/dpaa/dpaa_ethdev.c | 4 +- drivers/net/dpaa/fmlib/fm_lib.c | 6 +- drivers/net/dpaa2/dpaa2_ethdev.c | 4 +- drivers/net/enetfec/enet_uio.c | 2 +- drivers/net/failsafe/failsafe.c | 8 +- drivers/net/failsafe/failsafe_args.c | 4 +- drivers/net/failsafe/failsafe_eal.c | 4 +- drivers/net/failsafe/failsafe_flow.c | 4 +- drivers/net/failsafe/failsafe_ops.c | 2 +- drivers/net/failsafe/failsafe_private.h | 6 +- drivers/net/i40e/i40e_testpmd.c | 42 +-- drivers/net/ice/ice_testpmd.c | 4 +- drivers/net/ixgbe/ixgbe_testpmd.c | 12 +- drivers/net/memif/memif_socket.c | 4 +- drivers/net/memif/rte_eth_memif.c | 20 +- drivers/net/mlx4/mlx4.c | 14 +- drivers/net/mlx4/mlx4_ethdev.c | 18 +- drivers/net/mlx4/mlx4_rxq.c | 10 +- drivers/net/mlx4/mlx4_txq.c | 10 +- drivers/net/mlx5/hws/mlx5dr_matcher.c | 2 +- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 20 +- drivers/net/mlx5/linux/mlx5_os.c | 18 +- drivers/net/mlx5/linux/mlx5_socket.c | 16 +- drivers/net/mlx5/linux/mlx5_verbs.c | 8 +- drivers/net/mlx5/mlx5.c | 8 +- drivers/net/mlx5/mlx5_devx.c | 4 +- drivers/net/mlx5/mlx5_mac.c | 2 +- drivers/net/mlx5/mlx5_rxmode.c | 8 +- drivers/net/mlx5/mlx5_rxq.c | 4 +- drivers/net/mlx5/mlx5_rxtx.c | 2 +- drivers/net/mlx5/mlx5_stats.c | 4 +- drivers/net/mlx5/mlx5_testpmd.c | 14 +- drivers/net/mlx5/mlx5_trigger.c | 12 +- drivers/net/mlx5/mlx5_vlan.c | 2 +- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +- drivers/net/mlx5/windows/mlx5_os.c | 12 +- drivers/net/qede/qede_regs.c | 4 +- drivers/net/sfc/sfc_flow.c | 2 +- drivers/net/sfc/sfc_flow_tunnel.c | 2 +- drivers/net/sfc/sfc_mae.c | 58 ++--- drivers/net/tap/rte_eth_tap.c | 26 +- drivers/net/tap/tap_flow.c | 18 +- drivers/net/tap/tap_netlink.c | 5 +- drivers/net/tap/tap_tcmsgs.c | 6 +- drivers/net/vhost/rte_eth_vhost.c | 6 +- drivers/net/virtio/virtio_user/vhost_kernel.c | 8 +- .../net/virtio/virtio_user/vhost_kernel_tap.c | 25 +- drivers/net/virtio/virtio_user/vhost_user.c | 20 +- drivers/net/virtio/virtio_user/vhost_vdpa.c | 12 +- .../net/virtio/virtio_user/virtio_user_dev.c | 8 +- drivers/net/virtio/virtio_user_ethdev.c | 6 +- drivers/raw/ifpga/afu_pmd_n3000.c | 5 +- drivers/raw/ifpga/base/ifpga_fme_rsu.c | 12 +- drivers/raw/ifpga/ifpga_rawdev.c | 2 +- drivers/vdpa/ifc/ifcvf_vdpa.c | 23 +- drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 2 +- drivers/vdpa/sfc/sfc_vdpa_ops.c | 6 +- lib/bpf/bpf_load_elf.c | 2 +- lib/eal/common/eal_common_fbarray.c | 2 +- lib/eal/common/eal_common_options.c | 7 +- lib/eal/common/eal_common_proc.c | 12 +- lib/eal/common/eal_common_trace_utils.c | 6 +- lib/eal/freebsd/eal.c | 4 +- lib/eal/freebsd/eal_interrupts.c | 8 +- lib/eal/freebsd/eal_memory.c | 2 +- lib/eal/freebsd/eal_timer.c | 6 +- lib/eal/linux/eal.c | 10 +- lib/eal/linux/eal_dev.c | 2 +- lib/eal/linux/eal_hugepage_info.c | 5 +- lib/eal/linux/eal_interrupts.c | 18 +- lib/eal/linux/eal_memalloc.c | 47 ++-- lib/eal/linux/eal_memory.c | 43 ++-- lib/eal/linux/eal_timer.c | 2 +- lib/eal/linux/eal_vfio.c | 40 +-- lib/eal/unix/eal_filesystem.c | 5 +- lib/eal/unix/eal_unix_memory.c | 6 +- lib/eal/unix/rte_thread.c | 6 +- lib/eventdev/rte_event_eth_rx_adapter.c | 2 +- lib/latencystats/rte_latencystats.c | 4 +- lib/node/kernel_tx.c | 2 +- lib/pdump/rte_pdump.c | 6 +- lib/power/guest_channel.c | 7 +- lib/power/power_kvm_vm.c | 3 +- lib/power/power_pstate_cpufreq.c | 7 +- lib/power/rte_power_pmd_mgmt.c | 2 +- lib/telemetry/telemetry.c | 28 +- lib/telemetry/telemetry_legacy.c | 5 +- lib/vhost/socket.c | 13 +- lib/vhost/vduse.c | 30 +-- lib/vhost/vhost_user.c | 11 +- 137 files changed, 963 insertions(+), 903 deletions(-) -- 2.33.0