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 58C6443321; Tue, 14 Nov 2023 02:08:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3CB4402BC; Tue, 14 Nov 2023 02:08:21 +0100 (CET) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id 589D9402B2 for ; Tue, 14 Nov 2023 02:08:20 +0100 (CET) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1cc394f4cdfso37416335ad.0 for ; Mon, 13 Nov 2023 17:08:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1699924099; x=1700528899; 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=k+g/sckuYUA4LvgPy5isa6jE281G1UyGifP84Jyqedc=; b=XYMYU3xiW8Q3wsvf460mY9VGEMiy1b4cU4+YrLgpIPiSX7RPO0KhB0QGTsVZT2IBnJ XUeQPTUhDsvLPaPr6BQEan7d642JD+qRLnFyNfWlegmKJyC5gE1gkTiQFaot/q6ELJDD vo7Qqgltx02UhmxlRJeyyB6YczNww9MMHxBr8UXRC0M1cZGvEnpKG29cC3+IslGMgpBQ Gmaz912T4Q/WlhdWg4V85CkuOaVWSfZaJEQOv1hr8yu2Il+OV/jNSQtwAFuq6l79dYR+ /1AC1swN1o97tSphOhUSx8/AmZNm2vtaDiUyOHt1eeRW+1x18p14m7Z/ysnr1bJT306M W6jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699924099; x=1700528899; 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=k+g/sckuYUA4LvgPy5isa6jE281G1UyGifP84Jyqedc=; b=vcqX99XoR8tAjjwPRtLatHS9JkPTBjmpXRAGxoyyUR1mkOnWBlpVoc2oeRvcg/VbOe AEndiwL1z6Nuj+c6hJN2CjHUgc1wwieEDv1juY7qxYPDvMPamw+BNeSil6ftMh8GI68Y H74DGLV+8ZjkVG5OglXO+ISimIN9zgW6hV4TQasOrDZgwlAoOOyoux7XGSxd2NeuE0sQ 8z7usKEAtwe5rcIROI5w5IhkiUcExaA7M1CS9JrGA7Nba/0dyDKJSd4mfpnjCC0SSzCj ProrMv0g0ol75eDM+Yxe1YX7TKtFRk7GOvke7oMzqtPau0C4Ql6DjSllqfpjMrleithG QK9Q== X-Gm-Message-State: AOJu0Yz6VdeZxOfpPQPtVMTSFa+mL8Q7iZZLnmKlDO03Ld4kE64kwSHb pFxVs6YQ+VCXHzXHDolHzL1LLQ== X-Google-Smtp-Source: AGHT+IEVg4RzapFv9lymnD8hRyuGIzbx2XdDmvAMZ+WOGRdC2D+ymMQWPJwF4il3uk2U4E0AvcXi3w== X-Received: by 2002:a17:902:8ecb:b0:1ce:802:da9 with SMTP id x11-20020a1709028ecb00b001ce08020da9mr768563plo.64.1699924099272; Mon, 13 Nov 2023 17:08:19 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id b17-20020a170902ed1100b001cc55bcd0c1sm4628026pld.177.2023.11.13.17.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 17:08:19 -0800 (PST) Date: Mon, 13 Nov 2023 17:08:17 -0800 From: Stephen Hemminger To: fengchengwen Cc: Jie Hai , , Anatoly Burakov , Subject: Re: [PATCH 10/21] lib/eal: replace strtok with strtok_r Message-ID: <20231113170817.5a1e8a9c@hermes.local> In-Reply-To: <81b309a0-7c01-936c-bac6-da6f03414ace@huawei.com> References: <20231113104550.2138654-1-haijie1@huawei.com> <20231113104550.2138654-11-haijie1@huawei.com> <20231113082715.51aa5f78@hermes.local> <81b309a0-7c01-936c-bac6-da6f03414ace@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 Tue, 14 Nov 2023 09:05:10 +0800 fengchengwen wrote: > Hi Stephen, > > On 2023/11/14 0:27, Stephen Hemminger wrote: > > On Mon, 13 Nov 2023 18:45:39 +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. > > > > This code is only called in startup and can not be called by > > multiple threads. > > For the DPDK examples and apps, I think it's OK if it called in startup then may not need replace. > > But as for lib and drivers, I think we shouldn't make such an assumption. > > At last I also recommend fix the examples and apps, because people may refer it. For startup of libs and driver initialization the code is always single threaded. If not many, many other things would break.