Date: Sat, 19 Sep 2009 08:13:10 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: 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 Message-ID: <200909190813.n8J8DAmE017722@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909190813.n8J8DAmE017722>