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 0165843337; Wed, 15 Nov 2023 12:23:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E03B24068E; Wed, 15 Nov 2023 12:23:16 +0100 (CET) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 2D934402C6 for ; Wed, 15 Nov 2023 12:23:16 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 0B7A4206C3; Wed, 15 Nov 2023 12:23:16 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH 02/43] eal: use rte strerror X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Wed, 15 Nov 2023 12:23:13 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F026@smartserver.smartshare.dk> In-Reply-To: <20231114162254.7c065d56@hermes.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH 02/43] eal: use rte strerror Thread-Index: AdoXWeWPBZ8cYR3ZTfCc7aghOfu3mQAW1UlA References: <20231114082539.1858594-1-huangdengdui@huawei.com> <20231114082539.1858594-3-huangdengdui@huawei.com> <20231114162254.7c065d56@hermes.local> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Stephen Hemminger" , "Dengdui Huang" Cc: , , , , 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 > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Wednesday, 15 November 2023 01.23 >=20 > On Tue, 14 Nov 2023 16:24:58 +0800 > Dengdui Huang wrote: >=20 > > The function strerror() is insecure in a multi-thread environment. > > This patch uses rte_strerror() to replace it. > > > > Cc: stable@dpdk.org > > > > Signed-off-by: Dengdui Huang > > Acked-by: Chengwen Feng > > --- >=20 > Look at implementation of rte_strerror(), it still has issues if > used from non-DPDK registered threads. The macro names RTE_DEFINE_PER_LCORE() and RTE_PER_LCORE() strongly = indicate that the variables are instantiated per lcore. But they are not; they are instantiated per thread [1]: #define RTE_DEFINE_PER_LCORE(type, name) \ __thread __typeof__(type) per_lcore_##name [1]: = https://elixir.bootlin.com/dpdk/v23.11-rc3/source/lib/eal/include/rte_per= _lcore.h#L37