[ipxe-devel] [PATCH 2/2] [http] Support booting images larger than 2GB over http on 32-bit builds

Michael Brown mcb30 at ipxe.org
Wed Jan 23 11:19:55 UTC 2019


On 22/01/2019 19:14, Johannes Thoma wrote:
> The start member of http_request_range has been widened to
> 64 bit.
> 
> block_read/block_write len parameter has been widened.
> (also the block_read/block_write TYPES, which is why we also
> touched unrelated files like scsi.c or ata.c)
> 
> The len parameter of the blktrans_xferbuf_realloc has been
> widened (which records the length of the image) plus all
> intermediate functions that lead to the call.

Thanks.  I will review this in more detail later, but there's one 
initial comment: is it necessary to widen the various length parameters 
beyond size_t?  It's meaningful to request a 64-bit file offset on a 
32-bit system, but there's no way we can ever transfer more than a 4GB 
length in a single request on a 32-bit system since there wouldn't be 
enough memory to hold it.

Would it make sense to restrict the changes to modifying only the file 
offsets, while leaving the lengths as size_t?

Michael



More information about the ipxe-devel mailing list