lkml.org 
[lkml]   [2008]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: cleanup boot-heap usage
On Tue, Apr 8, 2008 at 3:54 AM, Alexander van Heukelum
<heukelum@mailshack.com> wrote:
> The kernel decompressor wrapper uses memory located beyond the
> end of the image. This might lead to hard to debug problems,
> but even if it can be proven to be safe, it is at the very
> least unclean. I don't see any advantages either, unless you
> count it not being zeroed out as an advantage. This patch
> moves the boot-heap area to the bss segment.
>
> Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
>
> ---
>
> On Tue, Apr 08, 2008 at 10:23:54AM +0200, Ingo Molnar wrote:
> > * Alexander van Heukelum <heukelum@mailshack.com> wrote:
> > > I did see that the malloc space that the inflate code is using is
> > > taken from _after_ the end of the bss. I don't see how this is
> > > protected from being used/overwritten. Changing the stack size changes
> > > the memory layout a bit... maybe you were so unlucky to create a
> > > vmlinux image that was just barely smaller than some threshold and
> > > increasing the stack size made the decompression/relocation area be
> > > located somewhere else?
the compressed image is copied to end of buff ( with extra code size
for from relocated: in .text to _end)
and do the on possition decompressed. .text section is near end.

YH


\
 
 \ /
  Last update: 2008-04-08 20:41    [W:0.080 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site