Messages in this thread |  | | Date | Tue, 8 Apr 2008 11:39:22 -0700 | From | "Yinghai Lu" <> | Subject | Re: [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
|  |