From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Fri, 5 Apr 2013 18:17:37 -0500 Subject: [U-Boot] env: fix potential stack overflow in environment functions In-Reply-To: <20130405184712.B12A72005BC@gemini.denx.de> (from wd@denx.de on Fri Apr 5 13:47:12 2013) Message-ID: <1365203857.17535.16@snotra> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/05/2013 01:47:12 PM, Wolfgang Denk wrote: > 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. CCing Kumar, who added a lot of the lmb stuff -- but it looks like ramdisk copying predated lmb. -Scott