]> 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)
commitc71862be9a628168af8dfce2f13e7f63c8eefb75
tree04aea1d33b8877855174cba80acd04d1e81d359b
parentadc0ca15664b5d3ab8cd07943a3dcb65b6b84ea0
efi/x86: Remove extra headroom for setup block

The following commit:

  3e72a2c0c420 ("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