From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09AECC4338F for ; Tue, 17 Aug 2021 19:38:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C66126054E for ; Tue, 17 Aug 2021 19:38:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C66126054E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9Omd5RMbfrbcg92SCVGfPhMLzk+SRKXQDAAgcSnKaok=; b=L4K2yxoOFwBuvsh4f7rdlMs+3s 65ixP2Nxp0HoriWmXfmJM84CGqku2jtc32ppoApYyTluD+KYNsTTaxPr04eSNdhyrxr84/7S2jGU3 XyV4KVHxjN3A4OcI9f++blfJS8KZMPTZa63K7azTbUmpR+OhNPtHJZB5PtqdeuiChM8mKtbrqp4o2 MQ3sN7ZnEwqO3Xi5Txt5Fu7JaJygc4RF+XANZz6RMmHZDfgFeghxoKmRmZkHjDqMhAfzpiHAylI42 kbUCN5rGNBH1rmrqNUorIpQ81SEr4kLUWEiMmcueKiRK9NVjxOp1ldPDybc6I/euN5iKei2Kc00kx 1KDscNqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mG4t3-003Jyx-1B; Tue, 17 Aug 2021 19:36:37 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mG4sz-003JyU-Az for linux-arm-kernel@lists.infradead.org; Tue, 17 Aug 2021 19:36:34 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 459506023F; Tue, 17 Aug 2021 19:36:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629228991; bh=lVa/cd8lqAuqi9Xb46n1dPF4Die4VhK2NzXYomfF1F8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MpJqbMTJoY9HiVSZCsZrCWmeFiwYxVmy4mvIkY/TJff233HbXI+HI8emvSQdhDnJm cldRNM3O2aVw8yw8aqyKfCfpGEkKLJfWa0n1ky2BpCQvl1h4jRXohis0wYuD75rLGe 3fFg/KGIBqfqYC2g3Wtr+cv06xJFYMt5tkSsofOZap6dXiPj+KYJjn8xMBuUWr90xO y007nNsP0lBUpseo1WG1MmFBr1gMygd03q+3kwknYO/3PNTOFzt6CjYnhWl2hT99v0 +jm3vyqtQmwLjH0Rg08PmYb4Kpd7SftftL4pCMPmyUGrpz80BgkA8xzCjEcD2XlFRj XXwP/Yym/QKdA== Date: Tue, 17 Aug 2021 21:36:28 +0200 From: Wolfram Sang To: Len Baker Cc: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] i2c: sun6i-pw2i: Prefer strscpy over strlcpy Message-ID: Mail-Followup-To: Wolfram Sang , Len Baker , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org References: <20210817165859.5429-1-len.baker@gmx.com> MIME-Version: 1.0 In-Reply-To: <20210817165859.5429-1-len.baker@gmx.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210817_123633_436612_842357E8 X-CRM114-Status: GOOD ( 12.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============7263614939098504278==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============7263614939098504278== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zfDDtb3v1My09Y6o" Content-Disposition: inline --zfDDtb3v1My09Y6o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 17, 2021 at 06:58:59PM +0200, Len Baker wrote: > strlcpy() reads the entire source buffer first. This read may exceed the > destination size limit. This is both inefficient and can lead to linear > read overflows if a source string is not NUL-terminated. The safe > replacement is strscpy(). >=20 > This is a previous step in the path to remove the strlcpy() function > entirely from the kernel [1]. >=20 > [1] https://github.com/KSPP/linux/issues/89 >=20 > Signed-off-by: Len Baker Applied to for-next, thanks! --zfDDtb3v1My09Y6o Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmEcD7wACgkQFA3kzBSg KbbAshAAqzwcYf+sCrGC16fOCkh5J4iMfSbWmFFrJB1GzLD+Prabz99WbMT9wTR1 s4E8qEP8AH2l88yhtKcgoT4apvfeZxJi6AWJ52pD3n+noQ3xAZie3ss6dVSI1Bib 6VI/+GeEGLZQZkM5rUXWWkYeugOJClYyj2g1aulpW4vLDa9G7rd3/FjEsMk/cMH8 a3yyTm8tRhMGJOIiMTIhxZybdvEzQuyHMNWkhDHrjt+H+KnkQmhqBImmfijEM+HM uS639QWzCTw1d5mwK9VFcM0Kd4f6rrZUFLq2qw8sMB2jVgN7ZchOLnw7JhXM73ok SEETZe5RsaUupDkvhm9+hygBH+1klK+ZDz/G081yyPqJYXtHkYcArDPO1ZnjGNr2 RirCAQokAa/Nly4vJWiRMGNyckLWcx2teYK9t2RTUqwtXC9ivK9b7DtmyGkLX8d1 maIlre3Cy1DeQRuqKGBFC4/xZ9RSP+B8fsrcjnKjur3gUJaNWSCZb+Ub7F2fhiNL QGmzyxqUU7oGNruxICTiNniJ2qm5yNgXQwwWwCRzKt/psap1Kh1jbjgWAQ6uBAgu NRRrVtkw5G1s8UMtThS8Hi4BdTMwTy1klt7R+qeuqE3f/87hBHfOUCQM8mJHp12F RzlRw/o2bBGOlb6OMV5nDH1o/ME8c6rwmGieMXDaN4kfoJWGIn0= =/o4W -----END PGP SIGNATURE----- --zfDDtb3v1My09Y6o-- --===============7263614939098504278== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============7263614939098504278==--