linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
To: Michael Brown <mbrown-OViyBiuKJBuK421+ScFKDQ@public.gmane.org>
Cc: Linn Crosetto <linn-VXdhtT5mjnY@public.gmane.org>,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v3] efi: Request desired alignment via the PE/COFF headers
Date: Wed, 15 Jul 2015 15:11:19 +0100	[thread overview]
Message-ID: <20150715141119.GA6955@codeblueprint.co.uk> (raw)
In-Reply-To: <55840A3B.3000400-OViyBiuKJBuK421+ScFKDQ@public.gmane.org>

On Fri, 19 Jun, at 01:25:31PM, Michael Brown wrote:
> 
> You are right; this change can safely be reverted.  Sorry for the noise.

Guys, this is what I'm going to queue up for v4.3. My plan is to let it
bake in linux-next for a while, to try and shake out any problems.

Interestingly, I'm not sure that the size of the bzImage is actually
guaranteed to be a multiple of 32, since it appears that
arch/x86/boot/tools/build.c only deals with 16-byte "paragraphs".

---

>From 809ca3d4eac5836e5f48c19f28babff1e5b71c77 Mon Sep 17 00:00:00 2001
From: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Date: Wed, 15 Jul 2015 14:05:53 +0100
Subject: [PATCH] Revert "x86/efi: Request desired alignment via the PE/COFF
 headers"

This reverts commit aeffc4928ea21aab3c7be72f00e257799b661c29.

Linn reports that Signtool complains that kernels built with
CONFIG_EFI_STUB 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
legitimate bug, so revert the offending commit.

Reported-by: Linn Crosetto <linn-VXdhtT5mjnY@public.gmane.org>
Cc: Michael Brown <mbrown-OViyBiuKJBuK421+ScFKDQ@public.gmane.org>
Signed-off-by: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 arch/x86/boot/header.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index 16ef02596db2..7a6d43a554d7 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -154,7 +154,7 @@ extra_header_fields:
 #else
 	.quad	0				# ImageBase
 #endif
-	.long	CONFIG_PHYSICAL_ALIGN		# SectionAlignment
+	.long	0x20				# SectionAlignment
 	.long	0x20				# FileAlignment
 	.word	0				# MajorOperatingSystemVersion
 	.word	0				# MinorOperatingSystemVersion
-- 
2.1.0

-- 
Matt Fleming, Intel Open Source Technology Center

  parent reply	other threads:[~2015-07-15 14:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10 15:59 [PATCH v3] efi: Request desired alignment via the PE/COFF headers Michael Brown
     [not found] ` <1405007963-520-1-git-send-email-mbrown-OViyBiuKJBuK421+ScFKDQ@public.gmane.org>
2014-07-10 20:36   ` Matt Fleming
     [not found]     ` <20140710203633.GC5952-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-07-11  0:18       ` Michael Brown
     [not found]         ` <53BF2D63.60808-OViyBiuKJBuK421+ScFKDQ@public.gmane.org>
2014-07-11  7:41           ` Matt Fleming
     [not found]             ` <20140711074117.GE5952-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-07-11 15:16               ` Michael Brown
     [not found]                 ` <53BFFFCE.5040002-OViyBiuKJBuK421+ScFKDQ@public.gmane.org>
2014-07-14 13:10                   ` Matt Fleming
     [not found]                     ` <20140714131042.GJ5952-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-07-14 13:28                       ` Michael Brown
2015-06-15 21:43 ` Linn Crosetto
     [not found]   ` <loom.20150615T232724-11-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2015-06-16 16:19     ` Michael Brown
     [not found]       ` <55804C91.4030000-OViyBiuKJBuK421+ScFKDQ@public.gmane.org>
2015-06-16 17:37         ` Linn Crosetto
     [not found]           ` <20150616173725.GE13153-QpTgeCMhooRo/CpIj0byZw@public.gmane.org>
2015-06-18 22:02             ` Matt Fleming
     [not found]               ` <20150618220241.GA2776-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-06-18 22:27                 ` Michael Brown
     [not found]                   ` <558345EB.8010408-OViyBiuKJBuK421+ScFKDQ@public.gmane.org>
2015-06-19 12:21                     ` Matt Fleming
     [not found]                       ` <20150619122147.GC2776-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-06-19 12:25                         ` Michael Brown
     [not found]                           ` <55840A3B.3000400-OViyBiuKJBuK421+ScFKDQ@public.gmane.org>
2015-07-15 14:11                             ` Matt Fleming [this message]
     [not found]                               ` <20150715141119.GA6955-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-07-15 16:56                                 ` Linn Crosetto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150715141119.GA6955@codeblueprint.co.uk \
    --to=matt-mf/unelci9gs6ibeejttw/xrex20p6io@public.gmane.org \
    --cc=linn-VXdhtT5mjnY@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mbrown-OViyBiuKJBuK421+ScFKDQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).