[U-Boot] env: fix potential stack overflow in environment functions

Scott Wood scottwood at freescale.com
Sat Apr 6 01:17:37 CEST 2013


On 04/05/2013 01:47:12 PM, Wolfgang Denk wrote:
> Dear Rob,
> 
> In message <515F1504.4090705 at 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


More information about the U-Boot mailing list