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 9E8D543330; Wed, 15 Nov 2023 01:09:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 274004027B; Wed, 15 Nov 2023 01:09:40 +0100 (CET) Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) by mails.dpdk.org (Postfix) with ESMTP id 613FD40261 for ; Wed, 15 Nov 2023 01:09:38 +0100 (CET) Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-6d64c1155a8so2869587a34.2 for ; Tue, 14 Nov 2023 16:09:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1700006977; x=1700611777; 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=tb8G9OUS+14Nx45AwD9iFFS507Pg0FfU4vkJpEFh/js=; b=W2iPaPfg3o8v089nAfCajPXQYQkRFopdowh3w+MOuFd8wpYKyWu1KOP+2wonFi0b8E dU1vGyXrwvPzt1ndyQ7PG7LqXffvjWjlRC5j2QI5sPaWyGWfndYDHKqozo30sk6BJ+5n wdldst/BKis4WN07SVH5++O53pYN2EVnLrurGQ+28CaJ4sZnnsNDtEB4sgSDiX/I0CEp JK9ZYqG3NBjMd6I4o7jZa0DiNb+2oo/zx+5c3v1GGslXUSmqIvu+ew/ql2CybAr55cXa WjzPju2qBT0aw2YIc6sm9AbAqsLVavJNutf0VOPpK2vMypvSQ9JyQwK/IbodiDdEvHo6 UtzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700006977; x=1700611777; 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=tb8G9OUS+14Nx45AwD9iFFS507Pg0FfU4vkJpEFh/js=; b=HkJDlEsOHF4NOOD9axVpOOSwU8+6BBP/mleVpj1U30Wh1FNBYmH0tvsm6NcEVFRIZ1 vERQOkoBi2dnm95dbaY9m6TQ0j/qkRaKn6VptCCzYVvMroWENHrq11a3LJuN/cyiQiTB sTvdd8DLH8QA7SnmDAtAsPMvlLfliZA44NmNusVtAuHwRPzq69RkIcC9s3bhQRmBliGt wRDnYVurARukYdfpGVGtap19OLJsyGYFNaWQRexN/OLeWU1ggENglD98AiztyUXFxJr1 YSjeBIgmYuBO0r5sGx6usGXMyWMKgCRCncV+V7w7xkS9MRAAPsgNip/CEDPXuad9AO1x XLOw== X-Gm-Message-State: AOJu0YyHCpH4jgnyUtXp9DJnpK4cqpohutI/ib+QgO4G6crMRjOi45tu HQvSrfL3h8fCE1acetu6fRTz5g== X-Google-Smtp-Source: AGHT+IG/FqfBxPT8qBs/UQYp4cHDzOjyXIRpqf40NOWFlZxWPwKN8t59DzNIvnZ3BMNJ2w6eNzLeig== X-Received: by 2002:a9d:65c6:0:b0:6d6:4fed:a21a with SMTP id z6-20020a9d65c6000000b006d64feda21amr4030308oth.6.1700006977382; Tue, 14 Nov 2023 16:09:37 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id d24-20020a634f18000000b00588e8421fa8sm92980pgb.84.2023.11.14.16.09.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 16:09:37 -0800 (PST) Date: Tue, 14 Nov 2023 16:09:34 -0800 From: Stephen Hemminger To: Jie Hai Cc: , Nicolas Chautru , Maxime Coquelin , Amr Mokhtar , , Subject: Re: [PATCH v3 02/22] app/bbdev: replace strtok with reentrant version Message-ID: <20231114160934.4f0a580f@hermes.local> In-Reply-To: <20231114110006.91148-3-haijie1@huawei.com> References: <20231113104550.2138654-1-haijie1@huawei.com> <20231114110006.91148-1-haijie1@huawei.com> <20231114110006.91148-3-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 Tue, 14 Nov 2023 18:59:46 +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 version. > > Fixes: 0acdb9866756 ("test/bbdev: add FFT operations cases") > Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev") > Cc: stable@dpdk.org > > Signed-off-by: Jie Hai > Acked-by: Chengwen Feng NAK Please don't make wide assertions about multi-threading. All these are only called from test_bbdev_vector_read which is single threaded. Please limit patches to places where you are sure the use is multi-threaded.