Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp552326lqh; Thu, 28 Mar 2024 09:15:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUYvkWtbnxMZqJ9fVleJStPyUtOw/Ca8S36a7+IcjHW6BcnFMeB2+4Xbn5WbGcCFDbkq8I9otf+RUWX2hnbhe1AK2OpII28DsTqdtTZow== X-Google-Smtp-Source: AGHT+IHyl+n5xDOrZtLwk9TDMxl9ut+TDZSjOPtvI5fnHbemvkbKf7DnJu0P9y8LmRIN5lViU8DR X-Received: by 2002:ac2:41c1:0:b0:515:8c3e:5665 with SMTP id d1-20020ac241c1000000b005158c3e5665mr2117513lfi.27.1711642555265; Thu, 28 Mar 2024 09:15:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711642555; cv=pass; d=google.com; s=arc-20160816; b=piNbSH0m9snq547yo7CifgYQFmdiu4UOUf4LB2MVBeiaRcMRg1XaqBID5bQdDfo12y bdVWHR+NlOv5xVi652xmiN2RKPTy52TfDegOPZGAaHIdKOuaPm/MdCzmtorCZaF4lP9P gfqGrI37kp4ZgFcgoEAUYkYBp9TNObdh3e5gXr4qGLTiUPkv/NM4CO4dTyTH6aUn/okd eJV/IvV0KhjONPuWwxQwMBEihnPUVTYGgcXMUadGexcsB+wKAZAISFNP7Y5eQVRNv70V 2VpF6TJWCVPNkf66L7TCVS2DflMG+3kK8xcTy7QUcswwknKQnVCxFvjhZN43+yvho6MR g6zA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=Nlqxr/bvKcQEet5k+iEZxfxFtReH0oxeGe+9rBIGChM=; fh=ltsJLrJsqne2hSOruzJLgrsrKmng2FfOkZcLTLMleGM=; b=s1aqv/V5s9ND7mbK4+J3dOVSFsQKc088TAZ3YRFCuKFypNh7lLPpL8sUg7GzM9UgCS QJMpfWrsNlOr49qqQi1QOluDmkThZWjvnpGp0OoEWGrvEvJ+ZH6ueg97EIiaieIXO2Tw U2ygDhLQ9lqnsPpApvYh41pvfHWEd+uOMmtstwFldwuBJIxYfcqmrqH6pgIGuz0/qBkG xtBLgG2lHniK2Pj6C9j93XwA2qaE6jfpVFmAwQKOFo2/SHWgGTMiZGg5LDIHuLgJ3hOV MuTudViLaYqmVroyUgq1LZzo9Oex5c5oO+X5yjodXx3jOtmT31LOFYgvNf7N2sDsFd5a mk4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=XJta8GHb; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=NJts7+Fx; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-123224-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123224-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ne32-20020a1709077ba000b00a47473982besi927996ejc.381.2024.03.28.09.15.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 09:15:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123224-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=XJta8GHb; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=NJts7+Fx; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-123224-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123224-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F224B1F26740 for ; Thu, 28 Mar 2024 16:15:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 465F912F5AF; Thu, 28 Mar 2024 16:15:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="XJta8GHb"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="NJts7+Fx" Received: from fhigh6-smtp.messagingengine.com (fhigh6-smtp.messagingengine.com [103.168.172.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94A2212D747 for ; Thu, 28 Mar 2024 16:15:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711642548; cv=none; b=l1/hLXDyCVJf4p2FZZNmZTztXBYfRoNsrrGm/KFebnvZY90jI+lSxn5oANcVlfwx5xVKTCrTXmnHMaF5izfiL/E+kEoTBd81bEv38MpM4Ce9NLkhH7b1nVZC6cxNPIbPuuR+JMPjKJGJQ2s2cx8FS92PfRrMsntFFCpt6Ul3SqE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711642548; c=relaxed/simple; bh=v02XpB7OV8DkGlQt/Qz7rW5MYJ43YTUITJ885h0GBeg=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=p4K5Q/RlnXEsYSUPoQK6INl7VM0twDBmHCHiT2INYi7gkTKLRjAgQHpVuzbmyVRD9koXGzQ2eXEbZij+oa2Wuhr7L9cDB7+l9lFezMYoE2uLr0Ad18WzJYouxxZf20a3+Rt4sh5Y+BDXYQxkXirwA2oDCatCL2Q5ZIo1MAEhlKg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=XJta8GHb; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=NJts7+Fx; arc=none smtp.client-ip=103.168.172.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id A4D31114013A; Thu, 28 Mar 2024 12:15:45 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Thu, 28 Mar 2024 12:15:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1711642545; x=1711728945; bh=Nlqxr/bvKc QEet5k+iEZxfxFtReH0oxeGe+9rBIGChM=; b=XJta8GHbCf6pJaGPWD3ptYx7JV xdSb1fthKz4oLLtTwnpXfBVL83pe0gRmNKs9450ssZHTQ5eN33S2xF/vzA1l35l6 H1oVeBWZ2NmEAJKt89YFquSXwoIPrxRtyRakpe4QBYPeM4LcQTlt0Q06TdvlfXSA gI+gIKTxYPLZvvCi1A2Zg2Xtmu1qcG+Wl8sK44KwDPIGMmeb7t62ZaZHwZl6UpkZ +X48xh7bnB1kc13cAcKm9FyxUniP2pwPaqtBLV9L9M60IYjq7MOykjNUsw8M7KLj UhO/DLLDTs+eMmZcgeCOefqSb/VRN9/aFLvPkgT4f/CNjZnz8Bz0gYuYzMiQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1711642545; x=1711728945; bh=Nlqxr/bvKcQEet5k+iEZxfxFtReH 0oxeGe+9rBIGChM=; b=NJts7+FxDHcJEL5pK+4tvgMNRJbgRA2+uP27FsZCB44P C8d2y2ChIiNjD04/Rngq/Q1qSrd2q4sTZkDAcBckKrtvFhjkDtp3Iv52QxBLIJaT ADQYPcmHRvd37LmrsR8IJDzn9kpD55ym/4FHXkAzD577Z9ezm2+K+fyPhTWyXR2n u5YX+l/qi8UxZYZZL7I4aMXwcSsgUQ5JTjnxQ8r4yM3hN433fJB3ohQ6HWEPgFgY 8NsqQbQ6crGqBAd9Oz/RfHb2tkVJzsncwsFt4Avs3cOWIaw3up/nEtBJ+vTEbNT0 Ono90XDTK4Sdu9+sDms2HaMRDdcG4/BfnoJTljNV3Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudduledgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepueekhfevteeileejffeguddtveehgefhgeeutedvjeetuefhiedvgfffiefg hefhnecuffhomhgrihhnpegtohhmphhonhgvnhhtpggtrhgvrghtvgdrnhgrmhgvnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghrnhgusegr rhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B501FB6008F; Thu, 28 Mar 2024 12:15:44 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-333-gbfea15422e-fm-20240327.001-gbfea1542 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <05702c97-f210-4d5f-94cf-c2f98027e29b@app.fastmail.com> In-Reply-To: <508e4ede-ab78-418d-9aef-f657827b6dd1@moroto.mountain> References: <20240328140512.4148825-1-arnd@kernel.org> <20240328140512.4148825-2-arnd@kernel.org> <508e4ede-ab78-418d-9aef-f657827b6dd1@moroto.mountain> Date: Thu, 28 Mar 2024 17:15:21 +0100 From: "Arnd Bergmann" To: "Dan Carpenter" , "Arnd Bergmann" Cc: linux-kernel@vger.kernel.org, "Florian Fainelli" , "Greg Kroah-Hartman" , "Broadcom internal kernel review list" , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev Subject: Re: [PATCH 01/11] staging: vc04_services: changen strncpy() to strscpy_pad() Content-Type: text/plain On Thu, Mar 28, 2024, at 15:42, Dan Carpenter wrote: > On Thu, Mar 28, 2024 at 03:04:45PM +0100, Arnd Bergmann wrote: >> diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c >> index 258aa0e37f55..6ca5797aeae5 100644 >> --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c >> +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c >> @@ -937,8 +937,8 @@ static int create_component(struct vchiq_mmal_instance *instance, >> /* build component create message */ >> m.h.type = MMAL_MSG_TYPE_COMPONENT_CREATE; >> m.u.component_create.client_component = component->client_component; >> - strncpy(m.u.component_create.name, name, >> - sizeof(m.u.component_create.name)); >> + strscpy_pad(m.u.component_create.name, name, >> + sizeof(m.u.component_create.name)); > > You sent this earlier and we already applied it. Sorry about that. I normally mark patches I send as applied in the subject but it looks like I lost the annotation by accident. > Btw, I just learned there is a new trick to write this when it's just > sizeof(dest). > > strscpy_pad(m.u.component_create.name, name); Ah, cute. arnd