aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2014-07-11 03:45:25 -0400
committerMatt Fleming <matt.fleming@intel.com>2014-08-05 17:01:04 -0400
commit7b2a583afb4ab894f78bc0f8bd136e96b6499a7e (patch)
tree23d0a8d78194aa6a7a1ba11968516b4a121b0ea3 /arch
parentc7fb93ec51d462ec3540a729ba446663c26a0505 (diff)
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index fcefdda5136d..a24097768463 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1536,6 +1536,7 @@ config EFI
1536config EFI_STUB 1536config EFI_STUB
1537 bool "EFI stub support" 1537 bool "EFI stub support"
1538 depends on EFI 1538 depends on EFI
1539 select RELOCATABLE
1539 ---help--- 1540 ---help---
1540 This kernel feature allows a bzImage to be loaded directly 1541 This kernel feature allows a bzImage to be loaded directly
1541 by EFI firmware without the use of a bootloader. 1542 by EFI firmware without the use of a bootloader.