Re: [PATCH 4/5] efi/x86: Remove extra headroom for setup block

From: Arvind Sankar
Date: Mon Mar 02 2020 - 23:14:47 EST


On Mon, Mar 02, 2020 at 04:21:30AM +0000, Mika Penttilà wrote:
>
>
> On 2.3.2020 1.05, Arvind Sankar wrote:
> > commit 223e3ee56f77 ("efi/x86: add headroom to decompressor BSS to
> > account for setup block") added headroom to the PE image to account for
> > the setup block, which wasn't used for the decompression buffer.
> >
> > Now that we decompress from the start of the image, this is no longer
> > required.
> >
> > Add a check to make sure that the head section of the compressed kernel
> > won't overwrite itself while relocating. This is only for
> > future-proofing as with current limits on the setup and the actual size
> > of the head section, this can never happen.
> >
> > Signed-off-by: Arvind Sankar <nivedita@xxxxxxxxxxxx>
>
> To make clear, the kernel (head_32.s and head_64.s) still relocates
> itself to the end of the buffer and does in-place decompression. So this
> is just to make init sz smaller.
>
>

Not init_size itself, but it reduces the size allocated for the PE
image. Do you want me to update the comment to make that clearer?