Hi Heinrich,

On 10/30/26 14:09, Heinrich Schuchardt wrote:
> For secure boot we are looking at all regions. Shouldn't we make

This sentence got cut off. Could you finish it? If you meant that the
header copy should cover SizeOfHeaders, as the hashed regions do, I can
change that in v2.

>> +    hdr_size = (void *)(sections + num_sections) - efi;
>> +    if (hdr_size > virt_size) {
>> +            log_err("PE headers do not fit into the image\n");
>> +            return EFI_LOAD_ERROR;
>> +    }
>
> Shouldn't we ensure that we always allocate this amount of memory
> instead of failing here?

Yes, that is better. In v2 virt_size is raised to at least hdr_size, so
the headers always fit and such an image loads instead of being
refused. The test now checks that the loaded image holds the whole
section table.

Thanks,
Ana

Reply via email to