Re: [Qemu-devel] [PATCH] virtio: do not take address of packed members

2018-09-27 Thread Jason Wang
On 2018年09月27日 05:20, Paolo Bonzini wrote: The address of a packed member is not packed, which may cause accesses to unaligned pointers. Avoid this by reading the packed value before passing it to another function. Cc: Jason Wang Cc: Peter Maydell Reviewed-by: Eric Blake Cc: qemu-sta...@n

Re: [Qemu-devel] [PATCH] virtio: do not take address of packed members

2018-09-26 Thread Philippe Mathieu-Daudé
On 9/26/18 11:20 PM, Paolo Bonzini wrote: > The address of a packed member is not packed, which may cause accesses > to unaligned pointers. Avoid this by reading the packed value before > passing it to another function. > > Cc: Jason Wang > Cc: Peter Maydell > Reviewed-by: Eric Blake > Cc: qem

[Qemu-devel] [PATCH] virtio: do not take address of packed members

2018-09-26 Thread Paolo Bonzini
The address of a packed member is not packed, which may cause accesses to unaligned pointers. Avoid this by reading the packed value before passing it to another function. Cc: Jason Wang Cc: Peter Maydell Reviewed-by: Eric Blake Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini ---