Re: [Qemu-devel] [PATCH v4] loader: Fix misaligned member access

2018-05-08 Thread Philippe Mathieu-Daudé
Hi Peter, Paolo, On 04/24/2018 07:21 PM, Philippe Mathieu-Daudé wrote: > The libfdt does not guarantee than fdt_getprop() returns a pointer > aligned to the property size. > > Assuming the base of the fdt is aligned, a 32-bit property returns > a 32-bit aligned pointer. This is however not

Re: [Qemu-devel] [PATCH v4] loader: Fix misaligned member access

2018-04-25 Thread David Gibson
On Tue, Apr 24, 2018 at 07:21:03PM -0300, Philippe Mathieu-Daudé wrote: > The libfdt does not guarantee than fdt_getprop() returns a pointer > aligned to the property size. > > Assuming the base of the fdt is aligned, a 32-bit property returns > a 32-bit aligned pointer. This is however not

Re: [Qemu-devel] [PATCH v4] loader: Fix misaligned member access

2018-04-24 Thread Richard Henderson
On 04/24/2018 12:21 PM, Philippe Mathieu-Daudé wrote: > The libfdt does not guarantee than fdt_getprop() returns a pointer > aligned to the property size. > > Assuming the base of the fdt is aligned, a 32-bit property returns > a 32-bit aligned pointer. This is however not guaranteed for 64-bit >

[Qemu-devel] [PATCH v4] loader: Fix misaligned member access

2018-04-24 Thread Philippe Mathieu-Daudé
The libfdt does not guarantee than fdt_getprop() returns a pointer aligned to the property size. Assuming the base of the fdt is aligned, a 32-bit property returns a 32-bit aligned pointer. This is however not guaranteed for 64-bit properties, where 64-bit loads might trigger unaligned access.