[ipxe-devel] [PATCH 1/1] [efi] avoid unaligned read in efi_devpath_end()

Michael Brown mcb30 at ipxe.org
Wed Mar 28 19:02:13 UTC 2018


On 28/03/18 19:49, Heinrich Schuchardt wrote:
> The old coding resulted in a "data abort" when compiled with gcc 6.3 for
> armhf and run on an Allwinner A20 SOC.
> 
> The unaligned access occured when path->Length was on an uneven address.

There's no way that the code:

> -			 ( ( path->Length[1] << 8 ) | path->Length[0] ) );

should ever be able to produce an unaligned access abort, since it just 
dereferences individual bytes.  What do you see if you disassemble the 
object code?

Michael



More information about the ipxe-devel mailing list