public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: David Gibson <david@gibson•dropbear.id.au>
To: Sebastian Andrzej Siewior <bigeasy@linutronix•de>
Cc: Milton Miller <miltonm@bga•com>, linuxppc-dev@ozlabs•org
Subject: Re: [PATCH] powerpc/boot: compare _start against ei.loadsize instead ei.memsize
Date: Tue, 14 Oct 2008 12:57:53 +1100	[thread overview]
Message-ID: <20081014015753.GD20620@yookeroo.seuss> (raw)
In-Reply-To: <20081013091526.GA9925@www.tglx.de>

On Mon, Oct 13, 2008 at 11:15:26AM +0200, Sebastian Andrzej Siewior wrote:
> If the vmlinux binary in memory is larger than 4 MiB than it collides
> with the initial boot code which is linked at 4 MiB in case of cuBoot.
> If the the uncompressed image size (on disk size) is less than 4 MiB
> then it would fit. The difference between those two sizes is the bss
> section. In cuBoot we have the dtb embedded right after the data
> section so it is very likely that the reset of the bss section (in
> kernel's start up code) will overwrite the dtb blob. Therefore we
> reallocate the dtb. Something similar is allready done to the initrd.
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix•de>

This patch looks sound to me.  It does strike me as only a stopgap
until we come up with some better way of managing the early memory,
preferably avoiding the magical fixed 4MiB (or whatever) offset.

Still, it looks safe - since it does check that the wrapper's malloc()
region can't collide with the kernel's BSS.  So, if this little slice
of extra BSS room is useful for the time being, I see no reason not to
apply the patch.

Acked-by: David Gibson <david@gibson•dropbear.id.au>

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  reply	other threads:[~2008-10-14  1:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-23 20:38 [RFC] powerpc/boot: compare _start against ei.loadsize instead ei.memsize Sebastian Siewior
2008-09-24  1:46 ` Milton Miller
2008-09-25 10:21   ` Sebastian Siewior
2008-09-25 21:43   ` Sebastian Siewior
2008-10-10  3:58     ` Benjamin Herrenschmidt
2008-10-13  9:15       ` [PATCH] " Sebastian Andrzej Siewior
2008-10-14  1:57         ` David Gibson [this message]
2008-10-14  2:00           ` David Gibson
2008-11-01 20:00             ` [PATCH] powerpc/boot: allocate more memory for dtb Sebastian Andrzej Siewior
2008-11-06  0:16               ` David Gibson
2008-09-25 18:15 ` [RFC] powerpc/boot: compare _start against ei.loadsize instead ei.memsize Scott Wood

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=20081014015753.GD20620@yookeroo.seuss \
    --to=david@gibson$(echo .)dropbear.id.au \
    --cc=bigeasy@linutronix$(echo .)de \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=miltonm@bga$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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