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 AA97DA034F for ; Wed, 10 Nov 2021 07:54:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A195140142; Wed, 10 Nov 2021 07:54:58 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2089.outbound.protection.outlook.com [40.107.237.89]) by mails.dpdk.org (Postfix) with ESMTP id C8465410EF for ; Wed, 10 Nov 2021 07:54:56 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dxPAc6LlRpNvFMzX3XyWiP3SPr5ywT5lLItsVG28F0Mas+WablyRMfoXuH580uqhRku691AFJgLrap2BXwtbvA2G4zNqbHs5Ej//PxzEvlubpKaTAdiXSGw+XxVPJBcdNv/1O84zcxmLSF4yMhAUY5omrmqK4lmfppCVh3jIAhQ2xUaGKMpMdRhQwzdljCyM+06HdrfB2Pp4sRHsDzpbnkqpaSOQ+x+keGRS+cMDLzVcYklMAH5XJmNxYxsgdjkXZ/w+WBph2ZD1MG+u7+UfMN3JT39NpUHyoHA8Z6JFE+QtXPDl23lFU4Q4bFnURaTqZhh17hK3oFPF+jNHcPQtJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IeSDggOk27V9B6URTT0rwqecMnWJnKpDVAtANHEjCFk=; b=cJlr23z7oOjDvV99itpWrGMyW/9CmtWXZlVjhA7K7IoIIVsTrV4SIRzgr4ytw0IXF3VIefU1kRqhwasda8cDzLt2WQaegqMqzLFIPUIB8RU1ZmdL+KQThR/m2xqRcA+ySRxP8af7Mq2t8yqtKHNRnjaOyAMv3H7izgHk+mPfiZVECP9tGPgBVlqmDhOyQlkYzbxrKs7evCcMvJ1LK5f7zrjVBcsnrWjoRbTVlp6e/zKPWuuOQT58ACQe+D+q28dY0u7JxQAOt88sfZB5dw8whsmxaLuuBvj54m8i+oM2jbLTeU6LELkWsxeTDk3Myr6b02ysLHkBrwVK2jkZgypYRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IeSDggOk27V9B6URTT0rwqecMnWJnKpDVAtANHEjCFk=; b=RSrNNwOd1cH15/hWtj/MJeFJVaf7OlrUYCeOdJZftp5BKgoBcre94R8qgKmVBUU4UDYs1+GcT8Bph+b9v4DYE7TEdkHHmHJDs1CkZtpEagwsCXzxintsF7FzNqjDtrtXb1l9gCRWqBpCZFRyUS4xVZ7zs96okJ0rSlusuyRsymwkT0Dzgax+E9zWMjkPmaNYhgWCas7igeKF0dkmjetYXTIipfPP1vVDLqpfGq/SrI3XpFunMa/OdOCaCHEnRW42+iuDOGpeFO3SLTj5Lu30KQ8nlJoH9rQAuiNBGRWT1hrz3EzsdH6RAE+8lv40yGwcowEv7VN1ZiyqgI4KY54t5Q== Received: from DS7PR03CA0027.namprd03.prod.outlook.com (2603:10b6:5:3b8::32) by BY5PR12MB4888.namprd12.prod.outlook.com (2603:10b6:a03:1d8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16; Wed, 10 Nov 2021 06:54:55 +0000 Received: from DM6NAM11FT017.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b8:cafe::39) by DS7PR03CA0027.outlook.office365.com (2603:10b6:5:3b8::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:54:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT017.mail.protection.outlook.com (10.13.172.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:54:54 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:54:51 +0000 From: Xueming Li To: Zhihong Peng CC: Luca Boccassi , Xueqin Lin , Bruce Richardson , dpdk stable Date: Wed, 10 Nov 2021 14:31:26 +0800 Message-ID: <20211110063216.2744012-203-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 349ba462-4651-472d-ee72-08d9a417006c X-MS-TrafficTypeDiagnostic: BY5PR12MB4888: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NpqFRbxj4DV/XH65B/ANAD2Zvb2B+hbSgdXRqGEYepHQpzPPHBe0aLg5D+V06Gw2uJp6Ijt/Cx9tUzOGf7BfcCsWSTkhrISOR7BJW/lSWGNKWGPJ7YUGlYAaFpT+vDDWldFPB2JDOsyW5dJZV5geuwbJj+8Kqm2fjErEVWXU05SUrBdUpAexixNyrnjpFzcF4lLIGrVN8oAiXjmVeC2tXWmWYG44GMcO+varLzCR+Ed3TmnyqTy+C2+B12tRcvDG/kYuaLyg0aIMjLtRhSXkgKWho10zvoJ1UpMF+j8KGSX3fYX1mjmH/53UG0sSiWpThbVUGfEIsvBmdYwg7Yhq+MXJHM96GkBEjKjm0eszvbjwY3gHFk2jZOm3IN+neTqF1XZVTyXz+kh53mYSWMByOA/Hr1ZO5LO04q5x8/WXyPtB3d9Mmu0JTGxLIZYyus2YlK0zKQ5hCkAh5xwmNMBoTkSVIA4kLOR5sVldoRC2s/satxsL8ogV1A22gIo+8c1dsVaFfhUM9Pak0Q3o4qnXvwmAO1mR8IswPfa71VUMehrO+O6KKyP9VVX0EqtWg3bzSsIMdzHCkrDLIAj2qSbKETvIqh8kdX4YsDjpJIZtJvzx3LV5NVuTwi5cgcSMMW/AozVKAoIIu/7tec/O4pXo025ZJDXywQLbM9gi/gSsAOAsX9al0wI4nEl7bBOH71XIFPTMpthCJZtt38qXk47hI3itMirDNE2fNxRe3sMG/vDPpFzC8+UzQD5PoG/aQE1w2xSxR3Ha94N4ZLET85wD2SwiXhzmxykYfZvFDkXKLsc8Fx1+MQJ7YZgn5DEB+eFyr7low/JcoHgkWr9LUX0sgA== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(6666004)(186003)(8676002)(83380400001)(7696005)(4326008)(6286002)(70586007)(26005)(2906002)(16526019)(336012)(8936002)(426003)(508600001)(356005)(2616005)(1076003)(70206006)(966005)(53546011)(55016002)(47076005)(86362001)(7636003)(5660300002)(4001150100001)(6916009)(316002)(82310400003)(36756003)(54906003)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:54:54.6878 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 349ba462-4651-472d-ee72-08d9a417006c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT017.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4888 Subject: [dpdk-stable] patch 'examples/performance-thread: fix build with ASan' has been queued to stable release 20.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/4b98552d4d3ca54ebc58014b4163e1164e2e4342 Thanks. Xueming Li --- >From 4b98552d4d3ca54ebc58014b4163e1164e2e4342 Mon Sep 17 00:00:00 2001 From: Zhihong Peng Date: Wed, 20 Oct 2021 15:46:43 +0800 Subject: [PATCH] examples/performance-thread: fix build with ASan Cc: Xueming Li [ upstream commit 4d2d1258151657d69b0be5d118956b7e809f9d47 ] Code changes to avoid the following build error: "strncpy specified bound XX equals destination size". Signed-off-by: Xueqin Lin Signed-off-by: Zhihong Peng Acked-by: Bruce Richardson --- examples/performance-thread/common/lthread.c | 4 ++-- examples/performance-thread/common/lthread_cond.c | 6 +++--- examples/performance-thread/common/lthread_mutex.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/performance-thread/common/lthread.c b/examples/performance-thread/common/lthread.c index 3f1f48db43..190e5874b1 100644 --- a/examples/performance-thread/common/lthread.c +++ b/examples/performance-thread/common/lthread.c @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -463,6 +464,5 @@ void lthread_set_funcname(const char *f) { struct lthread *lt = THIS_LTHREAD; - strncpy(lt->funcname, f, sizeof(lt->funcname)); - lt->funcname[sizeof(lt->funcname)-1] = 0; + strlcpy(lt->funcname, f, sizeof(lt->funcname)); } diff --git a/examples/performance-thread/common/lthread_cond.c b/examples/performance-thread/common/lthread_cond.c index cdcc7a7b5a..e7be17089a 100644 --- a/examples/performance-thread/common/lthread_cond.c +++ b/examples/performance-thread/common/lthread_cond.c @@ -20,6 +20,7 @@ #include #include +#include #include "lthread_api.h" #include "lthread_diag_api.h" @@ -57,10 +58,9 @@ lthread_cond_init(char *name, struct lthread_cond **cond, } if (name == NULL) - strncpy(c->name, "no name", sizeof(c->name)); + strlcpy(c->name, "no name", sizeof(c->name)); else - strncpy(c->name, name, sizeof(c->name)); - c->name[sizeof(c->name)-1] = 0; + strlcpy(c->name, name, sizeof(c->name)); c->root_sched = THIS_SCHED; diff --git a/examples/performance-thread/common/lthread_mutex.c b/examples/performance-thread/common/lthread_mutex.c index 01da6cad4f..709ab9f553 100644 --- a/examples/performance-thread/common/lthread_mutex.c +++ b/examples/performance-thread/common/lthread_mutex.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "lthread_api.h" #include "lthread_int.h" @@ -52,10 +53,9 @@ lthread_mutex_init(char *name, struct lthread_mutex **mutex, } if (name == NULL) - strncpy(m->name, "no name", sizeof(m->name)); + strlcpy(m->name, "no name", sizeof(m->name)); else - strncpy(m->name, name, sizeof(m->name)); - m->name[sizeof(m->name)-1] = 0; + strlcpy(m->name, name, sizeof(m->name)); m->root_sched = THIS_SCHED; m->owner = NULL; -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:10.858279926 +0800 +++ 0202-examples-performance-thread-fix-build-with-ASan.patch 2021-11-10 14:17:02.014078251 +0800 @@ -1 +1 @@ -From 4d2d1258151657d69b0be5d118956b7e809f9d47 Mon Sep 17 00:00:00 2001 +From 4b98552d4d3ca54ebc58014b4163e1164e2e4342 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 4d2d1258151657d69b0be5d118956b7e809f9d47 ] @@ -19 +22 @@ -index 98123f34f8..009374a8c3 100644 +index 3f1f48db43..190e5874b1 100644 @@ -30 +33 @@ -@@ -465,6 +466,5 @@ void lthread_set_funcname(const char *f) +@@ -463,6 +464,5 @@ void lthread_set_funcname(const char *f) @@ -64 +67 @@ -index 061fc5c19a..f3ec7c1c60 100644 +index 01da6cad4f..709ab9f553 100644