summaryrefslogtreecommitdiff
path: root/arch/x86/boot/header.S
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-03-23 09:35:05 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2012-03-26 13:10:01 -0700
commite31be363df3092821bf179cf4baa076f501b8ae6 (patch)
treee35eb913df39beebd30dfcf07a916c39f4dcd4f3 /arch/x86/boot/header.S
parent2e064b1e131eba262c0ba4268cb79dbc72edeece (diff)
x86, efi: Fix .text section overlapping image header for EFI_STUB
This change modifes the PE .text section to start after the first sector of the kernel image. The header may be modified by the UEFI secure boot signing, so it is not appropriate for it to be included in one of the image sections. Since the sections are part of the secure boot hash, this modification to the .text section contents would invalidate the secure boot signed hash. Note: UEFI secure boot does hash the image header, but fields that are changed by the signing process are excluded from the hash calculation. This exclusion process is only handled for the image header, and not image sections. Luckily, we can still easily boot without the first sector by initializing a few fields in arch/x86/boot/compressed/eboot.c. Signed-off-by: Matt Fleming <matt.fleming@intel.com> Link: http://lkml.kernel.org/r/1332520506-6472-3-git-send-email-jordan.l.justen@intel.com [jordan.l.justen@intel.com: set .text vma & file offset] Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/boot/header.S')
-rw-r--r--arch/x86/boot/header.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index 4e9124b148c2..4ceb56e9a4ce 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -147,7 +147,7 @@ optional_header:
# Filled in by build.c
.long 0x0000 # AddressOfEntryPoint
- .long 0x0000 # BaseOfCode
+ .long 0x0200 # BaseOfCode
#ifdef CONFIG_X86_32
.long 0 # data
#endif