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 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2082FC001DE for ; Wed, 9 Aug 2023 01:39:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 457D58682A; Wed, 9 Aug 2023 03:39:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="LjT773zH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 90582867F7; Wed, 9 Aug 2023 03:39:41 +0200 (CEST) Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 88FF3867D2 for ; Wed, 9 Aug 2023 03:39:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-d299ed34bacso628548276.1 for ; Tue, 08 Aug 2023 18:39:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1691545178; x=1692149978; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=MOwvaAr95Q0h8blYTxr4VwsglnFXn/MWxXWBUJiI1+s=; b=LjT773zHXpBtdJgWm+BrtenNq0qtmAwLWk73Lttks3ruiUuYRXAiO7U+Y8v0luRn6k Vpz+0vcXkW/BzlxnwksoQzEdNAVAPc0k7hYw0wPcuejzdmHQRVgZtwGxVhM7bFxLW49s To1RLiPu9t76+s8ac2QYPwQ5f77cZ6evHiXYs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691545178; x=1692149978; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MOwvaAr95Q0h8blYTxr4VwsglnFXn/MWxXWBUJiI1+s=; b=a+cfoffGo7350DHl8850mNVSIIRQqJJX6u7GhDy9pS9pvRe0kPyw0PL3/dm7COy12i uYflZU8dkVWnywNwcCwFD3GvPjWjfhwfqvsGAdanEmYbKnu6ZcoulL+6fIh8V+Yt/95S coY4VUOfyb+x29bkjd89ADzEu8TGUITP1gokFq7SVkozq4WK59iRoxrDW439yYKh2vzw knyde0H6USd+nXczFCGjH9VDJ/8gyWpZNHQ1EafSQRDBrs38N7zixgy7JxX56UEVpzCR 4ZZp/Dc/XEfjwzzRDyPW5uU0/KCWpg2K2UtV7zEP9rNW4zGTlSiei/NpUJBvGyiY/ohU bFLw== X-Gm-Message-State: AOJu0Ywwh9cWn5iM77xbSlj50Gf66yOi6kDnHOKNxJINXWHc7HU86x3n AstzrkQuByFVX2T3G9a3rE8V/g== X-Google-Smtp-Source: AGHT+IFT8ypK7JPFm9XROw/NllZhcn3Dr6fMB58aaw5C5+PTSdEEjuH4Pvx4950cYd1beaOTYugJGw== X-Received: by 2002:a25:aca6:0:b0:d40:3069:b3b1 with SMTP id x38-20020a25aca6000000b00d403069b3b1mr12204943ybi.17.1691545178341; Tue, 08 Aug 2023 18:39:38 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-c8dd-d0aa-4930-890d.res6.spectrum.com. [2603:6081:7b00:6400:c8dd:d0aa:4930:890d]) by smtp.gmail.com with ESMTPSA id r3-20020a25b983000000b00cf79d3a503fsm1012078ybg.42.2023.08.08.18.39.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 18:39:37 -0700 (PDT) Date: Tue, 8 Aug 2023 21:39:36 -0400 From: Tom Rini To: Matthias Schiffer Cc: u-boot@lists.denx.de, Simon Glass , Sean Anderson , Masahisa Kojima , u-boot-amlogic@groups.io, u-boot@ew.tq-group.com Subject: Re: [PATCH 1/2] Revert "lib: string: Fix strlcpy return value", fix callers Message-ID: <20230809013936.GS3630934@bill-the-cat> References: <20230714112451.144294-1-matthias.schiffer@ew.tq-group.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DtTmJukergoWtlF1" Content-Disposition: inline In-Reply-To: <20230714112451.144294-1-matthias.schiffer@ew.tq-group.com> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean --DtTmJukergoWtlF1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 14, 2023 at 01:24:50PM +0200, Matthias Schiffer wrote: > Both the Linux kernel and libbsd agree that strlcpy() should always > return strlen(src) and not include the NUL termination. The incorrect > U-Boot implementation makes it impossible to check the return value for > truncation, and breaks code written with the usual implementation in > mind (for example, fdtdec_add_reserved_memory() was subtly broken). >=20 > I reviewed all callers of strlcpy() and strlcat() and fixed them > according to my understanding of the intended function. >=20 > This reverts commit d3358ecc54be0bc3b4dd11f7a63eab0a2842f772 and adds > related fixes. >=20 > Fixes: d3358ecc54be ("lib: string: Fix strlcpy return value") > Signed-off-by: Matthias Schiffer > Reviewed-by: Simon Glass > Reviewed-by: Sean Anderson Applied to u-boot/next, thanks! --=20 Tom --DtTmJukergoWtlF1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmTS7lgACgkQFHw5/5Y0 tyzAIQv+PaunwDGJdYMubiiEPP9pj0e8kjnaZG6qc/fDnQ3VWeYlelUxPV/nDcPH QOLlbPxBHnP3Z0QxG27zRiiuArSpFl05P8Z6Y7t0iJA2RQIDqy69j9ZZ5AQVccCT 6n/q4SZ50tPEzPf8RHRAboR5kViisq6hPfrDxbEHqFg8eACydcbKPbd1vsZcetP7 Gs5qj5W2Wk4vMvJLNF96NtNGK07rAjCo4HHrBqxLLp3zLqiwzg4CoS+Q3zaPIgvT eD0hKjzUdpLsOOWzSK/udNUdAAH7QVHDoINJO99LrE2OACDKu5Cmvp62u9yvdF42 NGjTCwtKXpPqVQ/+LWz42et/6Fwb4t7qULgb0TXKmOwlDzPgb0VbtAxXuS+wxS/t p3RFCuL1MhHZx6x0kPatcBEjBfCWWNa17vXA9iat3pU8w9qC2zfocVcOnGFMdi93 YTpioTw1xI/q7oTXex2kptPuRh3dKDMFCbQP7ZoonEcCxfove02FADLjmUvoeFZ9 lFWgiiHJ =DVx3 -----END PGP SIGNATURE----- --DtTmJukergoWtlF1--