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

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

 



On Fri, 11 Jul, at 01:18:43AM, Michael Brown wrote:
> 
> The "...headers now include..." part was referring to the previously
> merged patch to add the .bss section.
> 
> I haven't actually looked at the code which performs the alignment;
> I was going on hpa's concern that merely exposing init_size would be
> insufficient due to the potential for alignment.  My understanding
> (possibly incorrect) was that the alignment was carried out using
> something simple along the lines of:
> 
>   new_kernel_start = align ( kernel_start, kernel_alignment );
>   memmove ( new_kernel_start, kernel_start, kernel_len );
> 
> i.e. that the memory used for alignment was not explicitly
> allocated. If the EFI boot stub instead allocates space for the
> aligned kernel using AllocatePages() (and allocates enough space for
> the whole of init_size), then the problem I described does not
> exist.

Right, this shouldn't be a problem because we do in fact allocate space
using the EFI boottime services in efi_relocate_kernel(), taking the
alignment into account, and then perform the kernel image copy.

I still think your change makes sense, I'm just inclined to delete the
paragraph referring to the corruption bug (which we've established
doesn't exist).

-- 
Matt Fleming, Intel Open Source Technology Center
--
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