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 119E345C79; Mon, 4 Nov 2024 19:23:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 00EA940281; Mon, 4 Nov 2024 19:23:23 +0100 (CET) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 8B9154025F for ; Mon, 4 Nov 2024 19:23:21 +0100 (CET) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-20c6f492d2dso49108435ad.0 for ; Mon, 04 Nov 2024 10:23:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1730744601; x=1731349401; 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=bpi1ZZKtsy96rGGinnIvKMTL+ramd2bEs/gqnNMPnqg=; b=JIWaMcq8ggxyin87a61YLQnABqBv4t4eyhs9raiqzTqo3QdHL+Nq49HcksL+VhS6bD P5Z5CB42QnSmR56il8D1WQTDkAcUkwyxnm30RHZcNjH8QY2DLBNEV0le0+Qf6BfFTnob biOrBVis2aFEOYn8nED6I0b59wCEtv1ulOAoL/6r2KPkFXDmK3ZOo7p6395SZXFymDFs uW2kbCcAp1hbKY1blMs9Fz7pwOjJYxzpQ1XmgyB0/i4W5eu0Rt+OHy0JC9doMje+pZ3w XJCNL77YU1Svwi39+Xxo7oKS/rEhdOI7wmloDJxQno4b/EDlnxIIo/wPX1qHf+NzJ6pk FavQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730744601; x=1731349401; 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=bpi1ZZKtsy96rGGinnIvKMTL+ramd2bEs/gqnNMPnqg=; b=mxgZj0I/NCx+/ZTAhKUc6k3xSqI1yfLzs1YkFial+X1+aSWVuWf8QgGRCp4iHFxcmb Eetg2x5ThUDRgvHoVuj1v0ZF/QJksk0ycYMQNPEtyR2vb1sQGVniFEjtLfShskUezY6A qSwKSiWSqDq13ER/VbiMdU5zUJphRceiD1WRci/sOVnEYDiouoAtG0AqypNw/s4kRXeS Y2+Y07k7QFb1UUJfmJqgU3PIwK0N2fcQheb1PG+zniVXODCb8b+JebJHdrHXbhamEZv9 NmVd8jCN/lvkuvn3x9RkyQ+8kNI9rviLTeLfQF2TZRqhuWCzXCz1CBXuA7LIQXfmdid7 bbRA== X-Gm-Message-State: AOJu0YyotyL+/06uruWG8CTCW6U9L0XV0r0dPtkJA9h4VKNHrd3EY6tb JQF1OeJnYu6TACIpNh2JiaGSPZM5kxF6RTSB4/MSCpoX5xzung7AJMcobZqYDME= X-Google-Smtp-Source: AGHT+IF7Lc/AWgdD+LSVOnqHUidtfCnxKDsw8dI21st3ptOj7UWSW6TbpiOdL7QsdBQpOqXe7WY1zQ== X-Received: by 2002:a17:902:fc45:b0:20c:af5d:2ed0 with SMTP id d9443c01a7336-2111af6c9cfmr193061225ad.48.1730744600250; Mon, 04 Nov 2024 10:23:20 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211057a2aa1sm64783045ad.164.2024.11.04.10.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2024 10:23:20 -0800 (PST) Date: Mon, 4 Nov 2024 10:23:18 -0800 From: Stephen Hemminger To: Dengdui Huang Cc: , , , , , , , , , , Subject: Re: [PATCH v5 00/52] replace strerror Message-ID: <20241104102318.44dd53b5@hermes.local> In-Reply-To: <20241104111037.3632161-1-huangdengdui@huawei.com> References: <20231114082539.1858594-1-huangdengdui@huawei.com> <20241104111037.3632161-1-huangdengdui@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 Mon, 4 Nov 2024 19:09:45 +0800 Dengdui Huang wrote: > The function strerror() is insecure in a multi-thread environment. > It is better to use strerror_r() instead of strerror(). > In addition, rte_errno should obtain the error description through rte_strerror() instead of strerror(). > In this patchset, only the libs and drivers are modified. > > v4->v5 strerror_r(errno) replace strerror(errno), and rte_strerror replace strerror(rte_errno). > v3->v4 fix ci error > v2->v3 drop patch "telemetry: replace strerror" due to compile fail > v1-v2 fix ci error > > Dengdui Huang (52): > eal: fix use rte errno for libc function > devtools: forbid use of strerror > eal: replace strerror with reentrant version > eventdev: replace strerror with reentrant version > latency: replace strerror with reentrant version > node: replace strerror with reentrant version > pdump: replace strerror with reentrant version > pdump: use rte strerror > power: replace strerror with reentrant version > vhost: replace strerror with reentrant version > bpf: replace strerror with reentrant version > bus/cdx: replace strerror with reentrant version > bus/dpaa: replace strerror with reentrant version > bus/fslmc: replace strerror with reentrant version > bus/pci: replace strerror with reentrant version > bus/vmbus: replace strerror with reentrant version > bus/vdev: use rte strerror > common/cnxk: replace strerror with reentrant version > common/mlx5: replace strerror with reentrant version > common/mlx5: use rte strerror > crypto/caam_jr: replace strerror with reentrant version > dma/idxd: replace strerror with reentrant version > net/bnxt: replace strerror with reentrant version > net/af_xdp: replace strerror with reentrant version > net/af_xdp: use rte strerror > net/bonding: replace strerror with reentrant version > net/bonding: use rte strerror > net/cnxk: replace strerror with reentrant version > net/dpaa: replace strerror with reentrant version > net/dpaa2: replace strerror with reentrant version > net/enetfec: replace strerror with reentrant version > net/failsafe: replace strerror with reentrant version > net/failsafe: use rte strerror > net/i40e: replace strerror with reentrant version > net/ice: replace strerror with reentrant version > net/ixgbe: replace strerror with reentrant version > net/memif: replace strerror with reentrant version > net/memif: use rte strerror > net/mlx4: replace strerror with reentrant version > net/mlx4: use rte strerror > net/mlx5: replace strerror with reentrant version > net/mlx5: use rte strerror > net/qede: replace strerror with reentrant version > net/sfc: replace strerror with reentrant version > net/tap: replace strerror with reentrant version > net/tap: use rte strerror > net/vhost: replace strerror with reentrant version > net/virtio: replace strerror with reentrant version > raw/ifpga: replace strerror with reentrant version > vdpa/ifc: replace strerror with reentrant version > vdpa/mlx5: replace strerror with reentrant version > vdpa/sfc: replace strerror with reentrant version > > devtools/checkpatches.sh | 8 + > drivers/bus/cdx/cdx.c | 6 +- > drivers/bus/cdx/cdx_vfio.c | 58 +- > drivers/bus/dpaa/base/fman/fman.c | 8 +- > drivers/bus/dpaa/dpaa_bus.c | 5 +- > drivers/bus/fslmc/fslmc_vfio.c | 28 +- > drivers/bus/pci/bsd/pci.c | 20 +- > drivers/bus/pci/linux/pci.c | 16 +- > drivers/bus/pci/linux/pci_uio.c | 50 +- > drivers/bus/pci/linux/pci_vfio.c | 52 +- > drivers/bus/pci/pci_common_uio.c | 6 +- > drivers/bus/vdev/vdev.c | 2 +- > drivers/bus/vmbus/linux/vmbus_bus.c | 16 +- > drivers/bus/vmbus/linux/vmbus_uio.c | 55 +- > drivers/bus/vmbus/vmbus_common.c | 13 +- > drivers/bus/vmbus/vmbus_common_uio.c | 7 +- > drivers/common/cnxk/roc_dev.c | 12 +- > drivers/common/cnxk/roc_model.c | 8 +- > drivers/common/mlx5/linux/mlx5_nl.c | 15 +- > drivers/common/mlx5/mlx5_common.c | 6 +- > drivers/crypto/caam_jr/caam_jr_uio.c | 11 +- > drivers/dma/idxd/idxd_bus.c | 33 +- > drivers/net/af_xdp/rte_eth_af_xdp.c | 27 +- > drivers/net/bnxt/bnxt_stats.c | 8 +- > drivers/net/bnxt/rte_pmd_bnxt.c | 65 ++- > drivers/net/bnxt/tf_core/tf_core.c | 509 +++++++++++++----- > drivers/net/bnxt/tf_core/tf_em_common.c | 56 +- > .../net/bnxt/tf_core/tf_em_hash_internal.c | 10 +- > drivers/net/bnxt/tf_core/tf_em_host.c | 51 +- > drivers/net/bnxt/tf_core/tf_em_internal.c | 32 +- > drivers/net/bnxt/tf_core/tf_global_cfg.c | 23 +- > drivers/net/bnxt/tf_core/tf_identifier.c | 20 +- > drivers/net/bnxt/tf_core/tf_if_tbl.c | 15 +- > drivers/net/bnxt/tf_core/tf_msg.c | 347 +++++++++--- > drivers/net/bnxt/tf_core/tf_rm.c | 14 +- > drivers/net/bnxt/tf_core/tf_session.c | 161 ++++-- > drivers/net/bnxt/tf_core/tf_sram_mgr.c | 51 +- > drivers/net/bnxt/tf_core/tf_tbl.c | 62 ++- > drivers/net/bnxt/tf_core/tf_tbl_sram.c | 103 +++- > drivers/net/bnxt/tf_core/tf_tcam.c | 53 +- > drivers/net/bonding/bonding_testpmd.c | 18 +- > drivers/net/bonding/rte_eth_bond_api.c | 5 +- > drivers/net/bonding/rte_eth_bond_flow.c | 4 +- > drivers/net/bonding/rte_eth_bond_pmd.c | 16 +- > drivers/net/cnxk/cnxk_rep_msg.c | 9 +- > drivers/net/dpaa/dpaa_ethdev.c | 10 +- > drivers/net/dpaa/fmlib/fm_lib.c | 15 +- > drivers/net/dpaa2/dpaa2_ethdev.c | 12 +- > drivers/net/enetfec/enet_uio.c | 5 +- > drivers/net/failsafe/failsafe.c | 15 +- > drivers/net/failsafe/failsafe_args.c | 12 +- > drivers/net/failsafe/failsafe_eal.c | 7 +- > drivers/net/failsafe/failsafe_flow.c | 4 +- > drivers/net/failsafe/failsafe_ops.c | 5 +- > drivers/net/failsafe/failsafe_private.h | 17 +- > drivers/net/i40e/i40e_testpmd.c | 109 +++- > drivers/net/ice/ice_testpmd.c | 10 +- > drivers/net/ixgbe/ixgbe_testpmd.c | 30 +- > drivers/net/memif/memif_socket.c | 10 +- > drivers/net/memif/rte_eth_memif.c | 45 +- > drivers/net/mlx4/mlx4.c | 29 +- > drivers/net/mlx4/mlx4_ethdev.c | 18 +- > drivers/net/mlx4/mlx4_rxq.c | 18 +- > drivers/net/mlx4/mlx4_txq.c | 10 +- > drivers/net/mlx5/hws/mlx5dr_matcher.c | 2 +- > drivers/net/mlx5/linux/mlx5_ethdev_os.c | 22 +- > drivers/net/mlx5/linux/mlx5_os.c | 21 +- > drivers/net/mlx5/linux/mlx5_socket.c | 40 +- > drivers/net/mlx5/linux/mlx5_verbs.c | 20 +- > drivers/net/mlx5/mlx5.c | 8 +- > drivers/net/mlx5/mlx5_devx.c | 9 +- > drivers/net/mlx5/mlx5_mac.c | 2 +- > drivers/net/mlx5/mlx5_rxmode.c | 8 +- > drivers/net/mlx5/mlx5_rxq.c | 12 +- > drivers/net/mlx5/mlx5_rxtx.c | 5 +- > drivers/net/mlx5/mlx5_stats.c | 7 +- > drivers/net/mlx5/mlx5_testpmd.c | 58 +- > 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 | 16 +- > drivers/net/qede/qede_regs.c | 9 +- > drivers/net/sfc/sfc_flow.c | 5 +- > drivers/net/sfc/sfc_flow_tunnel.c | 6 +- > drivers/net/sfc/sfc_mae.c | 152 ++++-- > drivers/net/tap/rte_eth_tap.c | 55 +- > drivers/net/tap/tap_flow.c | 33 +- > drivers/net/tap/tap_netlink.c | 12 +- > drivers/net/tap/tap_tcmsgs.c | 12 +- > drivers/net/vhost/rte_eth_vhost.c | 14 +- > drivers/net/virtio/virtio_user/vhost_kernel.c | 21 +- > .../net/virtio/virtio_user/vhost_kernel_tap.c | 56 +- > drivers/net/virtio/virtio_user/vhost_user.c | 52 +- > drivers/net/virtio/virtio_user/vhost_vdpa.c | 30 +- > .../net/virtio/virtio_user/virtio_user_dev.c | 26 +- > drivers/net/virtio/virtio_user_ethdev.c | 21 +- > drivers/raw/ifpga/afu_pmd_n3000.c | 10 +- > drivers/raw/ifpga/base/ifpga_fme_rsu.c | 24 +- > drivers/raw/ifpga/ifpga_rawdev.c | 5 +- > drivers/vdpa/ifc/ifcvf_vdpa.c | 57 +- > drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 5 +- > drivers/vdpa/sfc/sfc_vdpa_ops.c | 15 +- > lib/bpf/bpf_load_elf.c | 5 +- > lib/eal/common/eal_common_fbarray.c | 6 +- > lib/eal/common/eal_common_options.c | 19 +- > lib/eal/common/eal_common_proc.c | 32 +- > lib/eal/common/eal_common_trace_utils.c | 14 +- > lib/eal/freebsd/eal.c | 10 +- > lib/eal/freebsd/eal_interrupts.c | 26 +- > lib/eal/freebsd/eal_memory.c | 6 +- > lib/eal/freebsd/eal_timer.c | 22 +- > lib/eal/include/rte_errno.h | 3 + > lib/eal/linux/eal.c | 25 +- > lib/eal/linux/eal_dev.c | 5 +- > lib/eal/linux/eal_hugepage_info.c | 17 +- > lib/eal/linux/eal_interrupts.c | 51 +- > lib/eal/linux/eal_memalloc.c | 118 ++-- > lib/eal/linux/eal_memory.c | 102 +++- > lib/eal/linux/eal_timer.c | 6 +- > lib/eal/linux/eal_vfio.c | 102 +++- > lib/eal/unix/eal_filesystem.c | 12 +- > lib/eal/unix/eal_unix_memory.c | 19 +- > lib/eal/unix/rte_thread.c | 18 +- > lib/eal/windows/include/rte_os_shim.h | 1 + > lib/eventdev/rte_event_eth_rx_adapter.c | 8 +- > lib/latencystats/rte_latencystats.c | 10 +- > lib/node/kernel_tx.c | 8 +- > lib/pdump/rte_pdump.c | 12 +- > lib/power/guest_channel.c | 15 +- > lib/power/power_kvm_vm.c | 6 +- > lib/power/power_pstate_cpufreq.c | 14 +- > lib/power/rte_power_pmd_mgmt.c | 6 +- > lib/vhost/fd_man.c | 14 +- > lib/vhost/socket.c | 34 +- > lib/vhost/vduse.c | 105 +++- > lib/vhost/vhost_user.c | 25 +- > 136 files changed, 3172 insertions(+), 1045 deletions(-) > NAK - not needed. See my earlier comments.