From: John Snow <jsnow@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>,
"Markus Armbruster" <armbru@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Ildar Isaev <ild@inbox.ru>,
QEMU Developers <qemu-devel@nongnu.org>,
Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH] include/hw: field 'offset' in struct Property should be ptrdiff_t as int causes overflow
Date: Fri, 13 Nov 2015 13:32:33 -0500 [thread overview]
Message-ID: <56462CC1.3010408@redhat.com> (raw)
In-Reply-To: <5644CF37.8060801@suse.de>
On 11/12/2015 12:41 PM, Andreas Färber wrote:
> Am 11.11.2015 um 09:54 schrieb Markus Armbruster:
>> Peter Maydell <peter.maydell@linaro.org> writes:
>>> On 25 August 2015 at 15:17, Markus Armbruster <armbru@redhat.com> wrote:
>>>> Stumbled over this while throwing away old mail. Andreas, what do you
>>>> think?
>>>
>>> Seems right to me -- I suspect the original properties code was
>>> written with the assumption that the property field would be
>>> inside the device struct (and so offsets are small). The array
>>> properties code breaks that assumption by allocating a separate
>>> lump of memory with the properties in it; so now there's no
>>> guarantee that the two pointers being subtracted will be
>>> within 4G of each other.
>>>
>>> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>>>
>>> Arguably for consistency the 'arrayoffset' struct member should
>>> also be a ptrdiff_t, though our current uses of it are such
>>> that it'll always be within int range.
>>
>> Andreas?
>
> Found it archived. I honestly don't think it's necessary in practice to
> have 64-bit offsets on 64-bit host, but it builds okay, queued. Testing
> got stuck in ahci though, investigating.
>
> Thanks,
> Andreas
>
Did you ever reproduce this, or does it seem to just be a race?
next prev parent reply other threads:[~2015-11-13 18:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 14:09 [Qemu-devel] [PATCH] include/hw: field 'offset' in struct Property should be ptrdiff_t as int causes overflow Ildar Isaev
2015-08-25 14:17 ` Markus Armbruster
2015-08-25 14:32 ` Peter Maydell
2015-11-11 8:54 ` Markus Armbruster
2015-11-12 17:41 ` Andreas Färber
2015-11-13 18:32 ` John Snow [this message]
2015-11-13 18:36 ` Andreas Färber
2015-11-13 19:36 ` John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56462CC1.3010408@redhat.com \
--to=jsnow@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=armbru@redhat.com \
--cc=ild@inbox.ru \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).