qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 5/5] qxl: avoid unaligned pointer reads/write


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v2 5/5] qxl: avoid unaligned pointer reads/writes
Date: Tue, 7 May 2019 10:53:38 +0200
User-agent: NeoMutt/20180716

On Tue, May 07, 2019 at 10:11:02AM +0200, Philippe Mathieu-Daudé wrote:
> Hi Gerd,
> 
> On 5/7/19 9:54 AM, Gerd Hoffmann wrote:
> > On Fri, Apr 12, 2019 at 01:16:26PM +0100, Daniel P. Berrangé wrote:
> >> The SPICE_RING_PROD_ITEM() macro is initializing a local
> >> 'uint64_t *' variable to point to the 'el' field inside
> >> the QXLReleaseRing struct. This uint64_t field is not
> >> guaranteed aligned as the struct is packed.
> >>
> >> Code should not take the address of fields within a
> >> packed struct. Changing the SPICE_RING_PROD_ITEM()
> >> macro to avoid taking the address of the field is
> >> impractical. It is clearer to just remove the macro
> >> and inline its functionality in the three call sites
> >> that need it.
> > 
> > Added patch to vga queue.
> 
> What about the other patch Marc-André sent?
> https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg01318.html

Other patch version for the same issue, we need only one of the two.

cheers,
  Gerd



reply via email to

[Prev in Thread] Current Thread [Next in Thread]