All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
To: Matt Fleming
	<matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>,
	Michael Brown <mbrown-OViyBiuKJBuK421+ScFKDQ@public.gmane.org>
Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] efi: Request desired alignment via the PE/COFF headers
Date: Mon, 14 Jul 2014 13:56:09 -0700	[thread overview]
Message-ID: <53C443E9.2030305@zytor.com> (raw)
In-Reply-To: <20140714121248.GH5952-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>

On 07/14/2014 05:12 AM, Matt Fleming wrote:
> On Mon, 14 Jul, at 01:08:32PM, Matt Fleming wrote:
>> On Sat, 12 Jul, at 02:34:26PM, Michael Brown wrote:
>>> On 12/07/14 01:31, H. Peter Anvin wrote:
>>>>> --- 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	0x20				# SectionAlignment
>>>>> +	.long	CONFIG_PHYSICAL_ALIGN		# SectionAlignment
>>>>>  	.long	0x20				# FileAlignment
>>>>>  	.word	0				# MajorOperatingSystemVersion
>>>>>  	.word	0				# MinorOperatingSystemVersion
>>>>
>>>> Are large alignments (16 MiB!) actually allowed in PE/COFF?
>>>
>>> I tested it: the EDK2 code seems perfectly happy to load images with
>>> that alignment.
>>
>> Right, I also quickly scanned the PE/COFF spec and didn't see anything
>> to suggest that such a large alignment would be allowed for
>> SectionAlignment (FileAlignment is another matter).
> 
> Urgh...
> 
> I didn't see anything in the spec saying a 16MB alignment would *not* be
> allowed.
> 

That's good.  So will you apply it, or should I?

	-hpa

  parent reply	other threads:[~2014-07-14 20:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09 22:44 [PATCH] efi: Request desired alignment via the PE/COFF headers Michael Brown
     [not found] ` <1404945890-10754-1-git-send-email-mbrown-OViyBiuKJBuK421+ScFKDQ@public.gmane.org>
2014-07-10 12:16   ` Matt Fleming
2014-07-12  0:31   ` H. Peter Anvin
     [not found]     ` <53C081DC.5080605-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2014-07-12 13:34       ` Michael Brown
     [not found]         ` <53C13962.1000309-OViyBiuKJBuK421+ScFKDQ@public.gmane.org>
2014-07-14 12:08           ` Matt Fleming
     [not found]             ` <20140714120832.GG5952-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-07-14 12:12               ` Matt Fleming
     [not found]                 ` <20140714121248.GH5952-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-07-14 20:56                   ` H. Peter Anvin [this message]
     [not found]                     ` <53C443E9.2030305-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2014-07-15  8:38                       ` Matt Fleming

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=53C443E9.2030305@zytor.com \
    --to=hpa-ymnouzjc4hwavxtiumwx3w@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.