From: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: joro@8bytes.org, paul@codesourcery.com, avi@redhat.com,
kvm@vger.kernel.org, qemu-devel@nongnu.org
Subject: Re: Status update
Date: Thu, 1 Jul 2010 22:30:34 +0300 [thread overview]
Message-ID: <20100701193034.GA7421@localhost> (raw)
In-Reply-To: <AANLkTimZRp6xusr_o2W58_avpbhrgxDHbEp0gjYUY8jp@mail.gmail.com>
On Wed, Jun 30, 2010 at 09:37:31AM +0100, Stefan Hajnoczi wrote:
> On Tue, Jun 29, 2010 at 6:25 PM, Eduard - Gabriel Munteanu
> <eduard.munteanu@linux360.ro> wrote:
> > On the other hand, we could just leave it alone for now. Changing
> > mappings during DMA is stupid anyway: I don't think the guest can
> > recover the results of DMA safely, even though it might be used on
> > transfers in progress you simply don't care about anymore. Paul Brook
> > suggested we could update the cpu_physical_memory_map() mappings
> > somehow, but I think that's kinda difficult to accomplish.
>
> A malicious or broken guest shouldn't be able to crash or corrupt QEMU
> process memory. The IOMMU can only map from bus addresses to guest
> physical RAM (?) so the worst the guest can do here is corrupt itself?
>
> Stefan
That's true, but it's fair to be concerned about the guest itself.
Imagine it runs some possibly malicious apps which program the hardware
to do DMA. That should be safe when a IOMMU is present.
But suddenly the guest OS changes mappings and expects the IOMMU to
enforce them as soon as invalidation commands are completed. The guest
then reclaims the old space for other uses. This leaves an opportunity
for those processes to corrupt or read sensitive data.
If the guest OS is prone to changing mappings during DMA, some process
could continually set up, e.g., IDE DMA write transfers hoping to expose
useful data it can't read otherwise. The buffer can be poisoned to see
if someone went for the bait and wrote in that space.
Actually I'm not that sure changing mappings during DMA is stupid,
as the OS might want to reassign devices (where this is possible) to
various processes. Reclaiming mappings seems normal when a processes
dies during DMA, as the kernel has no way of telling whether DMA
completed (or even started).
Eduard
WARNING: multiple messages have this Message-ID (diff)
From: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel@nongnu.org, joro@8bytes.org, paul@codesourcery.com,
kvm@vger.kernel.org, avi@redhat.com
Subject: [Qemu-devel] Re: Status update
Date: Thu, 1 Jul 2010 22:30:34 +0300 [thread overview]
Message-ID: <20100701193034.GA7421@localhost> (raw)
In-Reply-To: <AANLkTimZRp6xusr_o2W58_avpbhrgxDHbEp0gjYUY8jp@mail.gmail.com>
On Wed, Jun 30, 2010 at 09:37:31AM +0100, Stefan Hajnoczi wrote:
> On Tue, Jun 29, 2010 at 6:25 PM, Eduard - Gabriel Munteanu
> <eduard.munteanu@linux360.ro> wrote:
> > On the other hand, we could just leave it alone for now. Changing
> > mappings during DMA is stupid anyway: I don't think the guest can
> > recover the results of DMA safely, even though it might be used on
> > transfers in progress you simply don't care about anymore. Paul Brook
> > suggested we could update the cpu_physical_memory_map() mappings
> > somehow, but I think that's kinda difficult to accomplish.
>
> A malicious or broken guest shouldn't be able to crash or corrupt QEMU
> process memory. The IOMMU can only map from bus addresses to guest
> physical RAM (?) so the worst the guest can do here is corrupt itself?
>
> Stefan
That's true, but it's fair to be concerned about the guest itself.
Imagine it runs some possibly malicious apps which program the hardware
to do DMA. That should be safe when a IOMMU is present.
But suddenly the guest OS changes mappings and expects the IOMMU to
enforce them as soon as invalidation commands are completed. The guest
then reclaims the old space for other uses. This leaves an opportunity
for those processes to corrupt or read sensitive data.
If the guest OS is prone to changing mappings during DMA, some process
could continually set up, e.g., IDE DMA write transfers hoping to expose
useful data it can't read otherwise. The buffer can be poisoned to see
if someone went for the bait and wrote in that space.
Actually I'm not that sure changing mappings during DMA is stupid,
as the OS might want to reassign devices (where this is possible) to
various processes. Reclaiming mappings seems normal when a processes
dies during DMA, as the kernel has no way of telling whether DMA
completed (or even started).
Eduard
next prev parent reply other threads:[~2010-07-01 19:31 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-29 17:25 Status update Eduard - Gabriel Munteanu
2010-06-29 17:25 ` [Qemu-devel] " Eduard - Gabriel Munteanu
2010-06-30 8:37 ` Stefan Hajnoczi
2010-06-30 8:37 ` [Qemu-devel] " Stefan Hajnoczi
2010-07-01 19:30 ` Eduard - Gabriel Munteanu [this message]
2010-07-01 19:30 ` Eduard - Gabriel Munteanu
2010-07-02 8:03 ` Stefan Hajnoczi
2010-07-02 8:03 ` [Qemu-devel] " Stefan Hajnoczi
2010-07-02 9:41 ` Isaku Yamahata
2010-07-02 9:41 ` Isaku Yamahata
2010-07-02 17:17 ` Eduard - Gabriel Munteanu
2010-07-02 17:17 ` Eduard - Gabriel Munteanu
2010-07-02 17:05 ` Eduard - Gabriel Munteanu
2010-07-02 17:05 ` [Qemu-devel] " Eduard - Gabriel Munteanu
-- strict thread matches above, loose matches on Subject: below --
2014-10-03 12:01 Status Update Richard Purdie
2014-04-29 8:49 Richard Purdie
2014-04-29 11:29 ` Richard Purdie
2014-04-29 17:31 ` Otavio Salvador
2014-04-15 18:45 Richard Purdie
2014-04-08 12:25 Richard Purdie
2014-04-01 13:51 Richard Purdie
2014-03-24 11:53 Richard Purdie
2014-03-18 13:09 Richard Purdie
2014-03-10 2:20 Richard Purdie
2014-03-10 2:43 ` Robert Yang
2013-07-01 7:01 Richard Purdie
2013-05-28 17:35 Richard Purdie
2013-05-28 19:34 ` Jack Mitchell
2013-05-07 12:45 Richard Purdie
2013-05-07 16:29 ` Trevor Woerner
2013-05-07 17:13 ` Burton, Ross
2013-05-07 17:57 ` Trevor Woerner
2013-05-08 10:35 ` Burton, Ross
2013-05-08 12:46 ` Trevor Woerner
2013-04-29 20:57 Richard Purdie
2013-03-20 23:45 Richard Purdie
2006-12-28 12:25 status update Pam Phillips
2006-12-28 10:38 Connie Copeland
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=20100701193034.GA7421@localhost \
--to=eduard.munteanu@linux360.ro \
--cc=avi@redhat.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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.