From: P J P <ppandit@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Donghai Zdh <donghai.zdh@alibaba-inc.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH for v2.4.1] exec: fix a glitch in checking dma r/w access
Date: Wed, 27 Jan 2016 15:08:46 +0530 (IST) [thread overview]
Message-ID: <alpine.LFD.2.20.1601271448060.1741@wniryva> (raw)
In-Reply-To: <56A69E91.4080607@redhat.com>
Hello Paolo,
+-- On Mon, 25 Jan 2016, Paolo Bonzini wrote --+
| This should be handled correctly by address_space_translate_internal:
|
| if (memory_region_is_ram(mr)) {
| diff = int128_sub(section->size, int128_make64(addr));
| *plen = int128_get64(int128_min(diff, int128_make64(*plen)));
| }
|
| ... then, on return from address_space_translate, l will be 1:
|
| e.g. section->size = 0x100000000, addr = 0xffffffff;
| diff = 1;
| *plen = min(diff, *plen) = min(1, 4) = 1
I see. Sorry, I think the issue affects versions <= v2.3.1 and not v2.4.x.
v2.3.x series seems to be missing this patch
-> http://git.qemu.org/?p=qemu.git;a=commit;h=23820dbfc79d1c9dce090b4c555994f2bb6a69b3
which avoids setting '*plen' to its earlier value. I'll send it to the -stable
list.
| You also have to test that the patch doesn't break other code. It's not
| enough to test that it solves your problem.
Right, I'll run the tests/* going forward.
Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F
prev parent reply other threads:[~2016-01-27 9:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 14:29 [Qemu-devel] [PATCH for v2.4.1] exec: fix a glitch in checking dma r/w access P J P
2016-01-25 14:37 ` Paolo Bonzini
2016-01-25 18:19 ` P J P
2016-01-25 22:15 ` Paolo Bonzini
2016-01-27 9:38 ` P J P [this message]
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=alpine.LFD.2.20.1601271448060.1741@wniryva \
--to=ppandit@redhat.com \
--cc=donghai.zdh@alibaba-inc.com \
--cc=pbonzini@redhat.com \
--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).