[PATCH] ARM: Fix relocation if image end past uncompressed kernel end
Tony Lindgren
tony at atomide.com
Fri Apr 22 02:09:41 EDT 2011
* Nicolas Pitre <nicolas.pitre at linaro.org> [110421 16:18]:
> On Thu, 21 Apr 2011, Tony Lindgren wrote:
>
> > Otherwise we end up overwriting ourselves. This fixes booting
> > on n900 after commit 6d7d0ae51574943bf571d269da3243257a2d15db
> > (ARM: 6750/1: improvements to compressed/head.S).
> >
> > Signed-off-by: Tony Lindgren <tony at atomide.com>
>
> I don't understand why this is needed. The copy loop is explicitly
> copying from the end going backward exactly to cope with this
> possibility.
>
> Hmmm...
Yeah that's what I'm wondering too.. This is probably not the
right fix.. I'm also wondering that it should be possible to
make uImage also not work by setting loadaddr just before the
uncompressed kernel end.
You would assume that only the running code would not survive
relocation if some of it gets overwritten. But that should be
only the beginning, no idea why the need to relocate all the
way after the whole image?
If stack was overlapping the zImage, I could see it corrupt
the zImage but there not much happening between relocating
and restarting of the bootloader.
Tony
More information about the linux-arm-kernel
mailing list