From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 27B02A0679 for ; Thu, 4 Apr 2019 22:11:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B717B1B3D7; Thu, 4 Apr 2019 22:11:35 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 076871B3C0 for ; Thu, 4 Apr 2019 22:11:34 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8FE8D27FA4; Thu, 4 Apr 2019 16:11:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 04 Apr 2019 16:11:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=yFQI3gn4zLUrXqFg6RnWIHUVaCjkHZElY6bDVpoYGQk=; b=k+MaTOgETLcp RkjOnFC2QsdYbDx9ARXxiU9MZvWbltqlvYFd0SDXoult3jnpi4JDuPHC2JOok8/8 e854NCLD6gdPcO3sLb9pxT2DNpFZKfpPC6SZO/htnEt1YPCZ5TM1nnjTl89ExRaR cM+gKQDkupvlObbamI/ZJ4H0i7k+LpM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=yFQI3gn4zLUrXqFg6RnWIHUVaCjkHZElY6bDVpoYG Qk=; b=4Xjrxpa7b6Mgh3N0MF0jclucECr5j5c9OR5H/ezUgRssZGF6we30/b60D nuaUufuQoK6sIXY/4ks3tHMlOIyfR+lYmf2wn/9PEBsoY9QCB6PaNEFpT0AHnoe/ sVlTToEeI1QLR8/IgzsBmkoviLzkc2DeN3iSUuhQwAzO03JFo1ujlpU/+0uP48Kh QqLYFsIi7hRsDJG/mB/t6tG6tJT5KEY/0/igzieK7teNmA9WH1T1MxgeDknS9D/X OSMQXV3GqAXXFBXMWFUK3VsBEbXfyddGOQT4rL0WYoxeeILdVU548FRVf+QzDN36 U2xnIkb04RcEjHGVYQgfbJS0ROwnw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrtdehgddugeegucdltddurdeguddtrddttd dmucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfhgggfgtsehtufertddttddv necuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjh grlhhonhdrnhgvtheqnecukfhppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghm pehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhush htvghrufhiiigvpedt X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 8B86AE45F3; Thu, 4 Apr 2019 16:11:32 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org Date: Thu, 04 Apr 2019 22:11:31 +0200 Message-ID: <2985695.VAqBOLQO3E@xps> In-Reply-To: <20190403144505.46234-1-bruce.richardson@intel.com> References: <20190403144505.46234-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 0/5] clean up snprintf use for string copying 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" Message-ID: <20190404201131.fBSuuCybR05KBSy3GLvqLDtHZiCZYDInay85DYkKAkg@z> 03/04/2019 16:45, Bruce Richardson: > There are quite a few instances remaining in DPDK where snprintf is being > used for string copying. These were not being picked up by our existing > coccinelle script, but that can be fixed by editing the script and running > it against our code. In the process a bug was found and fixed in the > bonding pmd, where we were incorrectly specifiying the buffer length > parameter to snprintf. > > The actual replacement was done in two phases - first replacing all > instances where only the snprintf line in question needed changing, then > fixing the other instances where we also needed to add in the header > include. [Using two stages allowed the header addition to be automated too, > since we had a list of files where every one needed the header inclusion] > > > Bruce Richardson (5): > net/bonding: fix buffer length when printing strings > devtools/cocci: make strlcpy replacement smarter > devtools/cocci: create safer version of strlcpy script > replace snprintf with strlcpy without adding extra include > replace snprintf with strlcpy Applied (with 2 rebase changes), thanks