Revert "x86/efi: Request desired alignment via the PE/COFF headers"
authorMatt Fleming <matt.fleming@intel.com>
Fri, 7 Aug 2015 08:36:56 +0000 (09:36 +0100)
committerIngo Molnar <mingo@kernel.org>
Sat, 8 Aug 2015 08:37:39 +0000 (10:37 +0200)
commitfa5c35011a8d5f3d0c597a6336107eafd1b6046c
tree86dac143384c3e30bb0201ec2ae57de1cc9f8b15
parent248fbcd5aee00f6519a12c5ed3bc3dc0f5e84de5
Revert "x86/efi: Request desired alignment via the PE/COFF headers"

This reverts commit:

  aeffc4928ea2 ("x86/efi: Request desired alignment via the PE/COFF headers")

Linn reports that Signtool complains that kernels built with
CONFIG_EFI_STUB=y are violating the PE/COFF specification because
the 'SizeOfImage' field is not a multiple of 'SectionAlignment'.

This violation was introduced as an optimisation to skip having
the kernel relocate itself during boot and instead have the
firmware place it at a correctly aligned address.

No one else has complained and I'm not aware of any firmware
implementations that refuse to boot with commit aeffc4928ea2,
but it's a real bug, so revert the offending commit.

Reported-by: Linn Crosetto <linn@hp.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael Brown <mbrown@fensystems.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1438936621-5215-3-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/boot/header.S