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

2013-04-06 Thread Wolfgang Denk
Dear Scott, In message <1365203857.17535.16@snotra> you wrote: > > > 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 underlyi

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

2013-04-05 Thread Scott Wood
On 04/05/2013 01:47:12 PM, Wolfgang Denk wrote: Dear Rob, In message <515f1504.4090...@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

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

2013-04-05 Thread Tom Rini
On Fri, Apr 05, 2013 at 01:16:36PM -0500, Rob Herring wrote: > On 04/05/2013 12:13 PM, Wolfgang Denk wrote: > > Dear Rob, > > > > In message <515efe6f.1020...@gmail.com> you wrote: > >> > >>> In addition to commit 60d7d5a "env: fix potential stack overflow in > >>> environment functions" discussed

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

2013-04-05 Thread Wolfgang Denk
Dear Rob, In message <515f1504.4090...@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 jus

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

2013-04-05 Thread Rob Herring
On 04/05/2013 12:13 PM, Wolfgang Denk wrote: > Dear Rob, > > In message <515efe6f.1020...@gmail.com> you wrote: >> >>> In addition to commit 60d7d5a "env: fix potential stack overflow in >>> environment functions" discussed here, I think we should also revert >>> commit fcfa696 "ARM: increase lmb

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

2013-04-05 Thread Wolfgang Denk
Dear Rob, In message <515efe6f.1020...@gmail.com> you wrote: > > > In addition to commit 60d7d5a "env: fix potential stack overflow in > > environment functions" discussed here, I think we should also revert > > commit fcfa696 "ARM: increase lmb stack space reservation to 4KB" > > because it is co

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

2013-04-05 Thread Rob Herring
On 04/05/2013 11:24 AM, Wolfgang Denk wrote: > Dear Tom, dear Albert, > > In message <20130405111710.8c04c200...@gemini.denx.de> I wrote: >> >> I hereby request to revert that commit. > > In addition to commit 60d7d5a "env: fix potential stack overflow in > environment functions" discussed here,

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

2013-04-05 Thread Wolfgang Denk
Dear Tom, dear Albert, In message <20130405111710.8c04c200...@gemini.denx.de> I wrote: > > I hereby request to revert that commit. In addition to commit 60d7d5a "env: fix potential stack overflow in environment functions" discussed here, I think we should also revert commit fcfa696 "ARM: increas

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

2013-04-05 Thread Wolfgang Denk
Dear Rob Herring, In message <515eed36.9090...@gmail.com> you wrote: > > The stack size limit only comes into play when bootm runs and starts > moving initrd and dtb to high addresses below the stack. At that point, > the stack size does become limited because only 4KB (recently increase > from 1K

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

2013-04-05 Thread Wolfgang Denk
Dear Rob Herring, In message <515eed36.9090...@gmail.com> you wrote: > > The stack size limit only comes into play when bootm runs and starts > moving initrd and dtb to high addresses below the stack. At that point, > the stack size does become limited because only 4KB (recently increase > from 1K

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

2013-04-05 Thread Rob Herring
On 04/05/2013 06:17 AM, Wolfgang Denk wrote: > Dear Tom Rini, > > In message <20130403153014.GF7035@bill-the-cat> you wrote: >> >> On Fri, Mar 22, 2013 at 11:26:21AM -, Rob Herring wrote: >> >>> From: Rob Herring >>> >>> Most of the various environment functions create CONFIG_ENV_SIZE buffers

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

2013-04-05 Thread Wolfgang Denk
Dear Tom Rini, In message <20130403153014.GF7035@bill-the-cat> you wrote: > > On Fri, Mar 22, 2013 at 11:26:21AM -, Rob Herring wrote: > > > From: Rob Herring > > > > Most of the various environment functions create CONFIG_ENV_SIZE buffers on > > the stack. At least on ARM and PPC which ha

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

2013-04-03 Thread Tom Rini
On Fri, Mar 22, 2013 at 11:26:21AM -, Rob Herring wrote: > From: Rob Herring > > Most of the various environment functions create CONFIG_ENV_SIZE buffers on > the stack. At least on ARM and PPC which have 4KB stacks, this can overflow > the stack if we have large environment sizes. So move a