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 8A072C4332F for ; Sun, 4 Dec 2022 21:51:15 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8CE53856BC; Sun, 4 Dec 2022 22:51:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="FIJm0Ejf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 41681855B9; Sun, 4 Dec 2022 22:51:12 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D7CE7856BC for ; Sun, 4 Dec 2022 22:51:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 566B060DE8; Sun, 4 Dec 2022 21:51:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92FECC433D6; Sun, 4 Dec 2022 21:51:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670190666; bh=v+hZOIx686AXREpjiCcoG/gW61wqv+wKpc01oY0tA74=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FIJm0EjfhFwyaA9nluIyPxvrGqlOMZGYp27imcV0r38UAMHPH7mPnCseQg5Hg7iaq 1GluJ5uEr7Nx9jFziVvA73X7HTY+vjzgUkLl9LIY2w+DB8jo8SEpZ0XShXicTtXdg9 +urpottrUTbR2VkYb0oK9zXd/Q9GHJqxf/QPLFCo+vNSVTdEvYv6zmYckG+oj3enO+ kaRy+2X/JEWDMuKO1V5jUt1+b0rXsKRxd8u/xQQFJ0KafjDTOEguJvJKNSGFhyFAR6 12u2uMLKAwMwThCR50fkhMGvE+JT29lzyqkCDo4xvsIBeX2MkrC2ODyHWeYRIweyv4 wx5DgHRxZnYKg== Received: by pali.im (Postfix) id 9C745949; Sun, 4 Dec 2022 22:51:03 +0100 (CET) Date: Sun, 4 Dec 2022 22:51:03 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Simon Glass Cc: Derek LaHousse , u-boot@lists.denx.de, sr@denx.de, kostap@marvell.com Subject: Re: [PATCH 1/1] mvebu: fix end-of-array check Message-ID: <20221204215103.bbmc3gko2haebs4m@pali> References: <6cbc07b1743d5e304220be5f733ee45c8583d203.camel@seaofdirac.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 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.6 at phobos.denx.de X-Virus-Status: Clean On Monday 05 December 2022 10:16:51 Simon Glass wrote: > On Thu, 1 Dec 2022 at 07:55, Derek LaHousse wrote: > > > > Properly seek the end of default_environment variables. > > > > The current algorithm overwrites from the second variable. This > > replacement finds the end of the array of strings. > > > > Stomped variables include "board", "soc", "loadaddr". These can be > > seen on a "env default -a" after patch, but they are not seen with a > > version before the patch. > > > > Signed-off-by: Derek LaHousse > > --- > > board/Marvell/mvebu_armada-37xx/board.c | 7 +++++-- > > 1 file changed, 5 insertions(+), 2 deletions(-) > > Reviewed-by: Simon Glass > > It seems odd to update the default environment, but if we want to do > this, it should really be done in a function in env/ along with some > tests in test/env > > Regards, > Simon Well, this is just a temporary solution until Marek's env patch series is merged: https://lore.kernel.org/u-boot/20211103232332.2737-1-kabel@kernel.org/ But I agree that tests would prevent these bugs.