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

[Xen-changelog] [xen-unstable] vtd: During parsing DMAR table, if find RMRR is incorrect, return error.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1216803528 -3600
# Node ID ba6be1571cc628298c5a0666f261b660fdcaeac0
# Parent  f86941c1b523e4c301210a8d74ab251fb3e2d6c8
vtd: During parsing DMAR table, if find RMRR is incorrect, return error.

Signed-off-by: Weidong Han <weidong.han@xxxxxxxxx>
---
 xen/drivers/passthrough/vtd/dmar.c |    6 ++++++
 1 files changed, 6 insertions(+)

diff -r f86941c1b523 -r ba6be1571cc6 xen/drivers/passthrough/vtd/dmar.c
--- a/xen/drivers/passthrough/vtd/dmar.c        Tue Jul 22 16:03:45 2008 +0100
+++ b/xen/drivers/passthrough/vtd/dmar.c        Wed Jul 23 09:58:48 2008 +0100
@@ -349,6 +349,12 @@ acpi_parse_one_rmrr(struct acpi_dmar_ent
     void *dev_scope_start, *dev_scope_end;
     int ret = 0;
 
+    if ( rmrr->base_address >= rmrr->end_address )
+    {
+        dprintk(XENLOG_ERR VTDPREFIX, "RMRR is incorrect.\n");
+        return -EFAULT;
+    }
+
     rmrru = xmalloc(struct acpi_rmrr_unit);
     if ( !rmrru )
         return -ENOMEM;

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


 


Rackspace

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