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 D1EBA45BEC; Sun, 27 Oct 2024 04:09:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96E674067B; Sun, 27 Oct 2024 04:08:52 +0100 (CET) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mails.dpdk.org (Postfix) with ESMTP id B9E604065D for ; Sun, 27 Oct 2024 04:08:47 +0100 (CET) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-7e9e38dd5f1so2540734a12.0 for ; Sat, 26 Oct 2024 20:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729998527; x=1730603327; 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=9yiSNgpHyxRGsg1t8BqnTvlZbf9QVT3XMkQ4UTC/cZg=; b=B5M4kT89Fz4X/gPCssjSJDZzrk5FMQbUwkRGt6aQUjKb9TzRNqK/tAsqNLJgjA0W+C DYCykQicebvqMHk8J9Ma/cLVzf7LiYlv3tHliGRk8fmu24TpceWW7LAhRAfYqyM8EZy0 pblNWS7I/BJJJHzz6hj1YZGoVseqcUJf/hNDdUo2sMHUHn7ol0FdLy0M9C7N1UKhmm2o RaGrvauISk18sa62gGyU+eYRqkgDDCFOhKrCbNVFsoT9Uxg7qXaTwuQ3W6ZfUggBzUTy HTNMG4RZxyuICo72sA/8616GBhmjEF5w6i2FVxXwsIIMQroQ6sRYo4Gb+V81aHE0SlzV 8Sgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729998527; x=1730603327; 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=9yiSNgpHyxRGsg1t8BqnTvlZbf9QVT3XMkQ4UTC/cZg=; b=akCu3QhsRMV963qaOA13NX2myrivmzxHNWmMJMsRZsaIHiwoPqxxAL8vXkSoKynXBA sUwYvUdUGX8qPEn+2UdQCE0yEuui+jDD0Mf6VzhRXjLkkNxp+gsc0S7pZizD4mhBIjOV OT5JJ8OAdpxcux3fG33nSr7rnjFo+WvixFimjLdDvnjwMDtfh9K/6urSI9juAj44UD5x aau0DCR/rKLHdMDeLfFCoQsLtRwLQ9DSqZU4eoeWnfGOLIblmpeVgumI7OqCzpi5B3Iu yY/gujSf+OD+rEGhgvEK42inTr80R+eR8iDYiHNZmKnxAnOgJC7/1GA35VvQ+6mSs/cf xUnw== X-Gm-Message-State: AOJu0YwLYcHmfDwU8hZ3c5x8WUbAOVB/xIKCeDa6lR35JPu9E1wg/hDr zyYgiV+61y38xvJB1Luvdi94R+YHVW2p1Y6IAoN/dCTGzePUA3YL6anKYyMW2C8= X-Google-Smtp-Source: AGHT+IEm0iPswgHr+c1yr+yKonaxrPo2w3qaIvaHOVncUPSlqHnlsVhr7NFhGM3ccqde2tNjz59N0Q== X-Received: by 2002:a05:6a20:e198:b0:1d6:5f3d:4ab7 with SMTP id adf61e73a8af0-1d9a8402da9mr6077054637.22.1729998526908; Sat, 26 Oct 2024 20:08:46 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72057931766sm3384534b3a.49.2024.10.26.20.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Oct 2024 20:08:46 -0700 (PDT) Date: Sat, 26 Oct 2024 20:00:28 -0700 From: Stephen Hemminger To: Jie Hai Cc: , , , Anatoly Burakov , Tyler Retzlaff , Amit Prakash Shukla , , , Subject: Re: [PATCH v4 02/13] eal: replace strtok with reentrant version Message-ID: <20241026200028.44b83e1b@hermes.local> In-Reply-To: <20241026101451.29135-3-haijie1@huawei.com> References: <20231113104550.2138654-1-haijie1@huawei.com> <20241026101451.29135-1-haijie1@huawei.com> <20241026101451.29135-3-haijie1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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:40 +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. >=20 > The strtok() is non-reentrant, it is better to replace it with a > reentrant version. >=20 > Fixes: 2054f31a1fcd ("mem: add memseg info in telemetry") > Cc: stable@dpdk.org >=20 > Signed-off-by: Jie Hai > Acked-by: Chengwen Feng > Acked-by: Amit Prakash Shukla > Acked-by: Morten Br=C3=B8rup This doesn't need to go to stable. parse_params is always single threaded.