All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Ildar Isaev" <ild@inbox.ru>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Anthony Liguori" <aliguori@amazon.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH] include/hw: field 'offset' in struct Property should be ptrdiff_t as int causes overflow
Date: Wed, 11 Nov 2015 09:54:47 +0100	[thread overview]
Message-ID: <87wptohq5k.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <CAFEAcA9UWYzOWgtaEQ+P12uXEFEpCdxR1oMt4N9FeYHGDeZXig@mail.gmail.com> (Peter Maydell's message of "Tue, 25 Aug 2015 15:32:40 +0100")

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?

  reply	other threads:[~2015-11-11  8:58 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 [this message]
2015-11-12 17:41       ` Andreas Färber
2015-11-13 18:32         ` John Snow
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=87wptohq5k.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@amazon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.