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

[Xen-devel] How to check a physical address belonging to a PV guest or not?


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx, Angelos Stavrou <astavrou@xxxxxxx>
  • From: Jiang Wang <jwangzju@xxxxxxxxx>
  • Date: Tue, 5 May 2009 22:10:10 -0400
  • Cc:
  • Delivery-date: Tue, 05 May 2009 19:10:37 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=DdQABskpcdsxV441XQLoEOJyOci+nvwsZvovO0wa0+ugS+Gog3P1Q0Z+nG7DwiVWwQ vjQRDpanYWnpN717t6swkhSAsJMlrxH53WlNzATFfi06qUBHwqEe21d/2HtQmwJtbxRa qNBH40/+l4JTcobryygpycn2OZ+2FjanUwJA8=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi:

I am working on a research project to protect against malicious device
drivers without using IOMMU. Currently, a driver domain is trusted. A
compromised driver can potentially use DMA to access the physical
address that belong to other domains and steal some information. IOMMU
can prevent this. But I think software protection is also feasible.

For example, on x86-32 architecture, the dom0 or domU is running at
ring 1. The access to the IO ports are trapped and then checked
against IO or memory permission. I want to add extra check, which not
only check whether the port (or memory) is allowed to access by a
domain but also check the actual parameter for the IO access. The
hypervisor should somehow know which IO port is for DMA access. It can
then check the physical access for the DMA. If the physical address is
not belonging to the calling PV guest, permission denied.
I have two questions:
1) What is a good way to notify the hypervisor that an IO port (or
memory) is for DMA? Maybe use some booting options? Or configuration
files for domU? Is there any configuration files for dom0? Any
examples?
2) How to check a physical address belonging to a guest or not? I
guess when the device driver in a PV tries to write an IO port, it is
using machine address, right? After the hypervisor gets that address,
how to find out it is legal or not? Use some function to get the mfn
for that address and search it in the dom's machine frame table?
Any suggestions or comments? Thanks.

Regards,

Jiang

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.