linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: aik@ozlabs.ru, linuxppc-dev@lists.ozlabs.org,
	Gavin Shan <shangw@linux.vnet.ibm.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH 3/3] VFIO: Direct access config reg without capability
Date: Mon, 18 Mar 2013 15:15:30 -0600	[thread overview]
Message-ID: <1363641330.24132.437.camel@bling.home> (raw)
In-Reply-To: <1363411807.1244.13.camel@pasglop>

On Sat, 2013-03-16 at 06:30 +0100, Benjamin Herrenschmidt wrote:
> On Fri, 2013-03-15 at 13:41 -0600, Alex Williamson wrote:
> > 
> > This basically gives userspace free access to any regions that aren't
> > covered by known capabilities. 
> 
> And ?
> 
> I mean seriously :-) We already had that discussion ... trying to
> "protect" config space is just plain doomed. There is no point.
> 
> It makes sense to do things like emulate BARs etc... for things to
> function properly under some circumstances/setups where you can't just
> expose the original BAR values to the guest and have the HW take care of
> it but you *must* be prepared to deal with anything in config space
> being changed without you knowing about it.
> 
> Devices *will* have backdoors via MMIO. Period. You cannot rely on those
> not existing, whether they are documented or not.
> 
> If you can't cope with the config space accesses then you aren't
> properly isolated. It can be deemed acceptable (depends what you use
> your VMs for) but that I mean is that any config space
> filtering/emulation for the sake of "security" is ... pointless.
> 
> Doing it for functionality to work at all (ie BAR emulation) is fine,
> but that's about it. IE. As a mean of security it's pointless.
> 
> 
> >  We have no idea what this might expose on some devices.
> 
> No more than we have any idea what MMIO mapping of the device register
> space exposes :-)

Yeah, yeah.  Ok, I can't come up with a reasonable argument otherwise,
it'll give us better device support, and I believe pci-assign has always
done this.  I'll take another look at the patch.  Thanks,

Alex

  reply	other threads:[~2013-03-18 21:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15  7:26 [PATCH 0/3] VFIO change for EEH support Gavin Shan
2013-03-15  7:26 ` [PATCH 1/3] VFIO: Architecture dependent VFIO device operations Gavin Shan
2013-03-15  7:26 ` [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command Gavin Shan
2013-03-15 19:29   ` Alex Williamson
2013-03-16  1:34     ` Gavin Shan
2013-03-16  5:37       ` Benjamin Herrenschmidt
2013-03-18 21:01         ` Alex Williamson
2013-03-19  3:24           ` Gavin Shan
2013-03-19  4:18             ` Alex Williamson
2013-03-19  4:45               ` Benjamin Herrenschmidt
2013-03-20 18:48                 ` Alex Williamson
2013-03-20 19:31                   ` Benjamin Herrenschmidt
2013-03-20 19:46                     ` Alex Williamson
2013-03-21  2:09                       ` Gavin Shan
2013-03-15  7:26 ` [PATCH 3/3] VFIO: Direct access config reg without capability Gavin Shan
2013-03-15 19:41   ` Alex Williamson
2013-03-16  3:34     ` Gavin Shan
2013-03-16  5:30     ` Benjamin Herrenschmidt
2013-03-18 21:15       ` Alex Williamson [this message]
2013-03-21  0:58   ` Alex Williamson

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=1363641330.24132.437.camel@bling.home \
    --to=alex.williamson@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=benh@kernel.crashing.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=shangw@linux.vnet.ibm.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 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).