Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2015 08:21:37 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r280425 - stable/10/sys/x86/iommu
Message-ID:  <201503240821.t2O8LbNI025600@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Mar 24 08:21:36 2015
New Revision: 280425
URL: https://svnweb.freebsd.org/changeset/base/280425

Log:
  MFC r280196:
  Recheck that boundary is not crossed after the move to satisfy boundary
  restriction.

Modified:
  stable/10/sys/x86/iommu/intel_gas.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/x86/iommu/intel_gas.c
==============================================================================
--- stable/10/sys/x86/iommu/intel_gas.c	Tue Mar 24 08:18:24 2015	(r280424)
+++ stable/10/sys/x86/iommu/intel_gas.c	Tue Mar 24 08:21:36 2015	(r280425)
@@ -327,13 +327,15 @@ dmar_gas_match_one(struct dmar_gas_match
 	start = roundup2(bs, a->common->alignment);
 	/* DMAR_PAGE_SIZE to create gap after new entry. */
 	if (start + a->size + DMAR_PAGE_SIZE <= prev->end + prev->free_after &&
-	    start + a->size <= end) {
+	    start + a->size <= end && dmar_test_boundary(start, a->size,
+	    a->common->boundary)) {
 		a->entry->start = start;
 		return (true);
 	}
 
 	/*
-	 * Not enough space to align at boundary, but allowed to split.
+	 * Not enough space to align at the requested boundary, or
+	 * boundary is smaller than the size, but allowed to split.
 	 * We already checked that start + size does not overlap end.
 	 *
 	 * XXXKIB. It is possible that bs is exactly at the start of



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503240821.t2O8LbNI025600>