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 1E69B4331C; Mon, 13 Nov 2023 17:25:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F08D0402CF; Mon, 13 Nov 2023 17:25:32 +0100 (CET) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mails.dpdk.org (Postfix) with ESMTP id 4B66B4026C for ; Mon, 13 Nov 2023 17:25:31 +0100 (CET) Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1cc131e52f1so41518025ad.0 for ; Mon, 13 Nov 2023 08:25:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1699892730; x=1700497530; 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=ZeRaIrpfLdYZ/twVpB0TmA4uyfy82PAtX8qr3J0L5Zs=; b=1JKFR2XtRs1o/pacSUtvIS+77505uBMbKHTQIXBde0e9iJks6C73f7OFoDsUfwjuIK y1PCxka/mdSxDIt9xqJD9OewPBt1MetEOhI1AbWWwL+2DdavvNWL1pGCGKkdxOecWfRj fvhe14FSOoOUk27hLqZVMm+kia5xLP/rz0kgOqEdzd2YhEt44ovO4cenAEZyN8HT1Ge5 eplgJJHeE7kzHg0HU3dIVpfZvC1Dn5/c5AaAacBmggIpE+5xC2xnV2lOQzSLGq3goF5l lDKEaabw3fcZs0syXLiq/VbSz4+MYhJI0t6dI9w8241yOY7J7No3tkDA6N47C7xh6AaH QZ2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699892730; x=1700497530; 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=ZeRaIrpfLdYZ/twVpB0TmA4uyfy82PAtX8qr3J0L5Zs=; b=YNq0EKnUhUxDT9TiP6LK1SPOH7vxRqOsMrhCdunAetO5DYJY5Pqe0fmPZ+o8XkvCwL LBCtBnROmqSV2DSWhMkO14H+Ash83U9C8qW14CfhVSc2gh3WXHD/A0oRFzwyOT7hobbn quYrnHYT5hEg3xx6vbXMoYO9Uzz81qh0UBV4h0XTa5xNKvvAct2Tsx7r13Ocj+Q1C6QF 9j8Ku7kRyhzyhox1r8Y5ogZc3y5kfY6CddsIz2ZYoVm9Lw9H2sPjp+McPzllpzg3lF9p jrHoTR+lE1inqfba8INqhXaG0BNLHYwPu+h8I2sMOLe8X+u7c2sezIboZ0/YvfNGSkyI 65Iw== X-Gm-Message-State: AOJu0YxE9QdEB+nCHQ9/By2vwQApzr82UXNgKYHZgllmPqI2q9FFzaK9 GqLIep0AmxTXY76shMdDWWj2Ng== X-Google-Smtp-Source: AGHT+IGRA0u8wBv8Fqb93Z53YkFYOFRd1fNT3OdVJj5PknDuEUhGrmqy5VZExrsKNF3V1OH5bRwRFg== X-Received: by 2002:a17:902:f683:b0:1cc:3bc5:d259 with SMTP id l3-20020a170902f68300b001cc3bc5d259mr19381plg.30.1699892730285; Mon, 13 Nov 2023 08:25:30 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id 21-20020a170902ee5500b001c8836a3795sm4225861plo.271.2023.11.13.08.25.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 08:25:30 -0800 (PST) Date: Mon, 13 Nov 2023 08:25:28 -0800 From: Stephen Hemminger To: Jie Hai Cc: , , Subject: Re: [PATCH 00/21] replace strtok with strtok_r Message-ID: <20231113082528.0740028f@hermes.local> In-Reply-To: <20231113104550.2138654-1-haijie1@huawei.com> References: <20231113104550.2138654-1-haijie1@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, 13 Nov 2023 18:45:29 +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. > > The strtok() is non-reentrant, it is better to replace it with a > reentrant function. Lots of churn. And most of these places are never callable from multiple threads. It does indicate that some better arg handling is needed.