From: Wolfgang Denk Date: Fri, 05 Apr 2013 20:47:12 +0200 Subject: [U-Boot] env: fix potential stack overflow in environment functions In-Reply-To: <515F1504.4090705@gmail.com> References: <1363987581-28050-1-git-send-email-robherring2@gmail.com> <20130403153014.GF7035@bill-the-cat> <20130405111710.8C04C200589@gemini.denx.de> <20130405162410.DD71120063A@gemini.denx.de> <515EFE6F.1020609@gmail.com> <20130405171322.E76A120063A@gemini.denx.de> <515F1504.4090705@gmail.com> Message-ID: <20130405184712.B12A72005BC@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 Rob, In message <515F1504.4090705@gmail.com> you wrote: > > >> If the stack is all of RAM, then what address should the initrd and dtb > >> be copied to? > > > > Why do they have to be copied at all? Why cannot they remain where > > they have been loaded in the firtst place? The memcpy just costs time, > > which is a precious resource. Leave it to the user to find a > > reasonable location in RAM where he loads the data, and don't mess > > with it. > > I've got no freaking idea! I do turn that crap off in my environment > with initrd_high=0xffffffff. But the default operation is to copy it. Scott, Andy: I think I remember that some architectures really _need_ LMB - can you please shed a bit ligh on which these are, and why? And why it is enabled everywhere? Also, any information about the underlying design, intended memory map etc. would be highly welcome. 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 1 1 was a race-horse, 2 2 was 1 2. When 1 1 1 1 race, 2 2 1 1 2.