public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] env: fix potential stack overflow in environment functions
Date: Fri, 05 Apr 2013 11:40:15 -0500	[thread overview]
Message-ID: <515EFE6F.1020609@gmail.com> (raw)
In-Reply-To: <20130405162410.DD71120063A@gemini.denx.de>

On 04/05/2013 11:24 AM, Wolfgang Denk wrote:
> Dear Tom, dear Albert,
> 
> In message <20130405111710.8C04C200589@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: increase lmb stack space reservation to 4KB"
> because it is conceptually broken and just papers over the real
> problems.

Doing so will randomly break any system with a large command or print
buffer. For extra fun, it is dependent on the initrd or dtb image size
in terms of remainder of 4KB multiple.

It is exactly the same code as PPC. It you look at the git history, PPC
made exactly the same change (1 to 4KB increase) around the same time
all the FDT boot code got copied from PPC to ARM. So ARM missed this change.

If the stack is all of RAM, then what address should the initrd and dtb
be copied to?

Rob

  reply	other threads:[~2013-04-05 16:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 21:26 [U-Boot] [PATCH] env: fix potential stack overflow in environment functions Rob Herring
2013-03-22 22:04 ` Wolfgang Denk
2013-03-22 22:56   ` Rob Herring
2013-03-23  0:29     ` Wolfgang Denk
2013-04-03 15:30 ` [U-Boot] " Tom Rini
2013-04-05 11:17   ` Wolfgang Denk
2013-04-05 15:26     ` Rob Herring
2013-04-05 16:15       ` Wolfgang Denk
2013-04-05 16:21       ` Wolfgang Denk
2013-04-05 16:24     ` Wolfgang Denk
2013-04-05 16:40       ` Rob Herring [this message]
2013-04-05 17:13         ` Wolfgang Denk
2013-04-05 18:16           ` Rob Herring
2013-04-05 18:47             ` Wolfgang Denk
2013-04-05 23:17               ` Scott Wood
2013-04-06  7:06                 ` Wolfgang Denk
2013-04-05 18:49             ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=515EFE6F.1020609@gmail.com \
    --to=robherring2@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox