From owner-svn-src-stable-8@FreeBSD.ORG Sat Sep 19 08:13:11 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5632B1065672; Sat, 19 Sep 2009 08:13:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42EC28FC15; Sat, 19 Sep 2009 08:13:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8J8DAHg017723; Sat, 19 Sep 2009 08:13:10 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8J8DAmE017722; Sat, 19 Sep 2009 08:13:10 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200909190813.n8J8DAmE017722@svn.freebsd.org> From: Andriy Gapon Date: Sat, 19 Sep 2009 08:13:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: 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 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Sep 2009 08:13:11 -0000 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;