[PATCH RESEND] arm: add command line option for the total image size
Simon Horman
horms at verge.net.au
Wed Nov 13 23:16:09 EST 2013
On Wed, Nov 13, 2013 at 04:16:35PM +0100, Daniel Mack wrote:
> Currently, kexec on arm assumes that it's safe to place binary images
> such as atags, dtb or initrd at an estimated offset after the load
> address. That estimated offset is set to 4 times the size of the
> compressed image, hence assuming a minimum compression ratio of 1:4.
>
> While that assumption matches what the in-kernel compressors are able to
> achive, it doesn't take into account the .bss section the kernel image
> carries, and which can grow to arbitrary sizes while not accounting to
> the compressed image size.
>
> After decompression, and before the execution of the compressed kernel,
> the .bss area is initialized to zeros, trampeling over the binary images
> in case they happen to live in that piece of memory.
>
> Unfortunately, determining the full image size is not easiliy possible
> at runtime, as it would include doing all possible ways of
> decompression and then walk the ELF sections by hand.
>
> For now, allow users to override the static offset with a new, arm
> specific command line argument. Users are supposed to set this, and
> determine a sane value by using 'arm-linux-size vmlinux'.
>
> Signed-off-by: Daniel Mack <zonque at gmail.com>
Thanks, applied.
More information about the kexec
mailing list