svn commit: r197324 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ciss dev/pci dev/xen/xenpci

Andriy Gapon avg at FreeBSD.org
Sat Sep 19 08:13:11 UTC 2009


Author: avg
Date: Sat Sep 19 08:13:10 2009
New Revision: 197324
URL: http://svn.freebsd.org/changeset/base/197324

Log:
  MFC r197099: pci(4): don't perform maximum register number check
  
  Different sub-kinds of PCI buses may have different rules and
  thus it is up for the bus backends to do proper input checks.
  For example, PCIe allows configuration register numbers < 0x1000,
  while for PCI proper the limit is 0x100.
  And, in fact, the buses already do the checks.
  
  Reviewed by:	jhb
  Approved by:	re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/ciss/   (props changed)
  stable/8/sys/dev/pci/pci_user.c
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/pci/pci_user.c
==============================================================================
--- stable/8/sys/dev/pci/pci_user.c	Sat Sep 19 04:36:38 2009	(r197323)
+++ stable/8/sys/dev/pci/pci_user.c	Sat Sep 19 08:13:10 2009	(r197324)
@@ -605,9 +605,8 @@ getconfexit:
 		case 4:
 		case 2:
 		case 1:
-			/* Make sure register is in bounds and aligned. */
+			/* Make sure register is not negative and aligned. */
 			if (io->pi_reg < 0 ||
-			    io->pi_reg + io->pi_width > PCI_REGMAX + 1 ||
 			    io->pi_reg & (io->pi_width - 1)) {
 				error = EINVAL;
 				break;


More information about the svn-src-stable mailing list