qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] include/hw: field 'offset' in struct Property s


From: John Snow
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 11/12/2015 12:41 PM, Andreas Färber wrote:
> Am 11.11.2015 um 09:54 schrieb Markus Armbruster:
>> Peter Maydell <address@hidden> writes:
>>> On 25 August 2015 at 15:17, Markus Armbruster <address@hidden> 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 <address@hidden>
>>>
>>> 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?



reply via email to

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