Re: [PATCH] efi: Request desired alignment via the PE/COFF headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux