svn commit: r197311 - in stable/7/sys: . contrib/pf dev/pci

Andriy Gapon avg at FreeBSD.org
Fri Sep 18 14:12:40 UTC 2009


Author: avg
Date: Fri Sep 18 14:12:40 2009
New Revision: 197311
URL: http://svn.freebsd.org/changeset/base/197311

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

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/pci/pci_user.c

Modified: stable/7/sys/dev/pci/pci_user.c
==============================================================================
--- stable/7/sys/dev/pci/pci_user.c	Fri Sep 18 14:05:56 2009	(r197310)
+++ stable/7/sys/dev/pci/pci_user.c	Fri Sep 18 14:12:40 2009	(r197311)
@@ -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-all mailing list