From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7P56-0006Xi-W6 for qemu-devel@nongnu.org; Mon, 30 May 2016 11:26:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7P52-0006wJ-VV for qemu-devel@nongnu.org; Mon, 30 May 2016 11:26:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7P52-0006wE-Pk for qemu-devel@nongnu.org; Mon, 30 May 2016 11:26:12 -0400 Date: Mon, 30 May 2016 18:26:09 +0300 From: "Michael S. Tsirkin" Message-ID: <20160530182501-mutt-send-email-mst@redhat.com> References: <1464599682-14592-1-git-send-email-leonid.bloch@ravellosystems.com> <1464599682-14592-2-git-send-email-leonid.bloch@ravellosystems.com> <20160530144712.GA1702@redhat.com> <20160530181036-mutt-send-email-mst@redhat.com> <4CAECCE6-DF0E-41EA-AF9C-25867B57E00D@daynix.com> <20160530181846-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v6 01/17] pci: fix unaligned access in pci_xxx_quad() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dmitry Fleytman Cc: Leonid Bloch , QEMU Developers , Jason Wang , Leonid Bloch , Shmulik Ladkani On Mon, May 30, 2016 at 06:22:35PM +0300, Dmitry Fleytman wrote: >=20 > > On 30 May 2016, at 18:19 PM, Michael S. Tsirkin wrot= e: > >=20 > > 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=E2=80=A6 > >>=20 > >>=20 > >> It does according to clang sanitiser. > >=20 > >=20 > > Oh so it's a clang false positive? >=20 > I think not. > The capability itself is 8-bytes aligned but 64-bit serial number insid= e 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. > >=20 > > --=20 > > MST