From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08475A00BE; Tue, 28 Apr 2020 09:15:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D9F9C1D42B; Tue, 28 Apr 2020 09:15:51 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10070.outbound.protection.outlook.com [40.107.1.70]) by dpdk.org (Postfix) with ESMTP id 403021D415 for ; Tue, 28 Apr 2020 09:15:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YB2fP77g6EZTl5gdpsc3TWeGXUJelb840nYokacjrW0=; b=bvLb0Z3g1CzdHVCJfbsJvKxn16wKewPGRD5YPr7UNL4WwgbMUFxODQGBtD7J5nal6RDF3jbf7VtqJHqePSitn6IF5aMee/zbAL40jJzk2h5YaLyzDh5vJ2JJnJojWDlA+69uNlC0/+9iU5odcl0Z/Xugp8J2lrp9BqUDn2qoP0I= Received: from AM0PR10CA0045.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:150::25) by AM0PR08MB3329.eurprd08.prod.outlook.com (2603:10a6:208:57::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13; Tue, 28 Apr 2020 07:15:49 +0000 Received: from AM5EUR03FT044.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:150:cafe::e0) by AM0PR10CA0045.outlook.office365.com (2603:10a6:20b:150::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Tue, 28 Apr 2020 07:15:49 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT044.mail.protection.outlook.com (10.152.17.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.19 via Frontend Transport; Tue, 28 Apr 2020 07:15:48 +0000 Received: ("Tessian outbound 5abcb386707e:v54"); Tue, 28 Apr 2020 07:15:48 +0000 X-CR-MTA-TID: 64aa7808 Received: from cbfa7bbfd99b.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1C4B0E9C-82FD-4B5E-A621-468DF8C945A9.1; Tue, 28 Apr 2020 07:15:43 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id cbfa7bbfd99b.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 28 Apr 2020 07:15:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SuC52DgZALTpiZzNwFZ+seC6Mu9rHauPziMfjSBOpDAd1KY8/c/E2uRFT4PfWZbg/ThfEsX8agcoeLjuexImVzfYhokqK8+yAwMADmM61712sM8Y9CIWWW8PCceABBM/1rk52rMPA3KWyXvzg1mlsLsLag15cF2weC7arrFYLZm6OiuwUgCq1QWgq37/l/GKkqgnkLEz3cqacOJ8Mfy7rd5E5nohdkuUWUM9LSh0A6TlBka5x2xh80N5h0d68VbN0svyoS/4/K4/tosib0CWFsNaAA18cD0K1Rph8PY2bYJIDyfRX1Od8JNR2bEnOGt6VFMihJ03b+sFP2L2rYnbCA== 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-SenderADCheck; bh=YB2fP77g6EZTl5gdpsc3TWeGXUJelb840nYokacjrW0=; b=UZMfR3E8liEM0cgGZdA+VzjMsx6thlX9T2yaw8FKRuXODVvYS87B6qYLcEIhH1z2+nR9KjWD4pI1vLWoDadCSzYcX+/Ya75NcTx3Gpwh60rgY85x4yjQCBecc/CzU4PoRBnHHhzm2pNDjeIb2a7LmKaTUZlLStcxbUcn23KWFPQiwbX69J1ZdDAh9ozEmHBcc1rcCK/+ZwAFVHlcyNbTKLgZsPgw0IhzLWPzqXGrCyHW/X4HRan6GnH4v/jnVoLkLBydNOKL0ADix+4MxYIPLjBKnkSS4R8L8JGwU5AelkgsHHqPjaY0osEmOqw0uDDfyxR4TaFIGHZwfj5kSFrlfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YB2fP77g6EZTl5gdpsc3TWeGXUJelb840nYokacjrW0=; b=bvLb0Z3g1CzdHVCJfbsJvKxn16wKewPGRD5YPr7UNL4WwgbMUFxODQGBtD7J5nal6RDF3jbf7VtqJHqePSitn6IF5aMee/zbAL40jJzk2h5YaLyzDh5vJ2JJnJojWDlA+69uNlC0/+9iU5odcl0Z/Xugp8J2lrp9BqUDn2qoP0I= Received: from VE1PR08MB4640.eurprd08.prod.outlook.com (2603:10a6:802:b2::11) by VE1PR08MB5134.eurprd08.prod.outlook.com (2603:10a6:803:110::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Tue, 28 Apr 2020 07:15:40 +0000 Received: from VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::785b:54ca:be80:7b66]) by VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::785b:54ca:be80:7b66%2]) with mapi id 15.20.2937.020; Tue, 28 Apr 2020 07:15:40 +0000 From: Phil Yang To: Stephen Hemminger CC: "jerinj@marvell.com" , "skori@marvell.com" , "dev@dpdk.org" , "david.marchand@redhat.com" , Lijian Zhang , Ruifeng Wang , nd , nd Thread-Topic: [dpdk-dev] [PATCH] trace: fix build with gcc 10 Thread-Index: AQHWHLOlzKhJs7z2EkqtzMHF8vNW0KiNMMcAgADs4KA= Date: Tue, 28 Apr 2020 07:15:40 +0000 Message-ID: References: <1588006058-10728-1-git-send-email-phil.yang@arm.com> <20200427095836.4cc5bbad@hermes.lan> In-Reply-To: <20200427095836.4cc5bbad@hermes.lan> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 5d7a9d12-f75f-48a4-87fb-211e39062727.0 x-checkrecipientchecked: true Authentication-Results-Original: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d1640d91-e701-4985-1f76-08d7eb43fa39 x-ms-traffictypediagnostic: VE1PR08MB5134:|VE1PR08MB5134:|AM0PR08MB3329: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:5516;OLM:5516; x-forefront-prvs: 0387D64A71 X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4640.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(346002)(376002)(39860400002)(136003)(396003)(4326008)(8676002)(8936002)(55236004)(81156014)(7696005)(6916009)(53546011)(6506007)(186003)(5660300002)(55016002)(4744005)(9686003)(33656002)(76116006)(52536014)(316002)(86362001)(2906002)(478600001)(66446008)(54906003)(66476007)(71200400001)(64756008)(26005)(66556008)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: wXmMbtBrx1T/l13MySibm73Igz8Jfj+TX3LGm8SNeoXEqH7pqXy4OBxQYCFDu07AtY4v8Z9FHLQjnepTfvRtrblWNDqYSGiL/DdgPRTLsbaz/i/vIC2onO/ueqan+ZbXSXq+XZ2n9t+3/+41ppCuBSC6GXu557ZFOmtVs9d4Mnc+KYHPE6OpgNXvXsWaz8/zHCoIftI4WrL7nDEncrtIxlzk6KY9bLPbjnQjvAhkxcBuhwpJUPOtS4o0uT3Pys2VKzBzlBPRdBY91km0ZK3FzzX65pfi8WMwTwSjVaLjBQsy9Uj06V+vnA4DUhlG1tyvoyzBEcnwe5fp61VBeac2RhLnPlHoc/hLdZFpIa6RAcskVHarp2a9uMXI43K9t5WICYWL4m6HNkILV2mGtev27p+Wu13GDjxlAG/OLgrhhpPprTeJxO6NxLNKpfCyYvKw x-ms-exchange-antispam-messagedata: +cCnfoL9BtXVby0PjZRinuyBjqWqlpdSDfwZQ31+TOKsyViPmf99Ata/I7OHUoXM7mHeNvpD87CCKn35zNz2pQVjMlTIplolDfzokT09KiH208ZwGAvBoLzX2WP3+vEpCcmtirlC9px3YXhYkPmX0IQXZs/2LHtn4zKqGeX2uXr9bGPG+2JcJ1wZuGvIRFuhpV/nRD69UyMud0p7kWnmCR1X8o8qe1rc0dni97tTTq6isIunnsGOJJwmgfYK0Gs8YwIJxbl0TVpY1Ru832IXIEcf1zmuMY2mUaQqhe/yfQiSlG1Ol2UzAlm+aYn+qiGfubEeTStluUMlb5UBAxP/AGor9FUfFiF2zfgJXEehZD9KWEo8AZDcp1oiS2eYj9jR0qcGAjF3cGfjApeEd4RqA7WM5hKwFQIV1xHX/pAPTwVN1xBiFSJx+lvj+2UhEwk26iZB0YjdSofcUDGqCr9+WtBG/fgheQOJN10GGupixUWDRNwddwbgpKLJSTHkZTj9vdQgmGt4KIrBVYHO3COU/A4qdQDk9JH9FAbVzZn3RX/niiijGXTQACvrd1ZjRr5M9mTVPmdWi0LzKIhjYQ57zplWRWxSE2Ecc2oOcqjrhOF3D4GIvlkRQw3BP76685woPVO06UP0NeZLJHv3Gc/7phSWPbtyYt5gLhBSHs5SvLRRWekmjRtVC8OLRwb4TTWOUQofGvLG6y2+nDWHTOhpDAJ3lyssFqCqDJGQUtq8cKXISUxnKnbXAZwGsbjTsEep8o7sMWTVL7dg795v8ahwq+zuJ9bEuUAUjTXtAIYnazA= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5134 Original-Authentication-Results: networkplumber.org; dkim=none (message not signed) header.d=none; networkplumber.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT044.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(396003)(376002)(346002)(136003)(46966005)(82740400003)(47076004)(70586007)(81166007)(26005)(356005)(54906003)(70206006)(82310400002)(7696005)(52536014)(86362001)(53546011)(6506007)(36906005)(4744005)(5660300002)(316002)(55016002)(2906002)(336012)(9686003)(478600001)(8676002)(8936002)(81156014)(4326008)(186003)(6862004)(33656002); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 31906840-4e26-432a-9f64-08d7eb43f565 X-Forefront-PRVS: 0387D64A71 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 25IipwIeJA5IetQWx6gSNk5WkhHyMjf5TBGjwe5UEukhQ65AcFAO8KC0wgTXDFWy0VlWsZn5rQ93XKLxeXknPyhcVjkqHJYNQfOCa35OGR3csynH4sUTEMUaKT5b40bYJIPV8v8DpUwPs17PkR7u2t6rOmzOEJ5AZCVOQKKi1dFb32rBpVU4qkO7DQqeBbg/JKhQ7LeTlHHpDxqdnqTcTk/QlK9IpiGPx3UmrpQoGKNpkJlNGleqTG2wPdhxDuURUFVg354zB2KU4MuwYL1AoOi0Fv0XecHhOao4M836Oguzkv4KVKcqYCOi0+51M7BP6pDAI/KR2m2YZLa/bLKQ8JKmiQPkdZr2iRILauErYulxnKRu48UoKFQTp67iWROC7G+ASCKc7GQoyHumlKiEd/TPqNcDue809J1pt70usQmCD3oIOuXN2C8HT+SrDUmHmVxeCrFKlgyUu2N4R6L2HwAnnqHYt8hYXgfa8lWoVDAsaU0LPlVg5VtD3So+hORYGQLUyWg+vWdc9udCapNYIw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2020 07:15:48.9018 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d1640d91-e701-4985-1f76-08d7eb43fa39 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3329 Subject: Re: [dpdk-dev] [PATCH] trace: fix build with gcc 10 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Stephen Hemminger > Sent: Tuesday, April 28, 2020 12:59 AM > To: Phil Yang > Cc: jerinj@marvell.com; skori@marvell.com; dev@dpdk.org; > david.marchand@redhat.com; Lijian Zhang ; > Ruifeng Wang ; nd > Subject: Re: [dpdk-dev] [PATCH] trace: fix build with gcc 10 >=20 > On Tue, 28 Apr 2020 00:47:38 +0800 > Phil Yang wrote: >=20 > > - if (strlen(optarg) >=3D size) { > > + /* the specified trace directory name cannot > > + * exceed PATH_MAX-1. > > + */ > > + if (strlen(optarg) >=3D (size - 1)) { > > trace_err("input string is too big"); >=20 > strnlen() is useful for these kinds of cases. Thanks, Stephen. I think it checks the dir_name length here, not to trim the input 'optarg'. So I think the strlen() can handle it correctly. Thanks, Phil=20