]> git.baikalelectronics.ru Git - kernel.git/commit
efi/x86: Remove extra headroom for setup block
authorArvind Sankar <nivedita@alum.mit.edu>
Sun, 8 Mar 2020 08:08:49 +0000 (09:08 +0100)
committerIngo Molnar <mingo@kernel.org>
Sun, 8 Mar 2020 08:58:21 +0000 (09:58 +0100)
commitd67ad1ef27003b9bc9f241e75f7ae8948edd59a7
tree04aea1d33b8877855174cba80acd04d1e81d359b
parent7bbb426b08605fac07e5af9f149952b1bbfd7e51
efi/x86: Remove extra headroom for setup block

The following commit:

  547cb53a9d9e ("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 the decompression buffer is located at the start of the image,
and includes the setup block, 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@alum.mit.edu>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200303221205.4048668-5-nivedita@alum.mit.edu
Link: https://lore.kernel.org/r/20200308080859.21568-19-ardb@kernel.org
arch/x86/boot/tools/build.c