Re: [PATCH] kbuild: correct size calculation of bzImgae / fix x86boot

From: Michael Tokarev
Date: Mon Dec 21 2009 - 14:54:08 EST


Michael Guntsche wrote:
> On 21 Dec 09 15:17, Michal Marek wrote:
>>> How about moving this functionality to mkpiggy where we are
>>> less shell script dependent.
>>>
>>> Something like the following.
>>> I have only tested it lightly (vmlinux.bin did not differ
>>> before/after the patch.
>>
>> I think that it's a good idea to move this out of the makefiles. But for
>> 2.6.33, I think I prefer the patch from Andreas, provided he signs it
>> off and Michael G confirms that it fixes his issue.
>
> Just a quick update from my side. I tried the patch from Andreas and build a kernel
> with dash as defaulti shell. I was able to boot the resulting kernel image
> without any problems.

That's not a good test case. Because even with bogus data the kernel might
boot: for example, allocating alot more memory for the unpacking than necessary -
it does not crash but the data is still bogus.

The better (and much faster) check is to verify that the z_output_len value
in arch/x86/boot/compressed/piggy.S matches the size of
arch/x86/boot/compressed/vmlinuz.bin.

/mjt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/