qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 01/17] pci: fix unaligned access in pci_xxx_q


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH v6 01/17] pci: fix unaligned access in pci_xxx_quad()
Date: Mon, 30 May 2016 18:26:09 +0300

On Mon, May 30, 2016 at 06:22:35PM +0300, Dmitry Fleytman wrote:
> 
> > On 30 May 2016, at 18:19 PM, Michael S. Tsirkin <address@hidden> wrote:
> > 
> > On Mon, May 30, 2016 at 06:14:56PM +0300, Dmitry Fleytman wrote:
> >>    Does DSN generation function pass unaligned offsets?
> >>    It does not look like it does…
> >> 
> >> 
> >> It does according to clang sanitiser.
> > 
> > 
> > Oh so it's a clang false positive?
> 
> I think not.
> The capability itself is 8-bytes aligned but 64-bit serial number inside of 
> it is not because of 32 bit header in front of it.

Oh right. Things like this should really go into commit log
in the future.
For now a code comment in pci set/get that explains that
alignment in capabilities is generally at dword not qword
boundary would be enough.

> > 
> > -- 
> > MST



reply via email to

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