x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub
authorMatt Fleming <matt.fleming@intel.com>
Fri, 11 Jul 2014 07:45:25 +0000 (08:45 +0100)
committerMatt Fleming <matt.fleming@intel.com>
Tue, 5 Aug 2014 21:01:04 +0000 (22:01 +0100)
commit7b2a583afb4ab894f78bc0f8bd136e96b6499a7e
tree23d0a8d78194aa6a7a1ba11968516b4a121b0ea3
parentc7fb93ec51d462ec3540a729ba446663c26a0505
x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub

Without CONFIG_RELOCATABLE the early boot code will decompress the
kernel to LOAD_PHYSICAL_ADDR. While this may have been fine in the BIOS
days, that isn't going to fly with UEFI since parts of the firmware
code/data may be located at LOAD_PHYSICAL_ADDR.

Straying outside of the bounds of the regions we've explicitly requested
from the firmware will cause all sorts of trouble. Bruno reports that
his machine resets while trying to decompress the kernel image.

We already go to great pains to ensure the kernel is loaded into a
suitably aligned buffer, it's just that the address isn't necessarily
LOAD_PHYSICAL_ADDR, because we can't guarantee that address isn't in-use
by the firmware.

Explicitly enforce CONFIG_RELOCATABLE for the EFI boot stub, so that we
can load the kernel at any address with the correct alignment.

Reported-by: Bruno Prémont <bonbons@linux-vserver.org>
Tested-by: Bruno Prémont <bonbons@linux-vserver.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
arch/x86/Kconfig
This page took 0.025811 seconds and 5 git commands to generate.