aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation
diff options
context:
space:
mode:
authorArvind Sankar <nivedita@alum.mit.edu>2020-04-09 15:04:29 +0200
committerIngo Molnar <mingo@kernel.org>2020-04-14 08:32:13 +0200
commit21cb9b414301c76f77f70d990a784ad6360e5a20 (patch)
tree11bb5e67b5cef831600784ae65b614b6582c0dc4 /Documentation
parentefi/x86: Move efi stub globals from .bss to .data (diff)
downloadwireguard-linux-21cb9b414301c76f77f70d990a784ad6360e5a20.tar.xz
wireguard-linux-21cb9b414301c76f77f70d990a784ad6360e5a20.zip
efi/x86: Always relocate the kernel for EFI handover entry
Commit d5cdf4cfeac9 ("efi/x86: Don't relocate the kernel unless necessary") tries to avoid relocating the kernel in the EFI stub as far as possible. However, when systemd-boot is used to boot a unified kernel image [1], the image is constructed by embedding the bzImage as a .linux section in a PE executable that contains a small stub loader from systemd that will call the EFI stub handover entry, together with additional sections and potentially an initrd. When this image is constructed, by for example dracut, the initrd is placed after the bzImage without ensuring that at least init_size bytes are available for the bzImage. If the kernel is not relocated by the EFI stub, this could result in the compressed kernel's startup code in head_{32,64}.S overwriting the initrd. To prevent this, unconditionally relocate the kernel if the EFI stub was entered via the handover entry point. [1] https://systemd.io/BOOT_LOADER_SPECIFICATION/#type-2-efi-unified-kernel-images Fixes: d5cdf4cfeac9 ("efi/x86: Don't relocate the kernel unless necessary") Reported-by: Sergey Shatunov <me@prok.pw> 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/20200406180614.429454-2-nivedita@alum.mit.edu Link: https://lore.kernel.org/r/20200409130434.6736-5-ardb@kernel.org
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions