From: Wolfgang Denk Date: Wed, 13 Oct 2010 07:55:27 +0200 Subject: [U-Boot] [PATCH v2 1/6] fdt_relocate: fix fdt size and endian bugs In-Reply-To: References: <1285775292-15060-1-git-send-email-john.rigby@linaro.org> <1285775292-15060-2-git-send-email-john.rigby@linaro.org> <20101012212039.1C8DD1365CD@gemini.denx.de> Message-ID: <20101013055527.871281508A2@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear John Rigby, In message you wrote: > On Tue, Oct 12, 2010 at 3:20 PM, Wolfgang Denk wrote: > > Dear John Rigby, > > > > In message <1285775292-15060-2-git-send-email-john.rigby@linaro.org> you wrote: > >> Fix two problems in fdt_relocate. > Sorry this should be boot_relocate_fdt In the Subject: it's more helpful to refer to the component / file name, i. e. here: "common/image.c: ..." > >> Second, fdt_relocate returns bad size info on little endian > >> platforms because it calls be32_to_cpu on the value returned > >> by fdt_totalsize. ?This is wrong because the value returned > >> by fdt_totalsize is already cpu endian. > > After changing fdt_relocate to boot_relocate_fdt the commit > message is correct. I disagree. My understanding is that fdt_relocate() does not return a bad size, the additional use of be32_to_cpu() in image.c corrupts the correct value. Otherwise the fix would need to be done in fdt_relocate(). > > Um... what are the implications of this on other architectures? > > I believe this bug has never caused anyone problems because > the else has never been reached. So what are the implications, and how has it been tested? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Making files is easy under the UNIX operating system. Therefore, users tend to create numerous files using large amounts of file space. It has been said that the only standard thing about all UNIX systems is the message-of-the-day telling users to clean up their files. -- System V.2 administrator's guide